#include <G4UIparameter.hh>
Definition at line 47 of file G4UIparameter.hh.
◆ G4UIparameter() [1/3]
G4UIparameter::G4UIparameter |
( |
| ) |
|
Definition at line 37 of file G4UIparameter.cc.
G4bool currentAsDefaultFlag
G4String parameterCandidate
G4String parameterGuidance
◆ G4UIparameter() [2/3]
G4UIparameter::G4UIparameter |
( |
char |
theType | ) |
|
Definition at line 53 of file G4UIparameter.cc.
G4bool currentAsDefaultFlag
G4String parameterCandidate
G4String parameterGuidance
◆ G4UIparameter() [3/3]
G4UIparameter::G4UIparameter |
( |
const char * |
theName, |
|
|
char |
theType, |
|
|
G4bool |
theOmittable |
|
) |
| |
Definition at line 69 of file G4UIparameter.cc.
G4bool currentAsDefaultFlag
G4String parameterCandidate
G4String parameterGuidance
◆ ~G4UIparameter()
G4UIparameter::~G4UIparameter |
( |
| ) |
|
◆ AdditiveExpression()
yystype G4UIparameter::AdditiveExpression |
( |
void |
| ) |
|
|
private |
Definition at line 461 of file G4UIparameter.cc.
464 if(
token !=
'+' &&
token !=
'-' )
return result;
465 G4cerr <<
"Parameter range: operator " 467 <<
" is not supported." <<
G4endl;
yystype MultiplicativeExpression(void)
G4GLOB_DLL std::ostream G4cerr
◆ Backslash()
◆ CandidateCheck()
G4int G4UIparameter::CandidateCheck |
( |
const char * |
newValue | ) |
|
|
private |
Definition at line 151 of file G4UIparameter.cc.
155 while( ! (aToken=candidateTokenizer()).isNull() )
158 if(aToken==newValue)
return iToken;
160 G4cerr <<
"parameter value (" << newValue
161 <<
") is not listed in the candidate List." <<
G4endl;
G4String parameterCandidate
G4GLOB_DLL std::ostream G4cerr
◆ CheckNewValue()
G4int G4UIparameter::CheckNewValue |
( |
const char * |
newValue | ) |
|
Definition at line 141 of file G4UIparameter.cc.
G4int CandidateCheck(const char *newValue)
G4String parameterCandidate
G4int RangeCheck(const char *newValue)
G4int TypeCheck(const char *newValue)
◆ CompareDouble()
G4int G4UIparameter::CompareDouble |
( |
double |
arg1, |
|
|
G4int |
op, |
|
|
double |
arg2 |
|
) |
| |
|
private |
Definition at line 640 of file G4UIparameter.cc.
645 case GT: result = ( arg1 > arg2); opr=
">";
break;
646 case GE: result = ( arg1 >= arg2); opr=
">=";
break;
647 case LT: result = ( arg1 < arg2); opr=
"<";
break;
648 case LE: result = ( arg1 <= arg2); opr=
"<=";
break;
649 case EQ: result = ( arg1 == arg2); opr=
"==";
break;
650 case NE: result = ( arg1 != arg2); opr=
"!=";
break;
652 G4cerr <<
"Parameter range: error at CompareDouble" <<
G4endl;
656 G4cerr <<
"CompareDouble " 657 << arg1 <<
" " << opr <<
" "<< arg2
658 <<
" result: " << result
G4GLOB_DLL std::ostream G4cerr
◆ CompareInt()
Definition at line 615 of file G4UIparameter.cc.
620 case GT: result = ( arg1 > arg2); opr=
">" ;
break;
621 case GE: result = ( arg1 >= arg2); opr=
">=";
break;
622 case LT: result = ( arg1 < arg2); opr=
"<" ;
break;
623 case LE: result = ( arg1 <= arg2); opr=
"<=";
break;
624 case EQ: result = ( arg1 == arg2); opr=
"==";
break;
625 case NE: result = ( arg1 != arg2); opr=
"!=";
break;
627 G4cerr <<
"Parameter range: error at CompareInt" <<
G4endl;
632 << arg1 <<
" " << opr << arg2
633 <<
" result: " << result
G4GLOB_DLL std::ostream G4cerr
◆ EqualityExpression()
yystype G4UIparameter::EqualityExpression |
( |
void |
| ) |
|
|
private |
Definition at line 401 of file G4UIparameter.cc.
415 result.
I =
Eval2( arg1, operat, arg2 );
422 G4cerr <<
"Parameter range: error at EqualityExpression" yystype RelationalExpression(void)
G4int Eval2(yystype arg1, G4int op, yystype arg2)
G4GLOB_DLL std::ostream G4cerr
◆ Eval2()
Definition at line 559 of file G4UIparameter.cc.
563 <<
": meaningless comparison " 574 G4cerr <<
"integer operand expected for " 595 G4cerr <<
"integer operand expected for " 610 G4cerr <<
"no param name is specified at the param range."<<
G4endl;
G4int CompareDouble(double arg1, G4int op, double arg2)
G4int CompareInt(G4int arg1, G4int op, G4int arg2)
G4GLOB_DLL std::ostream G4cerr
◆ ExpectExponent()
G4int G4UIparameter::ExpectExponent |
( |
const char * |
str | ) |
|
|
private |
Definition at line 252 of file G4UIparameter.cc.
255 if(
IsInt( str, maxExplength=7 ))
return 1;
G4int IsInt(const char *str, short maxDigit)
◆ Expression()
yystype G4UIparameter::Expression |
( |
void |
| ) |
|
|
private |
Definition at line 319 of file G4UIparameter.cc.
G4GLOB_DLL std::ostream G4cerr
yystype LogicalORExpression(void)
◆ Follow()
◆ G4UIpGetc()
G4int G4UIparameter::G4UIpGetc |
( |
void |
| ) |
|
|
private |
◆ G4UIpUngetc()
◆ GetCurrentAsDefault()
G4bool G4UIparameter::GetCurrentAsDefault |
( |
| ) |
const |
|
inline |
◆ GetDefaultValue()
G4String G4UIparameter::GetDefaultValue |
( |
| ) |
const |
|
inline |
◆ GetParameterCandidates()
G4String G4UIparameter::GetParameterCandidates |
( |
| ) |
const |
|
inline |
◆ GetParameterGuidance()
const G4String G4UIparameter::GetParameterGuidance |
( |
| ) |
const |
|
inline |
◆ GetParameterName()
G4String G4UIparameter::GetParameterName |
( |
| ) |
const |
|
inline |
◆ GetParameterRange()
G4String G4UIparameter::GetParameterRange |
( |
| ) |
const |
|
inline |
◆ GetParameterType()
char G4UIparameter::GetParameterType |
( |
| ) |
const |
|
inline |
◆ IsDouble()
G4int G4UIparameter::IsDouble |
( |
const char * |
str | ) |
|
|
private |
Definition at line 260 of file G4UIparameter.cc.
264 case '+':
case '-': ++p;
266 while( isdigit( (
G4int)(*p) )) { ++p; }
272 if( *p ==
'\0' )
return 1;
275 while( isdigit( (
G4int)(*p) )) { ++p; }
276 if( *p ==
'\0' )
return 1;
278 }
else return 0;
break;
282 if( *p ==
'.' ) { ++p;
284 while( isdigit( (
G4int)(*p) )) { ++p; }
285 if( *p ==
'\0' )
return 1;
292 while( isdigit( (
G4int)(*p) )) { ++p; }
293 if( *p ==
'\0' )
return 1;
298 while( isdigit( (
G4int)(*p) )) { ++p; }
299 if( *p ==
'\0' )
return 1;
301 if( *p ==
'.' ) { ++p;
302 if( *p ==
'\0' )
return 1;
305 while( isdigit( (
G4int)(*p) )) { ++p; }
306 if( *p ==
'\0' )
return 1;
G4int ExpectExponent(const char *str)
◆ IsInt()
G4int G4UIparameter::IsInt |
( |
const char * |
str, |
|
|
short |
maxDigit |
|
) |
| |
|
private |
Definition at line 228 of file G4UIparameter.cc.
232 if( *p ==
'+' || *p ==
'-') { ++p; }
233 if( isdigit( (
G4int)(*p) )) {
234 while( isdigit( (
G4int)(*p) )) { ++p; ++length; }
236 if( length > maxDigits) {
G4GLOB_DLL std::ostream G4cerr
◆ IsOmittable()
G4bool G4UIparameter::IsOmittable |
( |
| ) |
const |
|
inline |
◆ List()
void G4UIparameter::List |
( |
| ) |
|
Definition at line 98 of file G4UIparameter.cc.
109 {
G4cout <<
" Default value : taken from the current value" <<
G4endl; }
G4bool currentAsDefaultFlag
G4String parameterCandidate
G4GLOB_DLL std::ostream G4cout
G4String parameterGuidance
◆ LogicalANDExpression()
yystype G4UIparameter::LogicalANDExpression |
( |
void |
| ) |
|
|
private |
Definition at line 365 of file G4UIparameter.cc.
372 G4cerr <<
"Parameter range: illegal type at '&&'" <<
G4endl;
381 G4cerr <<
"Parameter range: illegal type at '&&'" <<
G4endl;
389 result.
I *= (p.
D != 0.0);
yystype EqualityExpression(void)
G4GLOB_DLL std::ostream G4cerr
◆ LogicalORExpression()
yystype G4UIparameter::LogicalORExpression |
( |
void |
| ) |
|
|
private |
Definition at line 330 of file G4UIparameter.cc.
337 G4cerr <<
"Parameter range: illegal type at '||'" <<
G4endl;
346 G4cerr <<
"Parameter range: illegal type at '||'" <<
G4endl;
354 result.
I += (p.
D != 0.0);
yystype LogicalANDExpression(void)
G4GLOB_DLL std::ostream G4cerr
◆ MultiplicativeExpression()
yystype G4UIparameter::MultiplicativeExpression |
( |
void |
| ) |
|
|
private |
Definition at line 473 of file G4UIparameter.cc.
477 G4cerr <<
"Parameter range: operator " 479 <<
" is not supported." <<
G4endl;
yystype UnaryExpression(void)
G4GLOB_DLL std::ostream G4cerr
◆ operator!=()
◆ operator==()
◆ PrimaryExpression()
yystype G4UIparameter::PrimaryExpression |
( |
void |
| ) |
|
|
private |
◆ RangeCheck()
G4int G4UIparameter::RangeCheck |
( |
const char * |
newValue | ) |
|
|
private |
Definition at line 166 of file G4UIparameter.cc.
169 std::istringstream is(newValue);
172 case 'D': { is >>
newVal.
D; }
break;
173 case 'I': { is >>
newVal.
I; }
break;
181 G4cerr <<
"Illegal Expression in parameter range." <<
G4endl;
184 if ( result.
I )
return 1;
G4GLOB_DLL std::ostream G4cerr
◆ RelationalExpression()
yystype G4UIparameter::RelationalExpression |
( |
void |
| ) |
|
|
private |
Definition at line 432 of file G4UIparameter.cc.
446 result.
I =
Eval2( arg1, operat, arg2 );
yystype AdditiveExpression(void)
G4int Eval2(yystype arg1, G4int op, yystype arg2)
G4GLOB_DLL std::ostream G4cerr
◆ SetCurrentAsDefault()
void G4UIparameter::SetCurrentAsDefault |
( |
G4bool |
val | ) |
|
|
inline |
◆ SetDefaultValue() [1/3]
void G4UIparameter::SetDefaultValue |
( |
const char * |
theDefaultValue | ) |
|
|
inline |
◆ SetDefaultValue() [2/3]
void G4UIparameter::SetDefaultValue |
( |
G4int |
theDefaultValue | ) |
|
Definition at line 118 of file G4UIparameter.cc.
120 std::ostringstream os;
121 os << theDefaultValue;
◆ SetDefaultValue() [3/3]
void G4UIparameter::SetDefaultValue |
( |
G4double |
theDefaultValue | ) |
|
Definition at line 125 of file G4UIparameter.cc.
127 std::ostringstream os;
128 os << theDefaultValue;
◆ SetGuidance()
void G4UIparameter::SetGuidance |
( |
const char * |
theGuidance | ) |
|
|
inline |
◆ SetOmittable()
void G4UIparameter::SetOmittable |
( |
G4bool |
om | ) |
|
|
inline |
◆ SetParameterCandidates()
void G4UIparameter::SetParameterCandidates |
( |
const char * |
theString | ) |
|
|
inline |
◆ SetParameterName()
void G4UIparameter::SetParameterName |
( |
const char * |
theName | ) |
|
|
inline |
◆ SetParameterRange()
void G4UIparameter::SetParameterRange |
( |
const char * |
theRange | ) |
|
|
inline |
◆ SetWidget()
void G4UIparameter::SetWidget |
( |
G4int |
theWidget | ) |
|
|
inline |
◆ TokenToStr()
◆ TypeCheck()
G4int G4UIparameter::TypeCheck |
( |
const char * |
newValue | ) |
|
|
private |
Definition at line 191 of file G4UIparameter.cc.
197 if(
IsDouble(newValueString.data())== 0) {
198 G4cerr<<newValue<<
": double value expected." 203 if(
IsInt(newValueString.data(),20)== 0) {
204 G4cerr<<newValue<<
": integer expected." 210 newValueString.toUpper();
211 if ( newValueString ==
"Y" || newValueString ==
"N" 212 ||newValueString ==
"YES" || newValueString ==
"NO" 213 ||newValueString ==
"1" || newValueString ==
"0" 214 ||newValueString ==
"T" || newValueString ==
"F" 215 ||newValueString ==
"TRUE" || newValueString ==
"FALSE")
G4int IsDouble(const char *str)
G4int IsInt(const char *str, short maxDigit)
G4GLOB_DLL std::ostream G4cerr
◆ UnaryExpression()
yystype G4UIparameter::UnaryExpression |
( |
void |
| ) |
|
|
private |
Definition at line 485 of file G4UIparameter.cc.
509 G4cerr <<
"Parameter range error: " 510 <<
"operator '!' is not supported (sorry)."
yystype UnaryExpression(void)
yystype PrimaryExpression(void)
G4GLOB_DLL std::ostream G4cerr
◆ Yylex()
Definition at line 667 of file G4UIparameter.cc.
672 while(( c=
G4UIpGetc())==
' '|| c==
'\t' || c==
'\n' )
677 if (isdigit(c) || c==
'.') {
681 }
while (c==
'.' || isdigit(c) ||
682 c==
'e' || c==
'E' || c==
'+' || c==
'-');
685 std::istringstream is(t);
698 if (isalpha(c)|| c==
'_') {
701 }
while ((c=
G4UIpGetc()) != EOF && (isalnum(c) || c==
'_'));
G4int IsDouble(const char *str)
const char * data() const
G4int Follow(G4int expect, G4int ifyes, G4int ifno)
G4int G4UIpUngetc(G4int c)
G4int IsInt(const char *str, short maxDigit)
G4GLOB_DLL std::ostream G4cerr
◆ bp
◆ currentAsDefaultFlag
G4bool G4UIparameter::currentAsDefaultFlag |
|
private |
◆ defaultValue
◆ newVal
◆ omittable
G4bool G4UIparameter::omittable |
|
private |
◆ paramERR
G4int G4UIparameter::paramERR |
|
private |
◆ parameterCandidate
G4String G4UIparameter::parameterCandidate |
|
private |
◆ parameterGuidance
G4String G4UIparameter::parameterGuidance |
|
private |
◆ parameterName
◆ parameterRange
◆ parameterType
char G4UIparameter::parameterType |
|
private |
◆ rangeBuf
◆ token
◆ widget
G4int G4UIparameter::widget |
|
private |
◆ yylval
The documentation for this class was generated from the following files: