Geant4 11.2.2
Toolkit for the simulation of the passage of particles through matter
Loading...
Searching...
No Matches
G4OpenInventorXtExaminerViewerMessenger Class Reference

#include <G4OpenInventorXtExaminerViewerMessenger.hh>

+ Inheritance diagram for G4OpenInventorXtExaminerViewerMessenger:

Public Member Functions

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

Static Public Member Functions

static G4OpenInventorXtExaminerViewerMessengerGetInstance ()
 

Additional Inherited Members

- Protected Member Functions inherited from G4UImessenger
G4String ItoS (G4int i)
 
G4String LtoS (G4long l)
 
G4String DtoS (G4double a)
 
G4String BtoS (G4bool b)
 
G4int StoI (const G4String &s)
 
G4long StoL (const G4String &s)
 
G4double StoD (const 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 = nullptr
 
G4String baseDirName = ""
 
G4bool commandsShouldBeInMaster = false
 

Detailed Description

Definition at line 37 of file G4OpenInventorXtExaminerViewerMessenger.hh.

Constructor & Destructor Documentation

◆ ~G4OpenInventorXtExaminerViewerMessenger()

G4OpenInventorXtExaminerViewerMessenger::~G4OpenInventorXtExaminerViewerMessenger ( )

Definition at line 63 of file G4OpenInventorXtExaminerViewerMessenger.cc.

65{
66 delete fpCommandPathLookahead;
67 delete fpDirectory;
68}

Member Function Documentation

◆ GetInstance()

G4OpenInventorXtExaminerViewerMessenger * G4OpenInventorXtExaminerViewerMessenger::GetInstance ( )
static

◆ SetNewValue()

void G4OpenInventorXtExaminerViewerMessenger::SetNewValue ( G4UIcommand * command,
G4String newValue )
virtual

Reimplemented from G4UImessenger.

Definition at line 70 of file G4OpenInventorXtExaminerViewerMessenger.cc.

72{
74
75 G4VViewer* pVViewer = pVisManager->GetCurrentViewer();
76
77 if (!pVViewer) {
78 G4cout <<
79 "G4OpenInventorXtExaminerViewerMessenger::SetNewValue: "
80 "No current viewer." << G4endl <<
81 "Use /vis/open, or similar, to get one." << G4endl;
82 return;
83 }
84
86 dynamic_cast<G4OpenInventorXtExaminerViewer*>(pVViewer);
87
88 if (!pViewer) {
89 G4cout <<
90 "G4OpenInventorXtExaminerViewerMessenger::SetNewValue:" << G4endl <<
91 "Current viewer is not of type OIXE." << G4endl <<
92 "Use /vis/viewer/select or /vis/open." << G4endl;
93 return;
94 }
95
96 if (command == fpCommandPathLookahead) {
97 G4int lookahead =
98 fpCommandPathLookahead->GetNewIntValue(newValue);
99 if (lookahead > 0) pViewer->pathLookahead = lookahead;
100 }
101}
int G4int
Definition G4Types.hh:85
#define G4endl
Definition G4ios.hh:67
G4GLOB_DLL std::ostream G4cout
static G4int GetNewIntValue(const char *paramString)
G4VViewer * GetCurrentViewer() const
static G4VisManager * GetInstance()

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