Geant4.10
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions
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::G4UIparameter ( )

Definition at line 37 of file G4UIparameter.cc.

References NONE.

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 }
G4UIparameter::G4UIparameter ( char  theType)

Definition at line 53 of file G4UIparameter.cc.

References NONE.

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::G4UIparameter ( const char *  theName,
char  theType,
G4bool  theOmittable 
)

Definition at line 69 of file G4UIparameter.cc.

References NONE.

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 ( )

Definition at line 85 of file G4UIparameter.cc.

86 { }

Member Function Documentation

G4int G4UIparameter::CheckNewValue ( const char *  newValue)

Definition at line 141 of file G4UIparameter.cc.

References fParameterOutOfCandidates, fParameterOutOfRange, fParameterUnreadable, and G4String::isNull().

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 }
G4bool isNull() const
G4bool G4UIparameter::GetCurrentAsDefault ( ) const
inline

Definition at line 130 of file G4UIparameter.hh.

Referenced by G4UIcommandTree::CreateHTML(), and export_G4UIparameter().

131  { return currentAsDefaultFlag; }
G4String G4UIparameter::GetDefaultValue ( ) const
inline
G4String G4UIparameter::GetParameterCandidates ( ) const
inline
const G4String G4UIparameter::GetParameterGuidance ( ) const
inline

Definition at line 136 of file G4UIparameter.hh.

Referenced by export_G4UIparameter().

137  { return parameterGuidance; }
G4String G4UIparameter::GetParameterName ( ) const
inline
G4String G4UIparameter::GetParameterRange ( ) const
inline

Definition at line 103 of file G4UIparameter.hh.

Referenced by G4UIcommandTree::CreateHTML(), and export_G4UIparameter().

104  { return parameterRange; }
char G4UIparameter::GetParameterType ( ) const
inline

Definition at line 91 of file G4UIparameter.hh.

Referenced by G4UIcommandTree::CreateHTML(), and export_G4UIparameter().

92  { return parameterType; }
G4bool G4UIparameter::IsOmittable ( ) const
inline
void G4UIparameter::List ( )

Definition at line 98 of file G4UIparameter.cc.

References G4cout, G4endl, and G4String::isNull().

Referenced by export_G4UIparameter().

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 }
G4GLOB_DLL std::ostream G4cout
#define G4endl
Definition: G4ios.hh:61
G4bool isNull() const
G4int G4UIparameter::operator!= ( const G4UIparameter right) const

Definition at line 93 of file G4UIparameter.cc.

94 {
95  return ( this != &right );
96 }
G4int G4UIparameter::operator== ( const G4UIparameter right) const

Definition at line 88 of file G4UIparameter.cc.

89 {
90  return ( this == &right );
91 }
void G4UIparameter::SetCurrentAsDefault ( G4bool  val)
inline
void G4UIparameter::SetDefaultValue ( const char *  theDefaultValue)
inline

Definition at line 83 of file G4UIparameter.hh.

Referenced by CexmcScenePrimitivesMessenger::CexmcScenePrimitivesMessenger(), DMXParticleSourceMessenger::DMXParticleSourceMessenger(), exrdmHistoMessenger::exrdmHistoMessenger(), G4AdjointSimMessenger::G4AdjointSimMessenger(), G4EmManagerMessenger::G4EmManagerMessenger(), G4EnergyLossMessenger::G4EnergyLossMessenger(), G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger(), G4GMocrenMessenger::G4GMocrenMessenger(), G4InteractorMessenger::G4InteractorMessenger(), G4LocalThreadCoutMessenger::G4LocalThreadCoutMessenger(), G4MatScanMessenger::G4MatScanMessenger(), G4MonopolePhysicsMessenger::G4MonopolePhysicsMessenger(), 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(), HistoMessenger::HistoMessenger(), G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), G4UIcmdWith3VectorAndUnit::SetDefaultUnit(), G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcmdWithADouble::SetDefaultValue(), G4UIcmdWithAString::SetDefaultValue(), G4UIcmdWith3Vector::SetDefaultValue(), G4UIcmdWithABool::SetDefaultValue(), G4GenericMessenger::Command::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcmdWith3VectorAndUnit::SetDefaultValue(), and G4UIcmdWithNucleusLimits::SetDefaultValue().

84  { defaultValue = theDefaultValue; }
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 }
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 }
void G4UIparameter::SetGuidance ( const char *  theGuidance)
inline

Definition at line 138 of file G4UIparameter.hh.

Referenced by CexmcScenePrimitivesMessenger::CexmcScenePrimitivesMessenger(), exrdmHistoMessenger::exrdmHistoMessenger(), exrdmMaterialMessenger::exrdmMaterialMessenger(), G4EmManagerMessenger::G4EmManagerMessenger(), G4EnergyLossMessenger::G4EnergyLossMessenger(), G4MonopolePhysicsMessenger::G4MonopolePhysicsMessenger(), G4RadioactiveDecaymessenger::G4RadioactiveDecaymessenger(), G4VisCommandGeometrySetColour::G4VisCommandGeometrySetColour(), G4VisCommandGeometrySetDaughtersInvisible::G4VisCommandGeometrySetDaughtersInvisible(), G4VisCommandGeometrySetForceAuxEdgeVisible::G4VisCommandGeometrySetForceAuxEdgeVisible(), G4VisCommandGeometrySetForceLineSegmentsPerCircle::G4VisCommandGeometrySetForceLineSegmentsPerCircle(), G4VisCommandGeometrySetForceSolid::G4VisCommandGeometrySetForceSolid(), G4VisCommandGeometrySetForceWireframe::G4VisCommandGeometrySetForceWireframe(), G4VisCommandGeometrySetLineStyle::G4VisCommandGeometrySetLineStyle(), G4VisCommandGeometrySetLineWidth::G4VisCommandGeometrySetLineWidth(), G4VisCommandGeometrySetVisibility::G4VisCommandGeometrySetVisibility(), G4VisCommandOpen::G4VisCommandOpen(), G4VisCommandSceneAddLogo::G4VisCommandSceneAddLogo(), G4VisCommandSceneAddScale::G4VisCommandSceneAddScale(), G4VisCommandSceneAddText::G4VisCommandSceneAddText(), G4VisCommandSceneAddText2D::G4VisCommandSceneAddText2D(), G4VisCommandSetColour::G4VisCommandSetColour(), G4VisCommandSetTextColour::G4VisCommandSetTextColour(), G4VisCommandSetTouchable::G4VisCommandSetTouchable(), G4VisCommandsViewerSet::G4VisCommandsViewerSet(), G4VisCommandViewerCreate::G4VisCommandViewerCreate(), HistoMessenger::HistoMessenger(), and RMC01AnalysisManagerMessenger::RMC01AnalysisManagerMessenger().

139  { parameterGuidance = theGuidance; }
void G4UIparameter::SetOmittable ( G4bool  om)
inline
void G4UIparameter::SetParameterCandidates ( const char *  theString)
inline
void G4UIparameter::SetParameterName ( const char *  theName)
inline
void G4UIparameter::SetParameterRange ( const char *  theRange)
inline
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: