Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4UICmdWithAComplexString.cxx
Go to the documentation of this file.
1//------------------------------------------------
2// The Geant4 Virtual Monte Carlo package
3// Copyright (C) 2007 - 2014 Ivana Hrivnacova
4// All rights reserved.
5//
6// For the licensing terms see geant4_vmc/LICENSE.
7// Contact: root-vmc@cern.ch
8//-------------------------------------------------
9
14
16
17#include <sstream>
18
19//_____________________________________________________________________________
21 const G4String& theCommandPath, G4UImessenger* theMessenger)
22 : G4UIcommand(theCommandPath, theMessenger)
23{
27
28 G4UIparameter* first = new G4UIparameter('s');
29 SetParameter(first);
30 G4UIparameter* second = new G4UIparameter('s');
31 SetParameter(second);
32 G4UIparameter* third = new G4UIparameter('s');
33 SetParameter(third);
34}
35
36//_____________________________________________________________________________
41
42//
43// public methods
44//
45
46//_____________________________________________________________________________
48 const G4String& name, G4bool omittable)
49{
57
58 G4UIparameter* first = GetParameter(0);
59 first->SetParameterName(name);
60 first->SetOmittable(omittable);
61 first->SetCurrentAsDefault(false);
62
63 G4UIparameter* second = GetParameter(1);
64 G4String secondName = name + "_cont1";
65 second->SetParameterName(secondName);
66 second->SetOmittable(true);
67 second->SetCurrentAsDefault(false);
68
69 G4UIparameter* third = GetParameter(2);
70 G4String thirdName = name + "_cont2";
71 third->SetParameterName(thirdName);
72 third->SetOmittable(true);
73 third->SetCurrentAsDefault(false);
74}
75
76//_____________________________________________________________________________
77void TG4UICmdWithAComplexString::SetDefaultValue(const G4String& defaultValue)
78{
83
84 G4UIparameter* first = GetParameter(0);
85 first->SetDefaultValue(defaultValue);
86
87 G4UIparameter* second = GetParameter(1);
88 second->SetDefaultValue(" ");
89
90 G4UIparameter* third = GetParameter(2);
91 third->SetDefaultValue(" ");
92}
93
94//_____________________________________________________________________________
96 const G4String& paramString)
97{
99
100 return paramString;
101}
Definition of the TG4UICmdWithAComplexString class.
G4String GetNewStringValue(const G4String &paramString)
TG4UICmdWithAComplexString(const G4String &theCommandPath, G4UImessenger *theMessenger)
void SetDefaultValue(const G4String &defVal)
void SetParameterName(const G4String &name, G4bool omittable)