Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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.

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.

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.

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.

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

Here is the call graph for this function:

G4bool G4UIparameter::GetCurrentAsDefault ( ) const
inline

Definition at line 130 of file G4UIparameter.hh.

131  { return currentAsDefaultFlag; }

Here is the caller graph for this function:

G4String G4UIparameter::GetDefaultValue ( ) const
inline

Definition at line 89 of file G4UIparameter.hh.

90  { return defaultValue; }

Here is the caller graph for this function:

G4String G4UIparameter::GetParameterCandidates ( ) const
inline

Definition at line 118 of file G4UIparameter.hh.

119  { return parameterCandidate; }

Here is the caller graph for this function:

const G4String G4UIparameter::GetParameterGuidance ( ) const
inline

Definition at line 136 of file G4UIparameter.hh.

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

Definition at line 109 of file G4UIparameter.hh.

110  { return parameterName; }

Here is the caller graph for this function:

G4String G4UIparameter::GetParameterRange ( ) const
inline

Definition at line 103 of file G4UIparameter.hh.

104  { return parameterRange; }

Here is the caller graph for this function:

char G4UIparameter::GetParameterType ( ) const
inline

Definition at line 91 of file G4UIparameter.hh.

92  { return parameterType; }

Here is the caller graph for this function:

G4bool G4UIparameter::IsOmittable ( ) const
inline

Definition at line 124 of file G4UIparameter.hh.

125  { return omittable; }

Here is the caller graph for this function:

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

Here is the call graph for this function:

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

Definition at line 128 of file G4UIparameter.hh.

129  { currentAsDefaultFlag = val; }

Here is the caller graph for this function:

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

Definition at line 83 of file G4UIparameter.hh.

84  { defaultValue = theDefaultValue; }

Here is the caller graph for this function:

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.

139  { parameterGuidance = theGuidance; }

Here is the caller graph for this function:

void G4UIparameter::SetOmittable ( G4bool  om)
inline

Definition at line 122 of file G4UIparameter.hh.

123  { omittable = om; }

Here is the caller graph for this function:

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

Definition at line 113 of file G4UIparameter.hh.

114  { parameterCandidate = theString; }

Here is the caller graph for this function:

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

Definition at line 107 of file G4UIparameter.hh.

108  { parameterName = theName; }

Here is the caller graph for this function:

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

Definition at line 95 of file G4UIparameter.hh.

96  { parameterRange = theRange; }

Here is the caller graph for this function:

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: