Geant4-11
Public Member Functions | Protected Types | Private Member Functions | Private Attributes
G4UIparameter Class Reference

#include <G4UIparameter.hh>

Public Member Functions

G4int CheckNewValue (const char *newValue)
 
 G4UIparameter ()
 
 G4UIparameter (char theType)
 
 G4UIparameter (const char *theName, char theType, G4bool theOmittable)
 
G4bool GetCurrentAsDefault () const
 
const G4StringGetDefaultValue () const
 
const G4StringGetParameterCandidates () const
 
const G4StringGetParameterGuidance () const
 
const G4StringGetParameterName () const
 
const G4StringGetParameterRange () const
 
char GetParameterType () const
 
G4bool IsOmittable () const
 
void List ()
 
G4bool operator!= (const G4UIparameter &right) const
 
G4bool operator== (const G4UIparameter &right) const
 
void SetCurrentAsDefault (G4bool val)
 
void SetDefaultUnit (const char *theDefaultUnit)
 
void SetDefaultValue (const char *theDefaultValue)
 
void SetDefaultValue (G4double theDefaultValue)
 
void SetDefaultValue (G4int theDefaultValue)
 
void SetDefaultValue (G4long theDefaultValue)
 
void SetGuidance (const char *theGuidance)
 
void SetOmittable (G4bool om)
 
void SetParameterCandidates (const char *theString)
 
void SetParameterName (const char *pName)
 
void SetParameterRange (const char *theRange)
 
void SetWidget (G4int theWidget)
 
 ~G4UIparameter ()
 

Protected Types

using tokenNum = G4UItokenNum::tokenNum
 
using yystype = G4UItokenNum::yystype
 

Private Member Functions

yystype AdditiveExpression (void)
 
G4int Backslash (G4int c)
 
G4int CandidateCheck (const char *newValue)
 
G4int CompareDouble (double arg1, G4int op, double arg2)
 
G4int CompareInt (G4int arg1, G4int op, G4int arg2)
 
G4int CompareLong (G4long arg1, G4int op, G4long arg2)
 
yystype EqualityExpression (void)
 
G4int Eval2 (yystype arg1, G4int op, yystype arg2)
 
G4int ExpectExponent (const char *str)
 
yystype Expression (void)
 
G4int Follow (G4int expect, G4int ifyes, G4int ifno)
 
G4int G4UIpGetc (void)
 
G4int G4UIpUngetc (G4int c)
 
G4int IsDouble (const char *str)
 
G4int IsInt (const char *str, short maxDigit)
 
yystype LogicalANDExpression (void)
 
yystype LogicalORExpression (void)
 
yystype MultiplicativeExpression (void)
 
yystype PrimaryExpression (void)
 
G4int RangeCheck (const char *newValue)
 
yystype RelationalExpression (void)
 
G4int TypeCheck (const char *newValue)
 
yystype UnaryExpression (void)
 
tokenNum Yylex (void)
 

Private Attributes

G4int bp = 0
 
G4bool currentAsDefaultFlag = false
 
G4String defaultValue
 
yystype newVal
 
G4bool omittable = false
 
G4int paramERR = 0
 
G4String parameterCandidate
 
G4String parameterGuidance
 
G4String parameterName
 
G4String parameterRange
 
char parameterType = '\0'
 
G4String rangeBuf
 
tokenNum token = G4UItokenNum::NONE
 
G4int widget = 0
 
yystype yylval
 

Detailed Description

Definition at line 45 of file G4UIparameter.hh.

Member Typedef Documentation

◆ tokenNum

Definition at line 135 of file G4UIparameter.hh.

◆ yystype

Definition at line 134 of file G4UIparameter.hh.

Constructor & Destructor Documentation

◆ G4UIparameter() [1/3]

G4UIparameter::G4UIparameter ( )

Definition at line 43 of file G4UIparameter.cc.

44{
45}

◆ G4UIparameter() [2/3]

G4UIparameter::G4UIparameter ( char  theType)

Definition at line 48 of file G4UIparameter.cc.

49{
50 parameterType = theType;
51}

References parameterType.

◆ G4UIparameter() [3/3]

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

Definition at line 54 of file G4UIparameter.cc.

56{
57 parameterName = theName;
58 parameterType = theType;
59 omittable = theOmittable;
60}
G4String parameterName

References omittable, parameterName, and parameterType.

◆ ~G4UIparameter()

G4UIparameter::~G4UIparameter ( )

Definition at line 63 of file G4UIparameter.cc.

64{
65}

Member Function Documentation

◆ AdditiveExpression()

yystype G4UIparameter::AdditiveExpression ( void  )
private

Definition at line 625 of file G4UIparameter.cc.

626{
627 yystype result;
628 result = MultiplicativeExpression();
629 if(token != '+' && token != '-')
630 return result;
631 G4cerr << "Parameter range: operator " << (char) token << " is not supported."
632 << G4endl;
633 paramERR = 1;
634 return result;
635}
G4GLOB_DLL std::ostream G4cerr
#define G4endl
Definition: G4ios.hh:57
yystype MultiplicativeExpression(void)

References G4cerr, G4endl, MultiplicativeExpression(), paramERR, and token.

Referenced by RelationalExpression().

◆ Backslash()

G4int G4UIparameter::Backslash ( G4int  c)
private

◆ CandidateCheck()

G4int G4UIparameter::CandidateCheck ( const char *  newValue)
private

Definition at line 191 of file G4UIparameter.cc.

192{
193 G4Tokenizer candidateTokenizer(parameterCandidate);
194 G4String aToken;
195 G4int iToken = 0;
196 while(!(aToken = candidateTokenizer()).empty())
197 {
198 ++iToken;
199 if(aToken == newValue)
200 return iToken;
201 }
202 G4cerr << "parameter value (" << newValue
203 << ") is not listed in the candidate List." << G4endl;
204 G4cerr << " Candidates are:";
205 G4Tokenizer candidateListTokenizer(parameterCandidate);
206 while(!(aToken = candidateListTokenizer()).empty())
207 {
208 G4cerr << ' ' << aToken;
209 }
210 G4cerr << G4endl;
211
212 return 0;
213}
int G4int
Definition: G4Types.hh:85
G4String parameterCandidate

References anonymous_namespace{G4MTcoutDestination.cc}::empty, G4cerr, G4endl, and parameterCandidate.

Referenced by CheckNewValue().

