Geant4-11
|
#include <G4GenericMessenger.hh>
Data Structures | |
struct | Command |
struct | Method |
struct | Property |
Public Member Functions | |
G4bool | CommandsShouldBeInMaster () const |
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="") |
Command & | DeclareProperty (const G4String &name, const G4AnyType &variable, const G4String &doc="") |
Command & | DeclarePropertyWithUnit (const G4String &name, const G4String &defaultUnit, const G4AnyType &variable, const G4String &doc="") |
G4GenericMessenger (void *obj, const G4String &dir="", const G4String &doc="") | |
virtual G4String | GetCurrentValue (G4UIcommand *command) |
G4bool | operator!= (const G4UImessenger &messenger) const |
G4bool | operator== (const G4UImessenger &messenger) const |
void | SetDirectory (const G4String &dir) |
void | SetGuidance (const G4String &s) |
virtual void | SetNewValue (G4UIcommand *command, G4String newValue) |
void | Sort (G4bool val=true) |
virtual | ~G4GenericMessenger () |
Protected Member Functions | |
void | AddUIcommand (G4UIcommand *newCommand) |
G4String | BtoS (G4bool b) |
template<typename T > | |
T * | CreateCommand (const G4String &cname, const G4String &dsc) |
void | CreateDirectory (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true) |
G4String | DtoS (G4double a) |
G4String | ItoS (G4int i) |
G4bool | StoB (G4String s) |
G4double | StoD (G4String s) |
G4int | StoI (G4String s) |
G4long | StoL (G4String s) |
Protected Attributes | |
G4UIdirectory * | baseDir = nullptr |
G4String | baseDirName = "" |
G4bool | commandsShouldBeInMaster = false |
Private Attributes | |
G4UIdirectory * | dircmd = nullptr |
G4String | directory |
std::map< G4String, Method > | methods |
void * | object = nullptr |
std::map< G4String, Property > | properties |
Definition at line 48 of file G4GenericMessenger.hh.
G4GenericMessenger::G4GenericMessenger | ( | void * | obj, |
const G4String & | dir = "" , |
||
const G4String & | doc = "" |
||
) |
Definition at line 63 of file G4GenericMessenger.cc.
References dircmd, and G4UIcommand::SetGuidance().
|
virtual |
Definition at line 72 of file G4GenericMessenger.cc.
References dircmd, methods, and properties.
|
protectedinherited |
Definition at line 149 of file G4UImessenger.cc.
References G4cerr, G4endl, and G4UIcommand::GetCommandPath().
Definition at line 98 of file G4UImessenger.cc.
|
inlineinherited |
Definition at line 77 of file G4UImessenger.hh.
References G4UImessenger::commandsShouldBeInMaster.
Referenced by G4UIcommand::G4UIcommandCommonConstructorCode().
|
protectedinherited |
Definition at line 110 of file G4UImessenger.hh.
References G4UImessenger::baseDirName.
|
protectedinherited |
Definition at line 156 of file G4UImessenger.cc.
References G4UImessenger::baseDir, G4UImessenger::baseDirName, G4UIcommandTree::FindCommandTree(), G4UIcommandTree::GetPathName(), G4UImanager::GetTree(), G4UImanager::GetUIpointer(), and G4UIcommand::SetGuidance().
Referenced by G4MoleculeShootMessenger::G4MoleculeShootMessenger(), and G4UImessenger::G4UImessenger().
G4GenericMessenger::Command & G4GenericMessenger::DeclareMethod | ( | const G4String & | name, |
const G4AnyMethod & | fun, | ||
const G4String & | doc = "" |
||
) |
Definition at line 146 of file G4GenericMessenger.cc.
References G4AnyMethod::ArgType(), directory, G4UImessenger::ItoS(), methods, G4InuclParticleNames::name(), 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 175 of file G4GenericMessenger.cc.
References directory, FatalException, G4Exception(), methods, G4InuclParticleNames::name(), G4AnyMethod::NArg(), and G4UIcommand::SetGuidance().
G4GenericMessenger::Command & G4GenericMessenger::DeclareProperty | ( | const G4String & | name, |
const G4AnyType & | variable, | ||
const G4String & | doc = "" |
||
) |
Definition at line 81 of file G4GenericMessenger.cc.
References directory, G4InuclParticleNames::name(), properties, G4UIcommand::SetGuidance(), G4UIcommand::SetParameter(), and G4AnyType::TypeInfo().
Referenced by DeclarePropertyWithUnit(), and G4SteppingVerboseWithUnits::SetManager().
G4GenericMessenger::Command & G4GenericMessenger::DeclarePropertyWithUnit | ( | const G4String & | name, |
const G4String & | defaultUnit, | ||
const G4AnyType & | variable, | ||
const G4String & | doc = "" |
||
) |
Definition at line 115 of file G4GenericMessenger.cc.
References DeclareProperty(), directory, G4InuclParticleNames::name(), properties, G4UIcommand::SetGuidance(), and G4AnyType::TypeInfo().
Definition at line 90 of file G4UImessenger.cc.
Referenced by G4ScoreQuantityMessenger::FilterCommands(), and G4UIcontrolMessenger::SetNewValue().
|
virtual |
Reimplemented from G4UImessenger.
Definition at line 200 of file G4GenericMessenger.cc.
References G4cout, G4endl, G4UIcommand::GetCommandName(), methods, properties, G4AnyType::ToString(), and G4GenericMessenger::Property::variable.
Definition at line 82 of file G4UImessenger.cc.
Referenced by DeclareMethod(), and G4ParticleGunMessenger::GetCurrentValue().
|
inherited |
Definition at line 76 of file G4UImessenger.cc.
|
inherited |
Definition at line 70 of file G4UImessenger.cc.
|
inline |
void G4GenericMessenger::SetGuidance | ( | const G4String & | s | ) |
Definition at line 255 of file G4GenericMessenger.cc.
References dircmd, s, and G4UIcommand::SetGuidance().
|
virtual |
Reimplemented from G4UImessenger.
Definition at line 220 of file G4GenericMessenger.cc.
References G4UIcommand::ConvertToDimensioned3Vector(), G4UIcommand::ConvertToDimensionedDouble(), G4UIcommand::ConvertToString(), G4AnyType::FromString(), G4UIcommand::GetCommandName(), m, methods, properties, and G4GenericMessenger::Property::variable.
|
inline |
Definition at line 137 of file G4UImessenger.cc.
References G4StrUtil::to_upper_copy().
Referenced by G4LocalThreadCoutMessenger::SetNewValue(), G4CascadeParamMessenger::SetNewValue(), G4ScoreQuantityMessenger::SetNewValue(), and G4ScoringMessenger::SetNewValue().
Definition at line 127 of file G4UImessenger.cc.
Referenced by G4ScoreQuantityMessenger::FParticleWithEnergyCommand(), G4ParticleGunMessenger::IonCommand(), G4GeneralParticleSourceMessenger::IonCommand(), G4UIcontrolMessenger::SetNewValue(), G4MatScanMessenger::SetNewValue(), G4VisCommandSceneAddText::SetNewValue(), G4VisCommandSceneAddText2D::SetNewValue(), G4ScoreQuantityMessenger::SetNewValue(), G4ScoringMessenger::SetNewValue(), and G4PolarizationMessenger::SetNewValue().
Definition at line 107 of file G4UImessenger.cc.
Referenced by G4ScoringMessenger::Fill1D(), G4ParticleGunMessenger::IonCommand(), G4GeneralParticleSourceMessenger::IonCommand(), G4ParticleGunMessenger::IonLevelCommand(), G4GeneralParticleSourceMessenger::IonLvlCommand(), G4ScoringMessenger::MeshBinCommand(), G4LocalThreadCoutMessenger::SetNewValue(), G4UIcontrolMessenger::SetNewValue(), G4MatScanMessenger::SetNewValue(), G4GMocrenMessenger::SetNewValue(), G4ScoreQuantityMessenger::SetNewValue(), and G4ScoringMessenger::SetNewValue().
Definition at line 117 of file G4UImessenger.cc.
Referenced by G4RunMessenger::SetNewValue().
|
protectedinherited |
Definition at line 102 of file G4UImessenger.hh.
Referenced by G4UImessenger::CreateDirectory(), and G4UImessenger::~G4UImessenger().
|
protectedinherited |
Definition at line 103 of file G4UImessenger.hh.
Referenced by G4UImessenger::CreateCommand(), and G4UImessenger::CreateDirectory().
|
protectedinherited |
Definition at line 104 of file G4UImessenger.hh.
Referenced by G4UImessenger::CommandsShouldBeInMaster(), and G4GeneralParticleSourceMessenger::G4GeneralParticleSourceMessenger().
|
private |
Definition at line 204 of file G4GenericMessenger.hh.
Referenced by G4GenericMessenger(), SetGuidance(), Sort(), and ~G4GenericMessenger().
|
private |
Definition at line 205 of file G4GenericMessenger.hh.
Referenced by DeclareMethod(), DeclareMethodWithUnit(), DeclareProperty(), DeclarePropertyWithUnit(), and SetDirectory().
Definition at line 203 of file G4GenericMessenger.hh.
Referenced by DeclareMethod(), DeclareMethodWithUnit(), GetCurrentValue(), SetNewValue(), and ~G4GenericMessenger().
|
private |
Definition at line 206 of file G4GenericMessenger.hh.
Definition at line 202 of file G4GenericMessenger.hh.
Referenced by DeclareProperty(), DeclarePropertyWithUnit(), GetCurrentValue(), SetNewValue(), and ~G4GenericMessenger().