Geant4.10
|
This class is generic messenger. More...
#include <G4GenericMessenger.hh>
Data Structures | |
struct | Command |
struct | Method |
struct | Property |
Public Member Functions | |
G4GenericMessenger (void *obj, const G4String &dir="", const G4String &doc="") | |
Contructor. More... | |
virtual | ~G4GenericMessenger () |
Destructor. More... | |
virtual G4String | GetCurrentValue (G4UIcommand *command) |
The concrete, but generic implementation of this method. More... | |
virtual void | SetNewValue (G4UIcommand *command, G4String newValue) |
The concrete, generic implementation of this method converts the string "newValue" to action. More... | |
Command & | DeclareProperty (const G4String &name, const G4AnyType &variable, const G4String &doc="") |
Declare Methods. More... | |
Command & | DeclarePropertyWithUnit (const G4String &name, const G4String &defaultUnit, const G4AnyType &variable, const G4String &doc="") |
Command & | DeclareMethod (const G4String &name, const G4AnyMethod &fun, const G4String &doc="") |
Command & | DeclareMethodWithUnit (const G4String &name, const G4String &defaultUnit, const G4AnyMethod &fun, const G4String &doc="") |
void | SetDirectory (const G4String &dir) |
void | SetGuidance (const G4String &s) |
![]() | |
G4UImessenger () | |
G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true) | |
virtual | ~G4UImessenger () |
G4bool | operator== (const G4UImessenger &messenger) const |
Additional Inherited Members | |
![]() | |
G4String | ItoS (G4int i) |
G4String | DtoS (G4double a) |
G4String | BtoS (G4bool b) |
G4int | StoI (G4String s) |
G4double | StoD (G4String s) |
G4bool | StoB (G4String s) |
void | AddUIcommand (G4UIcommand *newCommand) |
void | CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true) |
template<typename T > | |
T * | CreateCommand (const G4String &cname, const G4String &dsc) |
![]() | |
G4UIdirectory * | baseDir |
G4String | baseDirName |
This class is generic messenger.
Definition at line 46 of file G4GenericMessenger.hh.
G4GenericMessenger::G4GenericMessenger | ( | void * | obj, |
const G4String & | dir = "" , |
||
const G4String & | doc = "" |
||
) |
Contructor.
Definition at line 48 of file G4GenericMessenger.cc.
References G4UIcommand::SetGuidance().
|
virtual |
Destructor.
Definition at line 63 of file G4GenericMessenger.cc.
G4GenericMessenger::Command & G4GenericMessenger::DeclareMethod | ( | const G4String & | name, |
const G4AnyMethod & | fun, | ||
const G4String & | doc = "" |
||
) |
Definition at line 112 of file G4GenericMessenger.cc.
References cmd, G4AnyMethod::NArg(), G4UIcommand::SetGuidance(), and G4UIcommand::SetParameter().
G4GenericMessenger::Command & G4GenericMessenger::DeclareMethodWithUnit | ( | const G4String & | name, |
const G4String & | defaultUnit, | ||
const G4AnyMethod & | fun, | ||
const G4String & | doc = "" |
||
) |
Definition at line 123 of file G4GenericMessenger.cc.
References cmd, FatalException, G4Exception(), G4AnyMethod::NArg(), G4UIcommand::SetGuidance(), and G4UIcmdWithADoubleAndUnit::SetParameterName().
G4GenericMessenger::Command & G4GenericMessenger::DeclareProperty | ( | const G4String & | name, |
const G4AnyType & | variable, | ||
const G4String & | doc = "" |
||
) |
Declare Methods.
Definition at line 71 of file G4GenericMessenger.cc.
References cmd, int(), G4UIcommand::SetGuidance(), G4UIcommand::SetParameter(), and G4AnyType::TypeInfo().
G4GenericMessenger::Command & G4GenericMessenger::DeclarePropertyWithUnit | ( | const G4String & | name, |
const G4String & | defaultUnit, | ||
const G4AnyType & | variable, | ||
const G4String & | doc = "" |
||
) |
Definition at line 88 of file G4GenericMessenger.cc.
References cmd, G4UIcommand::SetGuidance(), G4UIcmdWithADoubleAndUnit::SetParameterName(), G4UIcmdWith3VectorAndUnit::SetParameterName(), and G4AnyType::TypeInfo().
|
virtual |
The concrete, but generic implementation of this method.
Reimplemented from G4UImessenger.
Definition at line 140 of file G4GenericMessenger.cc.
References G4UIcommand::GetCommandName(), G4AnyType::ToString(), and G4GenericMessenger::Property::variable.
Definition at line 100 of file G4GenericMessenger.hh.
|
virtual |
The concrete, generic implementation of this method converts the string "newValue" to action.
Reimplemented from G4UImessenger.
Definition at line 150 of file G4GenericMessenger.cc.
References G4UIcommand::ConvertToDimensioned3Vector(), G4UIcommand::ConvertToDimensionedDouble(), G4UIcommand::ConvertToString(), G4AnyType::FromString(), G4UIcommand::GetCommandName(), python.hepunit::m, G4GenericMessenger::Method::method, G4AnyMethod::NArg(), G4GenericMessenger::Method::object, and G4GenericMessenger::Property::variable.