Geant4 9.6.0
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4UIparameter Class Reference

#include <G4UIparameter.hh>

Public Member Functions

 G4UIparameter ()
 
 G4UIparameter (char theType)
 
 G4UIparameter (const char *theName, char theType, G4bool theOmittable)
 
 ~G4UIparameter ()
 
G4int operator== (const G4UIparameter &right) const
 
G4int operator!= (const G4UIparameter &right) const
 
G4int CheckNewValue (const char *newValue)
 
void List ()
 
void SetDefaultValue (const char *theDefaultValue)
 
void SetDefaultValue (G4int theDefaultValue)
 
void SetDefaultValue (G4double theDefaultValue)
 
G4String GetDefaultValue () const
 
char GetParameterType () const
 
void SetParameterRange (const char *theRange)
 
G4String GetParameterRange () const
 
void SetParameterName (const char *theName)
 
G4String GetParameterName () const
 
void SetParameterCandidates (const char *theString)
 
G4String GetParameterCandidates () const
 
void SetOmittable (G4bool om)
 
G4bool IsOmittable () const
 
void SetCurrentAsDefault (G4bool val)
 
G4bool GetCurrentAsDefault () const
 
void SetWidget (G4int theWidget)
 
const G4String GetParameterGuidance () const
 
void SetGuidance (const char *theGuidance)
 

Detailed Description

Definition at line 47 of file G4UIparameter.hh.

Constructor & Destructor Documentation

◆ G4UIparameter() [1/3]

G4UIparameter::G4UIparameter ( )

Definition at line 37 of file G4UIparameter.cc.

37 :paramERR(0)
38{
39 G4String nullString;
40 parameterName = nullString;
41 parameterType = '\0';
42 omittable = false;
43 parameterGuidance = nullString;
44 defaultValue = nullString;
45 parameterRange = nullString;
46 currentAsDefaultFlag = false;
47 parameterCandidate = nullString;
48 widget = 0;
49 bp = 0;
50 token = NONE;
51}
@ NONE
Definition: G4UItokenNum.hh:38

◆ G4UIparameter() [2/3]

G4UIparameter::G4UIparameter ( char  theType)

Definition at line 53 of file G4UIparameter.cc.

53 :paramERR(0)
54{
55 G4String nullString;
56 parameterName = nullString;
57 parameterType = theType;
58 omittable = false;
59 parameterGuidance = nullString;
60 defaultValue = nullString;
61 parameterRange = nullString;
62 currentAsDefaultFlag = false;
63 parameterCandidate = nullString;
64 widget = 0;
65 bp = 0;
66 token = NONE;
67}

◆ G4UIparameter() [3/3]

G4UIparameter::G4UIparameter ( const char *  theName,
char  theType,
G4bool  theOmittable 
)

Definition at line 69 of file G4UIparameter.cc.

69 :paramERR(0)
70{
71 parameterName = theName;
72 parameterType = theType;
73 omittable = theOmittable;
74 G4String nullString;
75 parameterGuidance = nullString;
76 defaultValue = nullString;
77 parameterRange = nullString;
78 currentAsDefaultFlag = false;
79 parameterCandidate = nullString;
80 widget = 0;
81 bp = 0;
82 token = NONE;
83}

◆ ~G4UIparameter()

G4UIparameter::~G4UIparameter ( )

Definition at line 85 of file G4UIparameter.cc.

86{ }

Member Function Documentation

◆ CheckNewValue()

G4int G4UIparameter::CheckNewValue ( const char *  newValue)

Definition at line 140 of file G4UIparameter.cc.

141 {
142 if( TypeCheck(newValue) == 0) return fParameterUnreadable;
143 if( ! parameterRange.isNull() )
144 { if( RangeCheck(newValue) == 0 ) return fParameterOutOfRange; }
145 if( ! parameterCandidate.isNull() )
146 { if( CandidateCheck(newValue) == 0 ) return fParameterOutOfCandidates; }
147 return 0; // succeeded
148}
@ fParameterOutOfCandidates
@ fParameterUnreadable
@ fParameterOutOfRange
G4bool isNull() const

◆ GetCurrentAsDefault()

G4bool G4UIparameter::GetCurrentAsDefault ( ) const
inline

Definition at line 130 of file G4UIparameter.hh.

131 { return currentAsDefaultFlag; }

Referenced by G4UIcommandTree::CreateHTML().

◆ GetDefaultValue()

G4String G4UIparameter::GetDefaultValue ( ) const
inline

◆ GetParameterCandidates()

G4String G4UIparameter::GetParameterCandidates ( ) const
inline

◆ GetParameterGuidance()

