Geant4  10.02.p03
PerspectiveVisActionMessenger Class Reference

#include <PerspectiveVisActionMessenger.hh>

Inheritance diagram for PerspectiveVisActionMessenger:
Collaboration diagram for PerspectiveVisActionMessenger:

Public Member Functions

 PerspectiveVisActionMessenger (PerspectiveVisAction *)
 
 ~PerspectiveVisActionMessenger ()
 
virtual void SetNewValue (G4UIcommand *, G4String)
 
- Public Member Functions inherited from G4UImessenger
 G4UImessenger ()
 
 G4UImessenger (const G4String &path, const G4String &dsc, G4bool commandsToBeBroadcasted=true)
 
virtual ~G4UImessenger ()
 
virtual G4String GetCurrentValue (G4UIcommand *command)
 
G4bool operator== (const G4UImessenger &messenger) const
 
G4bool CommandsShouldBeInMaster () const
 

Private Attributes

PerspectiveVisActionfPVA
 
G4UIdirectoryfpDirectory
 
G4UIcmdWithAStringfpCommandOS
 
G4UIcmdWithAStringfpCommandScene
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
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)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 

Detailed Description

Definition at line 41 of file PerspectiveVisActionMessenger.hh.

Constructor & Destructor Documentation

◆ PerspectiveVisActionMessenger()

PerspectiveVisActionMessenger::PerspectiveVisActionMessenger ( PerspectiveVisAction PVA)

Definition at line 44 of file PerspectiveVisActionMessenger.cc.

44  :
45  G4UImessenger(),
46  fPVA(PVA),
47  fpDirectory(0),
48  fpCommandOS(0),
50 {
51  G4bool omitable;
52 
53  fpDirectory = new G4UIdirectory ("/perspectiveDemo/");
54  fpDirectory -> SetGuidance ("Perspective demonstration commands.");
55 
56  fpCommandOS = new G4UIcmdWithAString ("/perspectiveDemo/optionString", this);
57  fpCommandOS -> SetGuidance
58  ("Option string - any combination of \"x\", \"y\", \"z\", \"a[ll]\".");
59  fpCommandOS -> SetGuidance
60  ("Controls direction of perspective lines.");
61  fpCommandOS -> SetParameterName ("option-string", omitable = true);
62  fpCommandOS -> SetDefaultValue("all");
63 
64  fpCommandScene = new G4UIcmdWithAString ("/perspectiveDemo/scene", this);
65  fpCommandScene -> SetGuidance
66  ("Scene name.");
67  fpCommandScene -> SetParameterName ("scene-name", omitable = true);
68  fpCommandScene -> SetDefaultValue("room-and-chair");
69  fpCommandScene -> SetCandidates("room-and-chair");
70 }
bool G4bool
Definition: G4Types.hh:79

◆ ~PerspectiveVisActionMessenger()

PerspectiveVisActionMessenger::~PerspectiveVisActionMessenger ( )

Definition at line 74 of file PerspectiveVisActionMessenger.cc.

75 {
76  delete fpCommandScene;
77  delete fpCommandOS;
78  delete fpDirectory;
79 }
Here is the call graph for this function:

Member Function Documentation

◆ SetNewValue()

void PerspectiveVisActionMessenger::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 84 of file PerspectiveVisActionMessenger.cc.

85 {
86  if (command == fpCommandOS)
87  {
88  fPVA->SetOptionString(newValue);
89  }
90 
91  else if (command == fpCommandScene)
92  {
93  fPVA->SetScene(newValue);
94  }
95 
96  G4UImanager::GetUIpointer()->ApplyCommand("/vis/viewer/rebuild");
97 }
void SetScene(const G4String &scene)
static G4UImanager * GetUIpointer()
Definition: G4UImanager.cc:58
void SetOptionString(const G4String &optionString)
G4int ApplyCommand(const char *aCommand)
Definition: G4UImanager.cc:446
Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ fpCommandOS

G4UIcmdWithAString* PerspectiveVisActionMessenger::fpCommandOS
private

Definition at line 50 of file PerspectiveVisActionMessenger.hh.

◆ fpCommandScene

G4UIcmdWithAString* PerspectiveVisActionMessenger::fpCommandScene
private

Definition at line 51 of file PerspectiveVisActionMessenger.hh.

◆ fpDirectory

G4UIdirectory* PerspectiveVisActionMessenger::fpDirectory
private

Definition at line 49 of file PerspectiveVisActionMessenger.hh.

◆ fPVA

PerspectiveVisAction* PerspectiveVisActionMessenger::fPVA
private

Definition at line 48 of file PerspectiveVisActionMessenger.hh.


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