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.

00037                             :paramERR(0)
00038 {
00039   G4String nullString;
00040   parameterName = nullString;
00041   parameterType = '\0';
00042   omittable = false;
00043   parameterGuidance = nullString;
00044   defaultValue = nullString;
00045   parameterRange = nullString;
00046   currentAsDefaultFlag = false;
00047   parameterCandidate = nullString;
00048   widget = 0;
00049   bp = 0;
00050   token = NONE;
00051 }

G4UIparameter::G4UIparameter ( char  theType  ) 

Definition at line 53 of file G4UIparameter.cc.

References NONE.

00053                                         :paramERR(0)
00054 {
00055   G4String nullString;
00056   parameterName = nullString;
00057   parameterType = theType;
00058   omittable = false;
00059   parameterGuidance = nullString;
00060   defaultValue = nullString;
00061   parameterRange = nullString;
00062   currentAsDefaultFlag = false;
00063   parameterCandidate = nullString;
00064   widget = 0;
00065   bp = 0;
00066   token = NONE;
00067 }

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

Definition at line 69 of file G4UIparameter.cc.

References NONE.

00069                                                                                    :paramERR(0)
00070 {
00071   parameterName = theName;
00072   parameterType = theType;
00073   omittable = theOmittable;
00074   G4String nullString;
00075   parameterGuidance = nullString;
00076   defaultValue = nullString;
00077   parameterRange = nullString;
00078   currentAsDefaultFlag = false;
00079   parameterCandidate = nullString;
00080   widget = 0;
00081   bp = 0;
00082   token = NONE;
00083 }

G4UIparameter::~G4UIparameter (  ) 

Definition at line 85 of file G4UIparameter.cc.

00086 { }


Member Function Documentation

G4int G4UIparameter::CheckNewValue ( const char *  newValue  ) 

Definition at line 141 of file G4UIparameter.cc.

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

00141                                      {
00142     if( TypeCheck(newValue) == 0) return fParameterUnreadable;
00143     if( ! parameterRange.isNull() )
00144     { if( RangeCheck(newValue) == 0 ) return fParameterOutOfRange; }
00145     if( ! parameterCandidate.isNull() )
00146     { if( CandidateCheck(newValue) == 0 ) return fParameterOutOfCandidates; }
00147     return 0;   // succeeded
00148 }

G4bool G4UIparameter::GetCurrentAsDefault (  )  const [inline]

Definition at line 130 of file G4UIparameter.hh.

00131       { return currentAsDefaultFlag; }

G4String G4UIparameter::GetDefaultValue (  )  const [inline]

Definition at line 89 of file G4UIparameter.hh.

Referenced by G4UIcmdWithADoubleAndUnit::ConvertToStringWithDefaultUnit(), and G4UIcmdWith3VectorAndUnit::ConvertToStringWithDefaultUnit().

00090       { return defaultValue; }

G4String G4UIparameter::GetParameterCandidates (  )  const [inline]

Definition at line 118 of file G4UIparameter.hh.

Referenced by G4UIcmdWithADoubleAndUnit::ConvertToStringWithBestUnit(), and G4UIcmdWith3VectorAndUnit::ConvertToStringWithBestUnit().

00119       { return parameterCandidate; }

const G4String G4UIparameter::GetParameterGuidance (  )  const [inline]

Definition at line 136 of file G4UIparameter.hh.

00137       { return parameterGuidance; }

G4String G4UIparameter::GetParameterName (  )  const [inline]

Definition at line 109 of file G4UIparameter.hh.

Referenced by G4UImanager::GetCurrentStringValue().

00110       { return parameterName; }

G4String G4UIparameter::GetParameterRange (  )  const [inline]

Definition at line 103 of file G4UIparameter.hh.

00104       { return parameterRange; }

char G4UIparameter::GetParameterType (  )  const [inline]

Definition at line 91 of file G4UIparameter.hh.

00092       { return parameterType; }

G4bool G4UIparameter::IsOmittable (  )  const [inline]

Definition at line 124 of file G4UIparameter.hh.

Referenced by G4UIcmdWithADoubleAndUnit::ConvertToStringWithDefaultUnit(), and G4UIcmdWith3VectorAndUnit::ConvertToStringWithDefaultUnit().

00125       { return omittable; }

void G4UIparameter::List (  ) 

Definition at line 98 of file G4UIparameter.cc.

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

00099 {
00100   G4cout << G4endl << "Parameter : " << parameterName << G4endl;
00101   if( ! parameterGuidance.isNull() )
00102   G4cout << parameterGuidance << G4endl ;
00103   G4cout << " Parameter type  : " << parameterType << G4endl;
00104   if(omittable)
00105   { G4cout << " Omittable       : True" << G4endl; }
00106   else
00107   { G4cout << " Omittable       : False" << G4endl; }
00108   if( currentAsDefaultFlag )
00109   { G4cout << " Default value   : taken from the current value" << G4endl; }
00110   else if( ! defaultValue.isNull() )
00111   { G4cout << " Default value   : " << defaultValue << G4endl; }
00112   if( ! parameterRange.isNull() )
00113   G4cout << " Parameter range : " << parameterRange << G4endl;
00114   if( ! parameterCandidate.isNull() )
00115   G4cout << " Candidates      : " << parameterCandidate << G4endl;
00116 }

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