const G4String G4UIparameter::GetParameterGuidance ( ) const
inline

Definition at line 136 of file G4UIparameter.hh.

137 { return parameterGuidance; }

◆ GetParameterName()

G4String G4UIparameter::GetParameterName ( ) const
inline

Definition at line 109 of file G4UIparameter.hh.

110 { return parameterName; }

Referenced by G4UIcommandTree::CreateHTML(), and G4UImanager::GetCurrentStringValue().

◆ GetParameterRange()

G4String G4UIparameter::GetParameterRange ( ) const
inline

Definition at line 103 of file G4UIparameter.hh.

104 { return parameterRange; }

Referenced by G4UIcommandTree::CreateHTML().

◆ GetParameterType()

char G4UIparameter::GetParameterType ( ) const
inline

Definition at line 91 of file G4UIparameter.hh.

92 { return parameterType; }

Referenced by G4UIcommandTree::CreateHTML().

◆ IsOmittable()

G4bool G4UIparameter::IsOmittable ( ) const
inline

◆ List()

void G4UIparameter::List ( )

Definition at line 98 of file G4UIparameter.cc.

99{
100 G4cout << G4endl << "Parameter : " << parameterName << G4endl;
101 if( ! parameterGuidance.isNull() )
102 G4cout << parameterGuidance << G4endl ;
103 G4cout << " Parameter type : " << parameterType << G4endl;
104 if(omittable)
105 { G4cout << " Omittable : True" << G4endl; }
106 else
107 { G4cout << " Omittable : False" << G4endl; }
108 if( currentAsDefaultFlag )
109 { G4cout << " Default value : taken from the current value" << G4endl; }
110 else if( ! defaultValue.isNull() )
111 { G4cout << " Default value : " << defaultValue << G4endl; }
112 if( ! parameterRange.isNull() )
113 G4cout << " Parameter range : " << parameterRange << G4endl;
114 if( ! parameterCandidate.isNull() )
115 G4cout << " Candidates : " << parameterCandidate << G4endl;
116}
#define G4endl
Definition: G4ios.hh:52
G4DLLIMPORT std::ostream G4cout

◆ operator!=()

G4int G4UIparameter::operator!= ( const G4UIparameter right) const

Definition at line 93 of file G4UIparameter.cc.

94{
95 return ( this != &right );
96}

◆ operator==()

G4int G4UIparameter::operator== ( const G4UIparameter right) const

Definition at line 88 of file G4UIparameter.cc.

89{
90 return ( this == &right );
91}

◆ SetCurrentAsDefault()

◆ SetDefaultValue() [1/3]

void G4UIparameter::SetDefaultValue ( const char *  theDefaultValue)
inline

Definition at line 83 of file G4UIparameter.hh.

84 { defaultValue = theDefaultValue; }

Referenced by G4AdjointSimMessenger::G4AdjointSimMessenger(), G4EnergyLossMessenger::G4EnergyLossMessenger(), G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger(), G4GMocrenMessenger::G4GMocrenMessenger(), G4InteractorMessenger::G4InteractorMessenger(), G4MatScanMessenger::G4MatScanMessenger(), G4ParticleGunMessenger::G4ParticleGunMessenger(), G4PolarizationMessenger::G4PolarizationMessenger(), G4ProcessManagerMessenger::G4ProcessManagerMessenger(), G4ProcessTableMessenger::G4ProcessTableMessenger(), G4RunMessenger::G4RunMessenger(), G4ScoringMessenger::G4ScoringMessenger(), G4UIcontrolMessenger::G4UIcontrolMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), G4VisCommandGeometrySetColour::G4VisCommandGeometrySetColour(), G4VisCommandGeometrySetDaughtersInvisible::G4VisCommandGeometrySetDaughtersInvisible(), G4VisCommandGeometrySetForceAuxEdgeVisible::G4VisCommandGeometrySetForceAuxEdgeVisible(), G4VisCommandGeometrySetForceLineSegmentsPerCircle::G4VisCommandGeometrySetForceLineSegmentsPerCircle(), G4VisCommandGeometrySetForceSolid::G4VisCommandGeometrySetForceSolid(), G4VisCommandGeometrySetForceWireframe::G4VisCommandGeometrySetForceWireframe(), G4VisCommandGeometrySetLineStyle::G4VisCommandGeometrySetLineStyle(), G4VisCommandGeometrySetLineWidth::G4VisCommandGeometrySetLineWidth(), G4VisCommandGeometrySetVisibility::G4VisCommandGeometrySetVisibility(), G4VisCommandOpen::G4VisCommandOpen(), G4VisCommandSceneAddArrow::G4VisCommandSceneAddArrow(), G4VisCommandSceneAddAxes::G4VisCommandSceneAddAxes(), G4VisCommandSceneAddLine::G4VisCommandSceneAddLine(), G4VisCommandSceneAddLogo::G4VisCommandSceneAddLogo(), G4VisCommandSceneAddScale::G4VisCommandSceneAddScale(), G4VisCommandSceneAddText::G4VisCommandSceneAddText(), G4VisCommandSceneAddText2D::G4VisCommandSceneAddText2D(), G4VisCommandSetColour::G4VisCommandSetColour(), G4VisCommandSetTextColour::G4VisCommandSetTextColour(), G4VisCommandSpecify::G4VisCommandSpecify(), G4VisCommandsTouchableSet::G4VisCommandsTouchableSet(), G4VisCommandsViewerSet::G4VisCommandsViewerSet(), G4VisCommandViewerCreate::G4VisCommandViewerCreate(), G4UIcmdWith3VectorAndUnit::SetDefaultUnit(), G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), G4UIcmdWithAString::SetDefaultValue(), G4GenericMessenger::Command::SetDefaultValue(), G4UIcmdWithABool::SetDefaultValue(), G4UIcmdWithADouble::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcmdWithNucleusLimits::SetDefaultValue(), G4UIcmdWith3Vector::SetDefaultValue(), and G4UIcmdWith3VectorAndUnit::SetDefaultValue().

