G4ModelCmdApplyInteger< M > Class Template Reference

#include <G4ModelApplyCommandsT.hh>

Inheritance diagram for G4ModelCmdApplyInteger< M >:

G4VModelCommand< M > G4UImessenger G4ModelCmdAddInt< M >

Public Member Functions

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

Protected Member Functions

virtual void Apply (const G4int &)=0
G4UIcmdWithAnIntegerCommand ()

Detailed Description

template<typename M>
class G4ModelCmdApplyInteger< M >

Definition at line 461 of file G4ModelApplyCommandsT.hh.


Constructor & Destructor Documentation

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

Definition at line 484 of file G4ModelApplyCommandsT.hh.

References G4UIcmdWithAnInteger::SetParameterName().

00485   :G4VModelCommand<M>(model, placement)
00486 {
00487   G4String dir = placement+"/"+model->Name()+"/"+cmdName;
00488 
00489   fpCmd = new G4UIcmdWithAnInteger(dir, this);
00490   fpCmd->SetParameterName("Integer", false);
00491 }

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

Definition at line 494 of file G4ModelApplyCommandsT.hh.

00495 {  
00496   delete fpCmd;
00497 }


Member Function Documentation

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

Implemented in G4ModelCmdAddInt< M >.

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

template<typename M>
G4UIcmdWithAnInteger* G4ModelCmdApplyInteger< M >::Command (  )  [inline, protected]

Definition at line 476 of file G4ModelApplyCommandsT.hh.

Referenced by G4ModelCmdAddInt< M >::G4ModelCmdAddInt().

00476 {return fpCmd;}

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

Reimplemented from G4UImessenger.

Definition at line 500 of file G4ModelApplyCommandsT.hh.

References G4ModelCmdApplyInteger< M >::Apply(), G4VVisManager::GetConcreteInstance(), and G4UIcmdWithAnInteger::GetNewIntValue().

00501 {
00502   Apply(fpCmd->GetNewIntValue(newValue));
00503   G4VVisManager* visManager = G4VVisManager::GetConcreteInstance();
00504   if (visManager) visManager->NotifyHandlers();
00505 }


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