Geant4-11
Functions | Variables
pyG4UImanager Namespace Reference

Functions

G4int ApplyUICommand_1 (const G4String &cmdstr)
 
G4int ApplyUICommand_2 (const std::string &cmdstr)
 

Variables

G4int(G4UImanager::* f1_ApplyCommand )(const char *) = &G4UImanager::ApplyCommand
 
G4int(G4UImanager::* f2_ApplyCommand )(const G4String &)
 

Function Documentation

◆ ApplyUICommand_1()

G4int pyG4UImanager::ApplyUICommand_1 ( const G4String cmdstr)

Definition at line 55 of file pyG4UImanager.cc.

57{
59 G4int returnVal= UImgr-> ApplyCommand(cmdstr);
60 if( returnVal == fCommandSucceeded ) return returnVal;
61
62 G4int paramIndex= returnVal % 100;
63 G4int commandStatus= returnVal - paramIndex;
64
65 switch(commandStatus) {
67 break;
68
70 G4cout << "command <" << UImgr-> SolveAlias(cmdstr)
71 << "> not found" << G4endl;
72 break;
73
75 G4cout << "illegal application state -- command refused"
76 << G4endl;
77 break;
78
80 break;
81
83 G4cout << "Parameter is out of candidate list (index "
84 << paramIndex << ")"
85 << G4endl;
86 break;
87
89 G4cout << "Parameter is wrong type and/or is not omittable (index "
90 << paramIndex << ")" << G4endl;
91 break;
92
93 case fAliasNotFound:
94 break;
95
96 default:
97 G4cout << "command refused (" << commandStatus << ")" << G4endl;
98 break;
99 }
100
101 return returnVal;
102}
int G4int
Definition: G4Types.hh:85
@ fParameterOutOfCandidates
@ fCommandNotFound
@ fAliasNotFound
@ fIllegalApplicationState
@ fParameterUnreadable
@ fCommandSucceeded
@ fParameterOutOfRange
#define G4endl
Definition: G4ios.hh:57
G4GLOB_DLL std::ostream G4cout
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:77
string cmdstr
Definition: test.py:122

References test::cmdstr, fAliasNotFound, fCommandNotFound, fCommandSucceeded, fIllegalApplicationState, fParameterOutOfCandidates, fParameterOutOfRange, fParameterUnreadable, G4cout, G4endl, and G4UImanager::GetUIpointer().

Referenced by ApplyUICommand_2(), and export_G4UImanager().

◆ ApplyUICommand_2()

G4int pyG4UImanager::ApplyUICommand_2 ( const std::string &  cmdstr)

Definition at line 105 of file pyG4UImanager.cc.

107{
108 return ApplyUICommand_1(cmdstr);
109}
G4int ApplyUICommand_1(const G4String &cmdstr)

References ApplyUICommand_1(), and test::cmdstr.

Referenced by export_G4UImanager().

Variable Documentation

◆ f1_ApplyCommand

G4int(G4UImanager::* pyG4UImanager::f1_ApplyCommand) (const char *) ( const char *  ) = &G4UImanager::ApplyCommand

Definition at line 46 of file pyG4UImanager.cc.

Referenced by export_G4UImanager().

◆ f2_ApplyCommand

G4int(G4UImanager::* pyG4UImanager::f2_ApplyCommand) (const G4String &) ( const G4String )
Initial value:
=
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:485

Definition at line 47 of file pyG4UImanager.cc.

Referenced by export_G4UImanager().