Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VisCommandSceneHandlerList Class Reference

#include <G4VisCommandsSceneHandler.hh>

Inheritance diagram for G4VisCommandSceneHandlerList:
Collaboration diagram for G4VisCommandSceneHandlerList:

Public Member Functions

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

Additional Inherited Members

- Static Public Member Functions inherited from G4VVisCommand
static void SetVisManager (G4VisManager *)
 
static const G4ColourGetCurrentColour ()
 
static G4double GetCurrentLineWidth ()
 
static const G4ColourGetCurrentTextColour ()
 
static G4Text::Layout GetCurrentTextLayout ()
 
static G4double GetCurrentTextSize ()
 
- Protected Member Functions inherited from G4VVisCommand
void UpdateVisManagerScene (const G4String &sceneName="")
 
- 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)
 
- Static Protected Member Functions inherited from G4VVisCommand
static G4String ConvertToString (G4double x, G4double y, const char *unitName)
 
static void ConvertToDoublePair (const G4String &paramString, G4double &xval, G4double &yval)
 
- Protected Attributes inherited from G4UImessenger
G4UIdirectorybaseDir
 
G4String baseDirName
 
G4bool commandsShouldBeInMaster
 
- Static Protected Attributes inherited from G4VVisCommand
static G4VisManagerfpVisManager = 0
 
static G4int fErrorCode = 0
 
static G4Colour fCurrentColour = G4Colour::White()
 
static G4double fCurrentLineWidth = 1.
 
static G4Colour fCurrentTextColour = G4Colour::Blue()
 
static G4Text::Layout fCurrentTextLayout = G4Text::left
 
static G4double fCurrentTextSize = 12.
 
static
G4ModelingParameters::PVNameCopyNoPath 
fCurrentTouchablePath
 

Detailed Description

Definition at line 63 of file G4VisCommandsSceneHandler.hh.

Constructor & Destructor Documentation

G4VisCommandSceneHandlerList::G4VisCommandSceneHandlerList ( )

Definition at line 363 of file G4VisCommandsSceneHandler.cc.

363  {
364  G4bool omitable;
365  fpCommand = new G4UIcommand ("/vis/sceneHandler/list", this);
366  fpCommand -> SetGuidance ("Lists scene handler(s).");
367  fpCommand -> SetGuidance
368  ("\"help /vis/verbose\" for definition of verbosity.");
369  G4UIparameter* parameter;
370  parameter = new G4UIparameter("scene-handler-name", 's', omitable = true);
371  parameter -> SetDefaultValue ("all");
372  fpCommand -> SetParameter (parameter);
373  parameter = new G4UIparameter ("verbosity", 's', omitable = true);
374  parameter -> SetDefaultValue ("warnings");
375  fpCommand -> SetParameter (parameter);
376 }
bool G4bool
Definition: G4Types.hh:79
G4VisCommandSceneHandlerList::~G4VisCommandSceneHandlerList ( )

Definition at line 378 of file G4VisCommandsSceneHandler.cc.

378  {
379  delete fpCommand;
380 }

Member Function Documentation

G4String G4VisCommandSceneHandlerList::GetCurrentValue ( G4UIcommand command)
virtual

Reimplemented from G4UImessenger.

Definition at line 382 of file G4VisCommandsSceneHandler.cc.

382  {
383  return "";
384 }
void G4VisCommandSceneHandlerList::SetNewValue ( G4UIcommand command,
G4String  newValue 
)
virtual

Reimplemented from G4UImessenger.

Definition at line 386 of file G4VisCommandsSceneHandler.cc.

387  {
388  G4String name, verbosityString;
389  std::istringstream is (newValue);
390  is >> name >> verbosityString;
391  G4VisManager::Verbosity verbosity =
392  fpVisManager->GetVerbosityValue(verbosityString);
393  const G4VSceneHandler* currentSceneHandler =
394  fpVisManager -> GetCurrentSceneHandler ();
395  G4String currentName;
396  if (currentSceneHandler) currentName = currentSceneHandler->GetName();
397 
398  const G4SceneHandlerList& list = fpVisManager -> GetAvailableSceneHandlers ();
399  G4bool found = false;
400  for (size_t iSH = 0; iSH < list.size (); iSH++) {
401  const G4String& iName = list [iSH] -> GetName ();
402  if (name != "all") {
403  if (name != iName) continue;
404  }
405  found = true;
406  if (iName == currentName) {
407  G4cout << " (current)";
408  }
409  else {
410  G4cout << " ";
411  }
412  G4cout << " scene handler \"" << list [iSH] -> GetName () << "\""
413  << " (" << list [iSH] -> GetGraphicsSystem () -> GetName () << ")";
414  if (verbosity >= G4VisManager::parameters) {
415  G4cout << "\n " << *(list [iSH]);
416  }
417  G4cout << G4endl;
418  }
419  if (!found) {
420  G4cout << "No scene handlers found";
421  if (name != "all") {
422  G4cout << " of name \"" << name << "\"";
423  }
424  G4cout << "." << G4endl;
425  }
426 }
const XML_Char * name
Definition: expat.h:151
const G4String & GetName() const
static Verbosity GetVerbosityValue(const G4String &)
G4GLOB_DLL std::ostream G4cout
bool G4bool
Definition: G4Types.hh:79
#define G4endl
Definition: G4ios.hh:61
static G4VisManager * fpVisManager

Here is the call graph for this function:


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