Definition at line 93 of file G4UIparameter.cc.

00094 {
00095   return ( this != &right );
00096 }

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

Definition at line 88 of file G4UIparameter.cc.

00089 {
00090   return ( this == &right );
00091 }

void G4UIparameter::SetCurrentAsDefault ( G4bool  val  )  [inline]

Definition at line 128 of file G4UIparameter.hh.

Referenced by G4UIcmdWithNucleusLimits::SetParameterName(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithABool::SetParameterName(), G4UIcmdWith3VectorAndUnit::SetParameterName(), G4UIcmdWith3Vector::SetParameterName(), and G4GenericMessenger::Command::SetParameterName().

00129       { currentAsDefaultFlag = val; }

void G4UIparameter::SetDefaultValue ( G4double  theDefaultValue  ) 

Definition at line 125 of file G4UIparameter.cc.

00126 {
00127   std::ostringstream os;
00128   os << theDefaultValue;
00129   defaultValue = os.str();
00130 }

void G4UIparameter::SetDefaultValue ( G4int  theDefaultValue  ) 

Definition at line 118 of file G4UIparameter.cc.

00119 {
00120   std::ostringstream os;
00121   os << theDefaultValue;
00122   defaultValue = os.str();
00123 }

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

Definition at line 83 of file G4UIparameter.hh.

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(), G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), G4UIcmdWith3VectorAndUnit::SetDefaultUnit(), G4UIcmdWithNucleusLimits::SetDefaultValue(), G4UIcmdWithAString::SetDefaultValue(), G4UIcmdWithAnInteger::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcmdWithADouble::SetDefaultValue(), G4UIcmdWithABool::SetDefaultValue(), G4UIcmdWith3VectorAndUnit::SetDefaultValue(), G4UIcmdWith3Vector::SetDefaultValue(), and G4GenericMessenger::Command::SetDefaultValue().

00084       { defaultValue = theDefaultValue; }

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

Definition at line 138 of file G4UIparameter.hh.

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

00139       { parameterGuidance = theGuidance; }

void G4UIparameter::SetOmittable ( G4bool  om  )  [inline]

Definition at line 122 of file G4UIparameter.hh.

Referenced by G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), G4UIcmdWith3VectorAndUnit::SetDefaultUnit(), G4UIcmdWithNucleusLimits::SetParameterName(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithABool::SetParameterName(), G4UIcmdWith3VectorAndUnit::SetParameterName(), G4UIcmdWith3Vector::SetParameterName(), and G4GenericMessenger::Command::SetParameterName().

00123       { omittable = om; }

void G4UIparameter::SetParameterCandidates ( const char *  theString  )  [inline]

Definition at line 113 of file G4UIparameter.hh.

Referenced by G4EnergyLossMessenger::G4EnergyLossMessenger(), G4InteractorMessenger::G4InteractorMessenger(), G4MatScanMessenger::G4MatScanMessenger(), G4UIcontrolMessenger::G4UIcontrolMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), G4VisCommandGeometrySetLineStyle::G4VisCommandGeometrySetLineStyle(), G4VisCommandOpen::G4VisCommandOpen(), G4VisCommandsViewerSet::G4VisCommandsViewerSet(), G4ProcessTableMessenger::GetCurrentValue(), G4UIcmdWithAString::SetCandidates(), G4GenericMessenger::Command::SetCandidates(), G4UIcmdWithADoubleAndUnit::SetUnitCandidates(), and G4UIcmdWith3VectorAndUnit::SetUnitCandidates().

00114       { parameterCandidate = theString; }

void G4UIparameter::SetParameterName ( const char *  theName  )  [inline]

Definition at line 107 of file G4UIparameter.hh.

Referenced by G4UIcmdWith3VectorAndUnit::G4UIcmdWith3VectorAndUnit(), G4UIcmdWithADoubleAndUnit::G4UIcmdWithADoubleAndUnit(), G4UIcmdWithNucleusLimits::SetParameterName(), G4UIcmdWithAString::SetParameterName(), G4UIcmdWithAnInteger::SetParameterName(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcmdWithADouble::SetParameterName(), G4UIcmdWithABool::SetParameterName(), G4UIcmdWith3VectorAndUnit::SetParameterName(), G4UIcmdWith3Vector::SetParameterName(), and G4GenericMessenger::Command::SetParameterName().

00108       { parameterName = theName; }

void G4UIparameter::SetParameterRange ( const char *  theRange  )  [inline]

Definition at line 95 of file G4UIparameter.hh.

Referenced by G4AdjointSimMessenger::G4AdjointSimMessenger(), G4EnergyLossMessenger::G4EnergyLossMessenger(), G4GMocrenMessenger::G4GMocrenMessenger(), G4MatScanMessenger::G4MatScanMessenger(), G4RadioactiveDecaymessenger::G4RadioactiveDecaymessenger(), G4RunMessenger::G4RunMessenger(), G4ScoringMessenger::G4ScoringMessenger(), G4UIcontrolMessenger::G4UIcontrolMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), and G4VisCommandsViewerSet::G4VisCommandsViewerSet().

00096       { parameterRange = theRange; }

void G4UIparameter::SetWidget ( G4int  theWidget  )  [inline]

Definition at line 134 of file G4UIparameter.hh.

00135       { widget = theWidget; }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:37 2013 for Geant4 by  doxygen 1.4.7