◆ CheckNewValue()

G4int G4UIparameter::CheckNewValue ( const char *  newValue)

Definition at line 173 of file G4UIparameter.cc.

174{
175 if(TypeCheck(newValue) == 0)
177 if(!parameterRange.empty())
178 {
179 if(RangeCheck(newValue) == 0)
181 }
182 if(!parameterCandidate.empty())
183 {
184 if(CandidateCheck(newValue) == 0)
186 }
187 return 0; // succeeded
188}
@ fParameterOutOfCandidates
@ fParameterUnreadable
@ fParameterOutOfRange
G4int CandidateCheck(const char *newValue)
G4String parameterRange
G4int TypeCheck(const char *newValue)
G4int RangeCheck(const char *newValue)

References CandidateCheck(), fParameterOutOfCandidates, fParameterOutOfRange, fParameterUnreadable, parameterCandidate, parameterRange, RangeCheck(), and TypeCheck().

◆ CompareDouble()

G4int G4UIparameter::CompareDouble ( double  arg1,
G4int  op,
double  arg2 
)
private

Definition at line 927 of file G4UIparameter.cc.

928{
929 G4int result = -1;
930 G4String opr;
931 switch(op)
932 {
933 case GT:
934 result = (arg1 > arg2);
935 opr = ">";
936 break;
937 case GE:
938 result = (arg1 >= arg2);
939 opr = ">=";
940 break;
941 case LT:
942 result = (arg1 < arg2);
943 opr = "<";
944 break;
945 case LE:
946 result = (arg1 <= arg2);
947 opr = "<=";
948 break;
949 case EQ:
950 result = (arg1 == arg2);
951 opr = "==";
952 break;
953 case NE:
954 result = (arg1 != arg2);
955 opr = "!=";
956 break;
957 default:
958 G4cerr << "Parameter range: error at CompareDouble" << G4endl;
959 paramERR = 1;
960 }
961#ifdef DEBUG
962 G4cerr << "CompareDouble " << arg1 << " " << opr << " " << arg2
963 << " result: " << result << G4endl;
964#endif
965 return result;
966}
@ GT
Definition: Evaluator.cc:65
@ LT
Definition: Evaluator.cc:65
@ NE
Definition: Evaluator.cc:65
@ GE
Definition: Evaluator.cc:65
@ LE
Definition: Evaluator.cc:65
@ EQ
Definition: Evaluator.cc:65

References EQ, G4cerr, G4endl, GE, GT, LE, LT, NE, and paramERR.

Referenced by Eval2().

◆ CompareInt()

G4int G4UIparameter::CompareInt ( G4int  arg1,
G4int  op,
G4int  arg2 
)
private

Definition at line 843 of file G4UIparameter.cc.

844{
845 G4int result = -1;
846 G4String opr;
847 switch(op)
848 {
849 case GT:
850 result = (arg1 > arg2);
851 opr = ">";
852 break;
853 case GE:
854 result = (arg1 >= arg2);
855 opr = ">=";
856 break;
857 case LT:
858 result = (arg1 < arg2);
859 opr = "<";
860 break;
861 case LE:
862 result = (arg1 <= arg2);
863 opr = "<=";
864 break;
865 case EQ:
866 result = (arg1 == arg2);
867 opr = "==";
868 break;
869 case NE:
870 result = (arg1 != arg2);
871 opr = "!=";
872 break;
873 default:
874 G4cerr << "Parameter range: error at CompareInt" << G4endl;
875 paramERR = 1;
876 }
877#ifdef DEBUG
878 G4cerr << "CompareInt " << arg1 << " " << opr << arg2 << " result: " << result
879 << G4endl;
880#endif
881 return result;
882}

References EQ, G4cerr, G4endl, GE, GT, LE, LT, NE, and paramERR.

Referenced by Eval2().

◆ CompareLong()

G4int G4UIparameter::CompareLong ( G4long  arg1,
G4int  op,
G4long  arg2 
)
private

Definition at line 885 of file G4UIparameter.cc.

886{
887 G4int result = -1;
888 G4String opr;
889 switch(op)
890 {
891 case GT:
892 result = (arg1 > arg2);
893 opr = ">";
894 break;
895 case GE:
896 result = (arg1 >= arg2);
897 opr = ">=";
898 break;
899 case LT:
900 result = (arg1 < arg2);
901 opr = "<";
902 break;
903 case LE:
904 result = (arg1 <= arg2);
905 opr = "<=";
906 break;
907 case EQ:
908 result = (arg1 == arg2);
909 opr = "==";
910 break;
911 case NE:
912 result = (arg1 != arg2);
913 opr = "!=";
914 break;
915 default:
916 G4cerr << "Parameter range: error at CompareInt" << G4endl;
917 paramERR = 1;
918 }
919#ifdef DEBUG
920 G4cerr << "CompareInt " << arg1 << " " << opr << arg2 << " result: " << result
921 << G4endl;
922#endif
923 return result;
924}

References EQ, G4cerr, G4endl, GE, GT, LE, LT, NE, and paramERR.

Referenced by Eval2().

◆ EqualityExpression()

yystype G4UIparameter::EqualityExpression ( void  )
private

Definition at line 560 of file G4UIparameter.cc.

561{
562 yystype arg1, arg2;
563 G4int operat;
564 yystype result;
565#ifdef DEBUG
566 G4cerr << " EqualityExpression()" << G4endl;
567#endif
568 result = RelationalExpression();
569 if(token == EQ || token == NE)
570 {
571 operat = token;
572 token = Yylex();
573 arg1 = result;
574 arg2 = RelationalExpression();
575 result.I = Eval2(arg1, operat, arg2); // semantic action
576 result.type = CONSTINT;
577#ifdef DEBUG
578 G4cerr << " return code of Eval2(): " << result.I << G4endl;
579#endif
580 }
581 else
582 {
583 if(result.type != CONSTINT && result.type != CONSTDOUBLE)
584 {
585 G4cerr << "Parameter range: error at EqualityExpression" << G4endl;
586 paramERR = 1;
587 }
588 }
589 return result;
590}
yystype RelationalExpression(void)
tokenNum Yylex(void)
G4int Eval2(yystype arg1, G4int op, yystype arg2)

References G4UItokenNum::CONSTDOUBLE, G4UItokenNum::CONSTINT, EQ, Eval2(), G4cerr, G4endl, G4UItokenNum::yystype::I, NE, paramERR, RelationalExpression(), token, G4UItokenNum::yystype::type, and Yylex().

Referenced by LogicalANDExpression().

◆ Eval2()

G4int G4UIparameter::Eval2 ( yystype  arg1,
G4int  op,
yystype  arg2 
)
private

Definition at line 743 of file G4UIparameter.cc.

744{
745 if((arg1.type != IDENTIFIER) && (arg2.type != IDENTIFIER))
746 {
747 G4cerr << parameterName << ": meaningless comparison " << G4int(arg1.type)
748 << " " << G4int(arg2.type) << G4endl;
749 paramERR = 1;
750 }
751 char type = toupper(parameterType);
752 if(arg1.type == IDENTIFIER)
753 {
754 switch(type)
755 {
756 case 'I':
757 if(arg2.type == CONSTINT)
758 {
759 return CompareInt(newVal.I, op, arg2.I);
760 }
761 else
762 {
763 G4cerr << "integer operand expected for " << parameterRange << '.'
764 << G4endl;
765 }
766 break;
767 case 'L':
768 if(arg2.type == CONSTLONG)
769 {
770 return CompareLong(newVal.L, op, arg2.L);
771 }
772 else
773 {
774 G4cerr << "long int operand expected for " << parameterRange << '.'
775 << G4endl;
776 }
777 break;
778 case 'D':
779 if(arg2.type == CONSTDOUBLE)
780 {
781 return CompareDouble(newVal.D, op, arg2.D);
782 }
783 else if(arg2.type == CONSTINT)
784 { // integral promotion
785 return CompareDouble(newVal.D, op, arg2.I);
786 }
787 else if(arg2.type == CONSTLONG)
788 {
789 return CompareDouble(newVal.D, op, arg2.L);
790 }
791 break;
792 default:;
793 }
794 }
795 if(arg2.type == IDENTIFIER)
796 {
797 switch(type)
798 {
799 case 'I':
800 if(arg1.type == CONSTINT)
801 {
802 return CompareInt(arg1.I, op, newVal.I);
803 }
804 else
805 {
806 G4cerr << "integer operand expected for " << parameterRange << '.'
807 << G4endl;
808 }
809 break;
810 case 'L':
811 if(arg1.type == CONSTLONG)
812 {
813 return CompareLong(arg1.L, op, newVal.L);
814 }
815 else
816 {
817 G4cerr << "long int operand expected for " << parameterRange << '.'
818 << G4endl;
819 }
820 break;
821 case 'D':
822 if(arg1.type == CONSTDOUBLE)
823 {
824 return CompareDouble(arg1.D, op, newVal.D);
825 }
826 else if(arg1.type == CONSTINT)
827 { // integral promotion
828 return CompareDouble(arg1.I, op, newVal.D);
829 }
830 else if(arg1.type == CONSTLONG)
831 { // integral promotion
832 return CompareDouble(arg1.L, op, newVal.D);
833 }
834 break;
835 default:;
836 }
837 }
838 G4cerr << "no param name is specified at the param range." << G4endl;
839 return 0;
840}
G4int CompareInt(G4int arg1, G4int op, G4int arg2)
G4int CompareDouble(double arg1, G4int op, double arg2)
G4int CompareLong(G4long arg1, G4int op, G4long arg2)

References CompareDouble(), CompareInt(), CompareLong(), G4UItokenNum::CONSTDOUBLE, G4UItokenNum::CONSTINT, G4UItokenNum::CONSTLONG, G4UItokenNum::yystype::D, G4cerr, G4endl, G4UItokenNum::yystype::I, G4UItokenNum::IDENTIFIER, G4UItokenNum::yystype::L, newVal, paramERR, parameterName, parameterRange, parameterType, and G4UItokenNum::yystype::type.

Referenced by EqualityExpression(), and RelationalExpression().

◆ ExpectExponent()

G4int G4UIparameter::ExpectExponent ( const char *  str)
private

Definition at line 336 of file G4UIparameter.cc.

337{
338 G4int maxExplength;
339 if(IsInt(str, maxExplength = 7))
340 return 1;
341 else
342 return 0;
343}
G4int IsInt(const char *str, short maxDigit)

References IsInt().

Referenced by IsDouble().

◆ Expression()

yystype G4UIparameter::Expression ( void  )
private

Definition at line 459 of file G4UIparameter.cc.

460{
461 yystype result;
462#ifdef DEBUG
463 G4cerr << " Expression()" << G4endl;
464#endif
465 result = LogicalORExpression();
466 return result;
467}
yystype LogicalORExpression(void)

References G4cerr, G4endl, and LogicalORExpression().

Referenced by PrimaryExpression(), and RangeCheck().

◆ Follow()

G4int G4UIparameter::Follow ( G4int  expect,
G4int  ifyes,
G4int  ifno 
)
private

Definition at line 1045 of file G4UIparameter.cc.

1046{
1047 G4int c = G4UIpGetc();
1048 if(c == expect)
1049 return ifyes;
1050 G4UIpUngetc(c);
1051 return ifno;
1052}
G4int G4UIpGetc(void)
G4int G4UIpUngetc(G4int c)

References G4UIpGetc(), and G4UIpUngetc().

Referenced by Yylex().

◆ G4UIpGetc()

G4int G4UIparameter::G4UIpGetc ( void  )
private

Definition at line 1056 of file G4UIparameter.cc.

1057{ // emulation of getc()
1058 G4int length = parameterRange.length();
1059 if(bp < length)
1060 return parameterRange[bp++];
1061 else
1062 return EOF;
1063}

References bp, and parameterRange.

Referenced by Follow(), and Yylex().

◆ G4UIpUngetc()

G4int G4UIparameter::G4UIpUngetc ( G4int  c)
private

Definition at line 1066 of file G4UIparameter.cc.

1067{ // emulation of ungetc()
1068 if(c < 0)
1069 return -1;
1070 if(bp > 0 && c == parameterRange[bp - 1])
1071 {
1072 --bp;
1073 }
1074 else
1075 {
1076 G4cerr << "G4UIpUngetc() failed." << G4endl;
1077 G4cerr << "bp=" << bp << " c=" << c
1078 << " pR(bp-1)=" << parameterRange[bp - 1] << G4endl;
1079 paramERR = 1;
1080 return -1;
1081 }
1082 return 0;
1083}

References bp, G4cerr, G4endl, paramERR, and parameterRange.

Referenced by Follow(), and Yylex().

◆ GetCurrentAsDefault()

G4bool G4UIparameter::GetCurrentAsDefault ( ) const
inline

◆ GetDefaultValue()

const G4String & G4UIparameter::GetDefaultValue ( ) const
inline

◆ GetParameterCandidates()

const G4String & G4UIparameter::GetParameterCandidates ( ) const
inline

◆ GetParameterGuidance()

const G4String & G4UIparameter::GetParameterGuidance ( ) const
inline

◆ GetParameterName()

const G4String & G4UIparameter::GetParameterName ( ) const
inline

◆ GetParameterRange()

const G4String & G4UIparameter::GetParameterRange ( ) const
inline

◆ GetParameterType()

char G4UIparameter::GetParameterType ( ) const
inline

◆ IsDouble()

G4int G4UIparameter::IsDouble ( const char *  str)
private

Definition at line 346 of file G4UIparameter.cc.

348{
349 const char* p = buf;
350 switch(*p)
351 {
352 case '+':
353 case '-':
354 ++p;
355 if(isdigit(*p))
356 {
357 while(isdigit((G4int)(*p)))
358 {
359 ++p;
360 }
361 switch(*p)
362 {
363 case '\0':
364 return 1; // break;
365 case 'E':
366 case 'e':
367 return ExpectExponent(++p); // break;
368 case '.':
369 ++p;
370 if(*p == '\0')
371 return 1;
372 if(*p == 'e' || *p == 'E')
373 return ExpectExponent(++p);
374 if(isdigit(*p))
375 {
376 while(isdigit((G4int)(*p)))
377 {
378 ++p;
379 }
380 if(*p == '\0')
381 return 1;
382 if(*p == 'e' || *p == 'E')
383 return ExpectExponent(++p);
384 }
385 else
386 return 0;
387 break;
388 default:
389 return 0;
390 }
391 }
392 if(*p == '.')
393 {
394 ++p;
395 if(isdigit(*p))
396 {
397 while(isdigit((G4int)(*p)))
398 {
399 ++p;
400 }
401 if(*p == '\0')
402 return 1;
403 if(*p == 'e' || *p == 'E')
404 return ExpectExponent(++p);
405 }
406 }
407 break;
408 case '.':
409 ++p;
410 if(isdigit(*p))
411 {
412 while(isdigit((G4int)(*p)))
413 {
414 ++p;
415 }
416 if(*p == '\0')
417 return 1;
418 if(*p == 'e' || *p == 'E')
419 return ExpectExponent(++p);
420 }
421 break;
422 default: // digit is expected
423 if(isdigit(*p))
424 {
425 while(isdigit((G4int)(*p)))
426 {
427 ++p;
428 }
429 if(*p == '\0')
430 return 1;
431 if(*p == 'e' || *p == 'E')
432 return ExpectExponent(++p);
433 if(*p == '.')
434 {
435 ++p;
436 if(*p == '\0')
437 return 1;
438 if(*p == 'e' || *p == 'E')
439 return ExpectExponent(++p);
440 if(isdigit(*p))
441 {
442 while(isdigit((G4int)(*p)))
443 {
444 ++p;
445 }
446 if(*p == '\0')
447 return 1;
448 if(*p == 'e' || *p == 'E')
449 return ExpectExponent(++p);
450 }
451 }
452 }
453 }
454 return 0;
455}
G4int ExpectExponent(const char *str)

References ExpectExponent().

Referenced by TypeCheck(), and Yylex().

◆ IsInt()

G4int G4UIparameter::IsInt ( const char *  str,
short  maxDigit 
)
private

Definition at line 298 of file G4UIparameter.cc.

300{
301 const char* p = buf;
302 G4int length = 0;
303 if(*p == '+' || *p == '-')
304 {
305 ++p;
306 }
307 if(isdigit((G4int)(*p)))
308 {
309 while(isdigit((G4int)(*p)))
310 {
311 ++p;
312 ++length;
313 }
314 if(*p == '\0')
315 {
316 if(length > maxDigits)
317 {
318 G4cerr << "digit length exceeds" << G4endl;
319 return 0;
320 }
321 return 1;
322 }
323 else
324 {
325 // G4cerr <<"illegal character after int:"<<buf<<G4endl;
326 }
327 }
328 else
329 {
330 // G4cerr <<"illegal int:"<<buf<<G4endl;
331 }
332 return 0;
333}

References G4cerr, and G4endl.

Referenced by ExpectExponent(), TypeCheck(), and Yylex().

◆ IsOmittable()

G4bool G4UIparameter::IsOmittable ( ) const
inline

◆ List()

void G4UIparameter::List ( )

Definition at line 80 of file G4UIparameter.cc.

81{
82 G4cout << G4endl << "Parameter : " << parameterName << G4endl;
83 if(!parameterGuidance.empty())
85 G4cout << " Parameter type : " << parameterType << G4endl;
86 if(omittable)
87 {
88 G4cout << " Omittable : True" << G4endl;
89 }
90 else
91 {
92 G4cout << " Omittable : False" << G4endl;
93 }
95 {
96 G4cout << " Default value : taken from the current value" << G4endl;
97 }
98 else if(!defaultValue.empty())
99 {
100 G4cout << " Default value : " << defaultValue << G4endl;
101 }
102 if(!parameterRange.empty())
103 G4cout << " Parameter range : " << parameterRange << G4endl;
104 if(!parameterCandidate.empty())
105 G4cout << " Candidates : " << parameterCandidate << G4endl;
106}
G4GLOB_DLL std::ostream G4cout

References currentAsDefaultFlag, defaultValue, G4cout, G4endl, omittable, parameterCandidate, parameterGuidance, parameterName, parameterRange, and parameterType.

Referenced by export_G4UIparameter().

◆ LogicalANDExpression()

yystype G4UIparameter::LogicalANDExpression ( void  )
private

Definition at line 515 of file G4UIparameter.cc.

516{
517 yystype result;
518 yystype p;
519 p = EqualityExpression();
520 if(token != LOGICALAND)
521 return p;
522 if(p.type == CONSTSTRING || p.type == IDENTIFIER)
523 {
524 G4cerr << "Parameter range: illegal type at '&&'" << G4endl;
525 paramERR = 1;
526 }
527 result.I = p.I;
528 while(token == LOGICALAND)
529 {
530 token = Yylex();
531 p = EqualityExpression();
532 if(p.type == CONSTSTRING || p.type == IDENTIFIER)
533 {
534 G4cerr << "Parameter range: illegal type at '&&'" << G4endl;
535 paramERR = 1;
536 }
537 switch(p.type)
538 {
539 case CONSTINT:
540 result.I *= p.I;
541 result.type = CONSTINT;
542 break;
543 case CONSTLONG:
544 result.I *= (p.L != 0L);
545 result.type = CONSTINT;
546 break;
547 case CONSTDOUBLE:
548 result.I *= (p.D != 0.0);
549 result.type = CONSTINT;
550 break;
551 default:
552 G4cerr << "Parameter range: unknown type." << G4endl;
553 paramERR = 1;
554 }
555 }
556 return result;
557}
static constexpr double L
Definition: G4SIunits.hh:104
yystype EqualityExpression(void)

References G4UItokenNum::CONSTDOUBLE, G4UItokenNum::CONSTINT, G4UItokenNum::CONSTLONG, G4UItokenNum::CONSTSTRING, G4UItokenNum::yystype::D, EqualityExpression(), G4cerr, G4endl, G4UItokenNum::yystype::I, G4UItokenNum::IDENTIFIER, L, G4UItokenNum::yystype::L, G4UItokenNum::LOGICALAND, paramERR, token, G4UItokenNum::yystype::type, and Yylex().

Referenced by LogicalORExpression().

◆ LogicalORExpression()

yystype G4UIparameter::LogicalORExpression ( void  )
private

Definition at line 470 of file G4UIparameter.cc.

471{
472 yystype result;
473 yystype p;
475 if(token != LOGICALOR)
476 return p;
477 if(p.type == CONSTSTRING || p.type == IDENTIFIER)
478 {
479 G4cerr << "Parameter range: illegal type at '||'" << G4endl;
480 paramERR = 1;
481 }
482 result.I = p.I;
483 while(token == LOGICALOR)
484 {
485 token = Yylex();
487 if(p.type == CONSTSTRING || p.type == IDENTIFIER)
488 {
489 G4cerr << "Parameter range: illegal type at '||'" << G4endl;
490 paramERR = 1;
491 }
492 switch(p.type)
493 {
494 case CONSTINT:
495 result.I += p.I;
496 result.type = CONSTINT;
497 break;
498 case CONSTLONG:
499 result.I += (p.L != 0L);
500 result.type = CONSTINT;
501 break;
502 case CONSTDOUBLE:
503 result.I += (p.D != 0.0);
504 result.type = CONSTINT;
505 break;
506 default:
507 G4cerr << "Parameter range: unknown type" << G4endl;
508 paramERR = 1;
509 }
510 }
511 return result;
512}
yystype LogicalANDExpression(void)

References G4UItokenNum::CONSTDOUBLE, G4UItokenNum::CONSTINT, G4UItokenNum::CONSTLONG, G4UItokenNum::CONSTSTRING, G4UItokenNum::yystype::D, G4cerr, G4endl, G4UItokenNum::yystype::I, G4UItokenNum::IDENTIFIER, L, G4UItokenNum::yystype::L, LogicalANDExpression(), G4UItokenNum::LOGICALOR, paramERR, token, G4UItokenNum::yystype::type, and Yylex().

Referenced by Expression().

◆ MultiplicativeExpression()

yystype G4UIparameter::MultiplicativeExpression ( void  )
private

Definition at line 638 of file G4UIparameter.cc.

639{
640 yystype result;
641 result = UnaryExpression();
642 if(token != '*' && token != '/' && token != '%')
643 return result;
644 G4cerr << "Parameter range: operator " << (char) token << " is not supported."
645 << G4endl;
646 paramERR = 1;
647 return result;
648}
yystype UnaryExpression(void)

References G4cerr, G4endl, paramERR, token, and UnaryExpression().

Referenced by AdditiveExpression().

◆ operator!=()

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

Definition at line 74 of file G4UIparameter.cc.

75{
76 return (this != &right);
77}

◆ operator==()

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

Definition at line 68 of file G4UIparameter.cc.

69{
70 return (this == &right);
71}

◆ PrimaryExpression()

yystype G4UIparameter::PrimaryExpression ( void  )
private

Definition at line 697 of file G4UIparameter.cc.

698{
699 yystype result;
700#ifdef DEBUG
701 G4cerr << " PrimaryExpression" << G4endl;
702#endif
703 switch(token)
704 {
705 case IDENTIFIER:
706 result.S = yylval.S;
707 result.type = token;
708 token = Yylex();
709 break;
710 case CONSTINT:
711 result.I = yylval.I;
712 result.type = token;
713 token = Yylex();
714 break;
715 case CONSTLONG:
716 result.L = yylval.L;
717 result.type = token;
718 token = Yylex();
719 break;
720 case CONSTDOUBLE:
721 result.D = yylval.D;
722 result.type = token;
723 token = Yylex();
724 break;
725 case '(':
726 token = Yylex();
727 result = Expression();
728 if(token != ')')
729 {
730 G4cerr << " ')' expected" << G4endl;
731 paramERR = 1;
732 }
733 token = Yylex();
734 break;
735 default:
736 return result;
737 }
738 return result; // never executed
739}
yystype Expression(void)

References G4UItokenNum::CONSTDOUBLE, G4UItokenNum::CONSTINT, G4UItokenNum::CONSTLONG, G4UItokenNum::yystype::D, Expression(), G4cerr, G4endl, G4UItokenNum::yystype::I, G4UItokenNum::IDENTIFIER, G4UItokenNum::yystype::L, paramERR, G4UItokenNum::yystype::S, token, G4UItokenNum::yystype::type, Yylex(), and yylval.

Referenced by UnaryExpression().

◆ RangeCheck()

G4int G4UIparameter::RangeCheck ( const char *  newValue)
private

Definition at line 216 of file G4UIparameter.cc.

217{
218 yystype result;
219 bp = 0; // reset buffer pointer for G4UIpGetc()
220 std::istringstream is(newValue);
221 char type = toupper(parameterType);
222 switch(type)
223 {
224 case 'D':
225 is >> newVal.D;
226 break;
227 case 'I':
228 is >> newVal.I;
229 break;
230 case 'L':
231 is >> newVal.L;
232 break;
233 default:;
234 }
235 // PrintToken(); // Print tokens (consumes all tokens)
236 token = Yylex();
237 result = Expression();
238 if(paramERR == 1) return 0;
239 if(result.type != CONSTINT)
240 {
241 G4cerr << "Illegal Expression in parameter range." << G4endl;
242 return 0;
243 }
244 if(result.I) return 1;
245 G4cerr << "parameter out of range: " << parameterRange << G4endl;
246 return 0;
247}

References bp, G4UItokenNum::CONSTINT, G4UItokenNum::yystype::D, Expression(), G4cerr, G4endl, G4UItokenNum::yystype::I, G4UItokenNum::yystype::L, newVal, paramERR, parameterRange, parameterType, token, G4UItokenNum::yystype::type, and Yylex().

Referenced by CheckNewValue().

◆ RelationalExpression()

yystype G4UIparameter::RelationalExpression ( void  )
private

Definition at line 593 of file G4UIparameter.cc.

594{
595 yystype arg1, arg2;
596 G4int operat;
597 yystype result;
598#ifdef DEBUG
599 G4cerr << " RelationalExpression()" << G4endl;
600#endif
601
602 arg1 = AdditiveExpression();
603 if(token == GT || token == GE || token == LT || token == LE)
604 {
605 operat = token;
606 token = Yylex();
607 arg2 = AdditiveExpression();
608 result.I = Eval2(arg1, operat, arg2); // semantic action
609 result.type = CONSTINT;
610#ifdef DEBUG
611 G4cerr << " return Eval2(): " << G4endl;
612#endif
613 }
614 else
615 {
616 result = arg1;
617 }
618#ifdef DEBUG
619 G4cerr << " return RelationalExpression()" << G4endl;
620#endif
621 return result;
622}
yystype AdditiveExpression(void)

References AdditiveExpression(), G4UItokenNum::CONSTINT, Eval2(), G4cerr, G4endl, GE, GT, G4UItokenNum::yystype::I, LE, LT, token, G4UItokenNum::yystype::type, and Yylex().

Referenced by EqualityExpression().

◆ SetCurrentAsDefault()

void G4UIparameter::SetCurrentAsDefault ( G4bool  val)
inline

◆ SetDefaultUnit()

void G4UIparameter::SetDefaultUnit ( const char *  theDefaultUnit)

Definition at line 133 of file G4UIparameter.cc.

134{
135 char type = toupper(parameterType);
136 if(type != 'S')
137 {
139 ed << "This method can be used only for a string-type parameter that is "
140 "used to specify a unit.\n"
141 << "This parameter <" << parameterName << "> is defined as ";
142 switch(type)
143 {
144 case 'D':
145 ed << "double.";
146 break;
147 case 'I':
148 ed << "integer.";
149 break;
150 case 'L':
151 ed << "long int.";
152 break;
153 case 'B':
154 ed << "bool.";
155 break;
156 default:
157 ed << "undefined.";
158 }
159 G4Exception("G4UIparameter::SetDefaultUnit", "INTERCOM2010", FatalException,
160 ed);
161 }
162 SetDefaultValue(theDefaultUnit);
165}
@ FatalException
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
Definition: G4Exception.cc:35
std::ostringstream G4ExceptionDescription
Definition: G4Exception.hh:40
static G4String CategoryOf(const char *unitName)
Definition: G4UIcommand.cc:371
static G4String UnitsList(const char *unitCategory)
Definition: G4UIcommand.cc:377
void SetDefaultValue(const char *theDefaultValue)
void SetParameterCandidates(const char *theString)

References G4UIcommand::CategoryOf(), FatalException, G4Exception(), parameterName, parameterType, SetDefaultValue(), SetParameterCandidates(), and G4UIcommand::UnitsList().

Referenced by G4ScoreQuantityMessenger::FilterCommands(), G4EmExtraParametersMessenger::G4EmExtraParametersMessenger(), G4ScoringMessenger::G4ScoringMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), and G4ScoreQuantityMessenger::QuantityCommands().

◆ SetDefaultValue() [1/4]

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

Definition at line 70 of file G4UIparameter.hh.

71 {
72 defaultValue = theDefaultValue;
73 }

References defaultValue.

Referenced by G4ScoreQuantityMessenger::FilterCommands(), G4AdjointSimMessenger::G4AdjointSimMessenger(), G4EmExtraParametersMessenger::G4EmExtraParametersMessenger(), G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger(), G4GMocrenMessenger::G4GMocrenMessenger(), G4InteractorMessenger::G4InteractorMessenger(), G4MatScanMessenger::G4MatScanMessenger(), G4OpenGLViewerMessenger::G4OpenGLViewerMessenger(), G4OpticalParametersMessenger::G4OpticalParametersMessenger(), G4ParticleGunMessenger::G4ParticleGunMessenger(), G4PolarizationMessenger::G4PolarizationMessenger(), G4ProcessManagerMessenger::G4ProcessManagerMessenger(), G4ProcessTableMessenger::G4ProcessTableMessenger(), G4RunMessenger::G4RunMessenger(), G4ScoringMessenger::G4ScoringMessenger(), G4UIcontrolMessenger::G4UIcontrolMessenger(), G4UserPhysicsListMessenger::G4UserPhysicsListMessenger(), G4VisCommandGeometrySetColour::G4VisCommandGeometrySetColour(), G4VisCommandGeometrySetDaughtersInvisible::G4VisCommandGeometrySetDaughtersInvisible(), G4VisCommandGeometrySetForceAuxEdgeVisible::G4VisCommandGeometrySetForceAuxEdgeVisible(), G4VisCommandGeometrySetForceCloud::G4VisCommandGeometrySetForceCloud(), G4VisCommandGeometrySetForceLineSegmentsPerCircle::G4VisCommandGeometrySetForceLineSegmentsPerCircle(), G4VisCommandGeometrySetForceSolid::G4VisCommandGeometrySetForceSolid(), G4VisCommandGeometrySetForceWireframe::G4VisCommandGeometrySetForceWireframe(), G4VisCommandGeometrySetLineStyle::G4VisCommandGeometrySetLineStyle(), G4VisCommandGeometrySetLineWidth::G4VisCommandGeometrySetLineWidth(), G4VisCommandGeometrySetVisibility::G4VisCommandGeometrySetVisibility(), G4VisCommandOpen::G4VisCommandOpen(), G4VisCommandSceneAddArrow::G4VisCommandSceneAddArrow(), G4VisCommandSceneAddAxes::G4VisCommandSceneAddAxes(), G4VisCommandSceneAddLine::G4VisCommandSceneAddLine(), G4VisCommandSceneAddLogicalVolume::G4VisCommandSceneAddLogicalVolume(), G4VisCommandSceneAddLogo::G4VisCommandSceneAddLogo(), G4VisCommandSceneAddScale::G4VisCommandSceneAddScale(), G4VisCommandSceneAddText::G4VisCommandSceneAddText(), G4VisCommandSceneAddText2D::G4VisCommandSceneAddText2D(), G4VisCommandSetColour::G4VisCommandSetColour(), G4VisCommandSetTextColour::G4VisCommandSetTextColour(), G4VisCommandSpecify::G4VisCommandSpecify(), G4VisCommandsTouchableSet::G4VisCommandsTouchableSet(), G4VisCommandsViewerSet::G4VisCommandsViewerSet(), G4VisCommandViewerCentreOn::G4VisCommandViewerCentreOn(), G4VisCommandViewerCreate::G4VisCommandViewerCreate(), G4ToolsSGViewer< SG_SESSION, SG_VIEWER >::Messenger::Messenger(), G4ScoreQuantityMessenger::QuantityCommands(), G4UIcmdWith3VectorAndUnit::SetDefaultUnit(), G4UIcmdWithADoubleAndUnit::SetDefaultUnit(), SetDefaultUnit(), G4UIcmdWithAString::SetDefaultValue(), G4UIcmdWithABool::SetDefaultValue(), G4UIcmdWithADouble::SetDefaultValue(), G4UIcmdWithADoubleAndUnit::SetDefaultValue(), G4UIcmdWithAnInteger::SetDefaultValue(), G4GenericMessenger::Command::SetDefaultValue(), G4UIcmdWithALongInt::SetDefaultValue(), G4UIcmdWithNucleusLimits::SetDefaultValue(), G4UIcmdWith3Vector::SetDefaultValue(), and G4UIcmdWith3VectorAndUnit::SetDefaultValue().