◆ SetDefaultValue() [2/3]

void G4UIparameter::SetDefaultValue ( G4double  theDefaultValue)

Definition at line 125 of file G4UIparameter.cc.

126{
127 std::ostringstream os;
128 os << theDefaultValue;
129 defaultValue = os.str();
130}

◆ SetDefaultValue() [3/3]

void G4UIparameter::SetDefaultValue ( G4int  theDefaultValue)

Definition at line 118 of file G4UIparameter.cc.

119{
120 std::ostringstream os;
121 os << theDefaultValue;
122 defaultValue = os.str();
123}

◆ SetGuidance()

void G4UIparameter::SetGuidance ( const char *  theGuidance)
inline

Definition at line 138 of file G4UIparameter.hh.

139 { parameterGuidance = theGuidance; }

Referenced by G4EnergyLossMessenger::G4EnergyLossMessenger(), G4RadioactiveDecaymessenger::G4RadioactiveDecaymessenger(), G4VisCommandGeometrySetColour::G4VisCommandGeometrySetColour(), G4VisCommandGeometrySetDaughtersInvisible::G4VisCommandGeometrySetDaughtersInvisible(), G4VisCommandGeometrySetForceAuxEdgeVisible::G4VisCommandGeometrySetForceAuxEdgeVisible(), G4VisCommandGeometrySetForceLineSegmentsPerCircle::G4VisCommandGeometrySetForceLineSegmentsPerCircle(), G4VisCommandGeometrySetForceSolid::G4VisCommandGeometrySetForceSolid(), G4VisCommandGeometrySetForceWireframe::G4VisCommandGeometrySetForceWireframe(), G4VisCommandGeometrySetLineStyle::G4VisCommandGeometrySetLineStyle(), G4VisCommandGeometrySetLineWidth::G4VisCommandGeometrySetLineWidth(), G4VisCommandGeometrySetVisibility::G4VisCommandGeometrySetVisibility(), G4VisCommandOpen::G4VisCommandOpen(), G4VisCommandSceneAddAxes::G4VisCommandSceneAddAxes(), G4VisCommandSceneAddLogo::G4VisCommandSceneAddLogo(), G4VisCommandSceneAddScale::G4VisCommandSceneAddScale(), G4VisCommandSceneAddText::G4VisCommandSceneAddText(), G4VisCommandSceneAddText2D::G4VisCommandSceneAddText2D(), G4VisCommandSetColour::G4VisCommandSetColour(), G4VisCommandSetTextColour::G4VisCommandSetTextColour(), G4VisCommandSetTouchable::G4VisCommandSetTouchable(), G4VisCommandsTouchableSet::G4VisCommandsTouchableSet(), G4VisCommandsViewerSet::G4VisCommandsViewerSet(), and G4VisCommandViewerCreate::G4VisCommandViewerCreate().

◆ SetOmittable()

◆ SetParameterCandidates()

◆ SetParameterName()

◆ SetParameterRange()

◆ SetWidget()

void G4UIparameter::SetWidget ( G4int  theWidget)
inline

Definition at line 134 of file G4UIparameter.hh.

135 { widget = theWidget; }

The documentation for this class was generated from the following files: