G4VisCommandEnable Class Reference

#include <G4VisCommands.hh>

Inheritance diagram for G4VisCommandEnable:

G4VVisCommand G4UImessenger

Public Member Functions

 G4VisCommandEnable ()
virtual ~G4VisCommandEnable ()
G4String GetCurrentValue (G4UIcommand *command)
void SetNewValue (G4UIcommand *command, G4String newValue)

Detailed Description

Definition at line 52 of file G4VisCommands.hh.


Constructor & Destructor Documentation

G4VisCommandEnable::G4VisCommandEnable (  ) 

Definition at line 77 of file G4VisCommands.cc.

00077                                         {
00078   G4bool omitable;
00079 
00080   fpCommand = new G4UIcmdWithABool("/vis/enable", this);
00081   fpCommand -> SetGuidance("Enables/disables visualization system.");
00082   fpCommand -> SetParameterName("enabled", omitable=true);
00083   fpCommand -> SetDefaultValue(true);
00084 
00085   fpCommand1 = new G4UIcmdWithoutParameter("/vis/disable", this);
00086   fpCommand1 -> SetGuidance("Disables visualization system.");
00087 }

G4VisCommandEnable::~G4VisCommandEnable (  )  [virtual]

Definition at line 89 of file G4VisCommands.cc.

00089                                          {
00090   delete fpCommand;
00091   delete fpCommand1;
00092 }


Member Function Documentation

G4String G4VisCommandEnable::GetCurrentValue ( G4UIcommand command  )  [virtual]

Reimplemented from G4UImessenger.

Definition at line 94 of file G4VisCommands.cc.

00094                                                           {
00095   return G4String();
00096 }

void G4VisCommandEnable::SetNewValue ( G4UIcommand command,
G4String  newValue 
) [virtual]

Reimplemented from G4UImessenger.

Definition at line 98 of file G4VisCommands.cc.

References G4UIcommand::ConvertToBool(), G4VisManager::Disable(), G4VisManager::Enable(), and G4VVisCommand::fpVisManager.

00099                                                          {
00100   if (command == fpCommand) {
00101     G4bool enable = G4UIcommand::ConvertToBool(newValue);
00102     if (enable) fpVisManager->Enable();  // Printing is in vis manager.
00103     else fpVisManager->Disable();        // Printing is in vis manager.
00104   } else fpVisManager->Disable();        // Printing is in vis manager.
00105   // Note: Printing is in vis manager.
00106 }


The documentation for this class was generated from the following files:
Generated on Mon May 27 17:53:44 2013 for Geant4 by  doxygen 1.4.7