◆ SetDefaultValue() [2/4]

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}

References defaultValue.

◆ SetDefaultValue() [3/4]

void G4UIparameter::SetDefaultValue ( G4int  theDefaultValue)

Definition at line 109 of file G4UIparameter.cc.

110{
111 std::ostringstream os;
112 os << theDefaultValue;
113 defaultValue = os.str();
114}

References defaultValue.

◆ SetDefaultValue() [4/4]

void G4UIparameter::SetDefaultValue ( G4long  theDefaultValue)

Definition at line 117 of file G4UIparameter.cc.

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

References defaultValue.

◆ SetGuidance()

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

Definition at line 127 of file G4UIparameter.hh.

128 {
129 parameterGuidance = theGuidance;
130 }

References parameterGuidance.

Referenced by G4OpenGLViewerMessenger::G4OpenGLViewerMessenger(), G4OpticalParametersMessenger::G4OpticalParametersMessenger(), G4RadioactiveDecayMessenger::G4RadioactiveDecayMessenger(), G4VisCommandGeometrySetColour::G4VisCommandGeometrySetColour(), G4VisCommandGeometrySetDaughtersInvisible::G4VisCommandGeometrySetDaughtersInvisible(), G4VisCommandGeometrySetForceAuxEdgeVisible::G4VisCommandGeometrySetForceAuxEdgeVisible(), G4VisCommandGeometrySetForceCloud::G4VisCommandGeometrySetForceCloud(), 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(), G4VisCommandViewerCentreOn::G4VisCommandViewerCentreOn(), and G4VisCommandViewerCreate::G4VisCommandViewerCreate().

◆ SetOmittable()

void G4UIparameter::SetOmittable ( G4bool  om)
inline

◆ SetParameterCandidates()

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

◆ SetParameterName()

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

◆ SetParameterRange()

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

◆ SetWidget()

void G4UIparameter::SetWidget ( G4int  theWidget)
inline

Definition at line 122 of file G4UIparameter.hh.

122{ widget = theWidget; }

References widget.

◆ TypeCheck()

G4int G4UIparameter::TypeCheck ( const char *  newValue)
private

Definition at line 250 of file G4UIparameter.cc.

251{
252 G4String newValueString(newValue);
253 char type = toupper(parameterType);
254 switch(type)
255 {
256 case 'D':
257 if(IsDouble(newValueString.data()) == 0)
258 {
259 G4cerr << newValue << ": double value expected." << G4endl;
260 return 0;
261 }
262 break;
263 case 'I':
264 if(IsInt(newValueString.data(), 10) == 0)
265 {
266 G4cerr << newValue << ": integer expected." << G4endl;
267 return 0;
268 }
269 break;
270 case 'L':
271 if(IsInt(newValueString.data(), 20) == 0)
272 {
273 G4cerr << newValue << ": long int expected." << G4endl;
274 return 0;
275 }
276 break;
277 case 'S':
278 break;
279 case 'B':
280 G4StrUtil::to_upper(newValueString);
281 if(newValueString == "Y" || newValueString == "N" ||
282 newValueString == "YES" || newValueString == "NO" ||
283 newValueString == "1" || newValueString == "0" ||
284 newValueString == "T" || newValueString == "F" ||
285 newValueString == "TRUE" || newValueString == "FALSE")
286 return 1;
287 else
288 {
289 G4cerr << newValue << ": bool expected." << G4endl;
290 return 0;
291 }
292 default:;
293 }
294 return 1;
295}
G4int IsDouble(const char *str)
void to_upper(G4String &str)
Convert string to uppercase.

References G4cerr, G4endl, IsDouble(), IsInt(), parameterType, and G4StrUtil::to_upper().

Referenced by CheckNewValue().

◆ UnaryExpression()

yystype G4UIparameter::UnaryExpression ( void  )
private

Definition at line 651 of file G4UIparameter.cc.

