G4ModelCmdApplyDouble< M > Class Template Reference

#include <G4ModelApplyCommandsT.hh>

Inheritance diagram for G4ModelCmdApplyDouble< M >:

G4VModelCommand< M > G4UImessenger

Public Member Functions

 G4ModelCmdApplyDouble (M *model, const G4String &placement, const G4String &cmdName)
virtual ~G4ModelCmdApplyDouble ()
void SetNewValue (G4UIcommand *command, G4String newValue)

Protected Member Functions

virtual void Apply (const G4double &)=0
G4UIcmdWithADoubleCommand ()

Detailed Description

template<typename M>
class G4ModelCmdApplyDouble< M >

Definition at line 361 of file G4ModelApplyCommandsT.hh.


Constructor & Destructor Documentation

template<typename M>
G4ModelCmdApplyDouble< M >::G4ModelCmdApplyDouble ( M *  model,
const G4String placement,
const G4String cmdName 
)

Definition at line 385 of file G4ModelApplyCommandsT.hh.

References G4UIcmdWithADouble::SetParameterName().

00386   :G4VModelCommand<M>(model, placement)
00387 {
00388   G4String dir = placement+"/"+model->Name()+"/"+cmdName;
00389 
00390   fpCmd = new G4UIcmdWithADouble(dir, this);
00391   fpCmd->SetParameterName("Double", false);
00392 }

template<typename M>
G4ModelCmdApplyDouble< M >::~G4ModelCmdApplyDouble (  )  [virtual]

Definition at line 395 of file G4ModelApplyCommandsT.hh.

00396 {  
00397   delete fpCmd;
00398 }


Member Function Documentation

template<typename M>
virtual void G4ModelCmdApplyDouble< M >::Apply ( const G4double  )  [protected, pure virtual]

Referenced by G4ModelCmdApplyDouble< M >::SetNewValue().

template<typename M>
G4UIcmdWithADouble* G4ModelCmdApplyDouble< M >::Command (  )  [inline, protected]

Definition at line 376 of file G4ModelApplyCommandsT.hh.

00376 {return fpCmd;}

template<typename M>
void G4ModelCmdApplyDouble< M >::SetNewValue ( G4UIcommand command,
G4String  newValue 
) [virtual]

Reimplemented from G4UImessenger.

Definition at line 401 of file G4ModelApplyCommandsT.hh.

References G4ModelCmdApplyDouble< M >::Apply(), G4VVisManager::GetConcreteInstance(), and G4UIcmdWithADouble::GetNewDoubleValue().

00402 {
00403   Apply(fpCmd->GetNewDoubleValue(newValue));
00404   G4VVisManager* visManager = G4VVisManager::GetConcreteInstance();
00405   if (visManager) visManager->NotifyHandlers();
00406 }


The documentation for this class was generated from the following file:
Generated on Mon May 27 17:52:29 2013 for Geant4 by  doxygen 1.4.7