652{
653 yystype result;
654 yystype p;
655#ifdef DEBUG
656 G4cerr << " UnaryExpression" << G4endl;
657#endif
658 switch(token)
659 {
660 case '-':
661 token = Yylex();
662 p = UnaryExpression();
663 if(p.type == CONSTINT)
664 {
665 result.I = -p.I;
666 result.type = CONSTINT;
667 }
668 if(p.type == CONSTLONG)
669 {
670 result.L = -p.L;
671 result.type = CONSTLONG;
672 }
673 if(p.type == CONSTDOUBLE)
674 {
675 result.D = -p.D;
676 result.type = CONSTDOUBLE;
677 }
678 break;
679 case '+':
680 token = Yylex();
681 result = UnaryExpression();
682 break;
683 case '!':
684 token = Yylex();
685 G4cerr << "Parameter range error: "
686 << "operator '!' is not supported (sorry)." << G4endl;
687 paramERR = 1;
688 result = UnaryExpression();
689 break;
690 default:
691 result = PrimaryExpression();
692 }
693 return result;
694}
yystype PrimaryExpression(void)

References G4UItokenNum::CONSTDOUBLE, G4UItokenNum::CONSTINT, G4UItokenNum::CONSTLONG, G4UItokenNum::yystype::D, G4cerr, G4endl, G4UItokenNum::yystype::I, G4UItokenNum::yystype::L, paramERR, PrimaryExpression(), token, G4UItokenNum::yystype::type, UnaryExpression(), and Yylex().

Referenced by MultiplicativeExpression(), and UnaryExpression().

◆ Yylex()

tokenNum G4UIparameter::Yylex ( void  )
private

Definition at line 970 of file G4UIparameter.cc.

971{ // (returns EOF)
972 G4int c;
973 G4String buf;
974
975 while((c = G4UIpGetc()) == ' ' || c == '\t' || c == '\n')
976 ;
977 if(c == EOF)
978 return (tokenNum) EOF; // KR488
979 buf = "";
980 if(isdigit(c) || c == '.')
981 { // I or D
982 do
983 {
984 buf += (unsigned char) c;
985 c = G4UIpGetc();
986 } while(c == '.' || isdigit(c) || c == 'e' || c == 'E' || c == '+' ||
987 c == '-');
988 G4UIpUngetc(c);
989 const char* t = buf;
990 std::istringstream is(t);
991 if(IsInt(buf.data(), 20))
992 {
993 is >> yylval.I;
994 return CONSTINT;
995 }
996 else if(IsDouble(buf.data()))
997 {
998 is >> yylval.D;
999 return CONSTDOUBLE;
1000 }
1001 else
1002 {
1003 G4cerr << buf << ": numeric format error." << G4endl;
1004 }
1005 }
1006 buf = "";
1007 if(isalpha(c) || c == '_')
1008 { // IDENTIFIER
1009 do
1010 {
1011 buf += (unsigned char) c;
1012 } while((c = G4UIpGetc()) != EOF && (isalnum(c) || c == '_'));
1013 G4UIpUngetc(c);
1014 if(buf == parameterName)
1015 {
1016 yylval.S = buf;
1017 return IDENTIFIER;
1018 }
1019 else
1020 {
1021 G4cerr << buf << " is not a parameter name." << G4endl;
1022 paramERR = 1;
1023 }
1024 }
1025 switch(c)
1026 {
1027 case '>':
1028 return (tokenNum) Follow('=', GE, GT);
1029 case '<':
1030 return (tokenNum) Follow('=', LE, LT);
1031 case '=':
1032 return (tokenNum) Follow('=', EQ, '=');
1033 case '!':
1034 return (tokenNum) Follow('=', NE, '!');
1035 case '|':
1036 return (tokenNum) Follow('|', LOGICALOR, '|');
1037 case '&':
1038 return (tokenNum) Follow('&', LOGICALAND, '&');
1039 default:
1040 return (tokenNum) c;
1041 }
1042}
G4int Follow(G4int expect, G4int ifyes, G4int ifno)

References G4UItokenNum::CONSTDOUBLE, G4UItokenNum::CONSTINT, G4UItokenNum::yystype::D, EQ, Follow(), G4cerr, G4endl, G4UIpGetc(), G4UIpUngetc(), GE, GT, G4UItokenNum::yystype::I, G4UItokenNum::IDENTIFIER, IsDouble(), IsInt(), LE, G4UItokenNum::LOGICALAND, G4UItokenNum::LOGICALOR, LT, NE, paramERR, parameterName, G4UItokenNum::yystype::S, and yylval.

Referenced by EqualityExpression(), LogicalANDExpression(), LogicalORExpression(), PrimaryExpression(), RangeCheck(), RelationalExpression(), and UnaryExpression().

Field Documentation

◆ bp

G4int G4UIparameter::bp = 0
private

Definition at line 183 of file G4UIparameter.hh.

Referenced by G4UIpGetc(), G4UIpUngetc(), and RangeCheck().

◆ currentAsDefaultFlag

G4bool G4UIparameter::currentAsDefaultFlag = false
private

Definition at line 178 of file G4UIparameter.hh.

Referenced by GetCurrentAsDefault(), List(), and SetCurrentAsDefault().

◆ defaultValue

G4String G4UIparameter::defaultValue
private

Definition at line 173 of file G4UIparameter.hh.

Referenced by GetDefaultValue(), List(), and SetDefaultValue().

◆ newVal

yystype G4UIparameter::newVal
private

Definition at line 186 of file G4UIparameter.hh.

Referenced by Eval2(), and RangeCheck().

◆ omittable

G4bool G4UIparameter::omittable = false
private

Definition at line 177 of file G4UIparameter.hh.

Referenced by G4UIparameter(), IsOmittable(), List(), and SetOmittable().

◆ paramERR

G4int G4UIparameter::paramERR = 0
private

◆ parameterCandidate

G4String G4UIparameter::parameterCandidate
private

◆ parameterGuidance

G4String G4UIparameter::parameterGuidance
private

Definition at line 172 of file G4UIparameter.hh.

Referenced by GetParameterGuidance(), List(), and SetGuidance().

◆ parameterName

G4String G4UIparameter::parameterName
private

◆ parameterRange

G4String G4UIparameter::parameterRange
private

◆ parameterType

char G4UIparameter::parameterType = '\0'
private

◆ rangeBuf

G4String G4UIparameter::rangeBuf
private

Definition at line 182 of file G4UIparameter.hh.

◆ token

tokenNum G4UIparameter::token = G4UItokenNum::NONE
private

◆ widget

G4int G4UIparameter::widget = 0
private

Definition at line 179 of file G4UIparameter.hh.

Referenced by SetWidget().

◆ yylval

yystype G4UIparameter::yylval
private

Definition at line 185 of file G4UIparameter.hh.

Referenced by PrimaryExpression(), and Yylex().


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