source: trunk/source/visualization/modeling/include/G4VModelCommand.hh @ 1337

Last change on this file since 1337 was 1337, checked in by garnier, 14 years ago

tag geant4.9.4 beta 1 + modifs locales

File size: 3.0 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer                                           *
4// *                                                                  *
5// * The  Geant4 software  is  copyright of the Copyright Holders  of *
6// * the Geant4 Collaboration.  It is provided  under  the terms  and *
7// * conditions of the Geant4 Software License,  included in the file *
8// * LICENSE and available at  http://cern.ch/geant4/license .  These *
9// * include a list of copyright holders.                             *
10// *                                                                  *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work  make  any representation or  warranty, express or implied, *
14// * regarding  this  software system or assume any liability for its *
15// * use.  Please see the license in the file  LICENSE  and URL above *
16// * for the full disclaimer and the limitation of liability.         *
17// *                                                                  *
18// * This  code  implementation is the result of  the  scientific and *
19// * technical work of the GEANT4 collaboration.                      *
20// * By using,  copying,  modifying or  distributing the software (or *
21// * any work based  on the software)  you  agree  to acknowledge its *
22// * use  in  resulting  scientific  publications,  and indicate your *
23// * acceptance of all terms of the Geant4 Software license.          *
24// ********************************************************************
25//
26// $Id: G4VModelCommand.hh,v 1.4 2006/09/11 21:22:02 tinslay Exp $
27// GEANT4 tag $Name: geant4-09-04-beta-01 $
28//
29// Jane Tinslay, John Allison, Joseph Perl November 2005
30//
31// Class Description
32// Templated base class for model messengers. Commands specific to a particular
33// concrete model should inherit from G4VModelCommand, with the concrete model
34// type as the template parameter.
35// Class Description - End:
36
37#ifndef G4VMODELCOMMAND_HH
38#define G4VMODELCOMMAND_HH
39
40#include "G4UImessenger.hh"
41#include "G4String.hh"
42
43class G4UIcommand;
44
45template <typename T>
46class G4VModelCommand : public G4UImessenger {
47
48public: 
49
50  // Constructor
51  G4VModelCommand(T* model, const G4String& placement="");
52
53  // Destructor
54  virtual ~G4VModelCommand();
55
56  // Methods
57  G4String GetCurrentValue(G4UIcommand* command);
58  G4String Placement();
59
60protected:
61
62  // Access to model
63  T* Model();
64
65private:
66
67  // Data members
68  T* fpModel;
69  G4String fPlacement;
70};
71
72template <typename T>
73G4VModelCommand<T>::G4VModelCommand(T* model, const G4String& placement)
74  :fpModel(model)
75  ,fPlacement(placement)
76{}
77
78template <typename T>
79G4VModelCommand<T>::~G4VModelCommand() {}
80
81template <typename T>
82G4String
83G4VModelCommand<T>::GetCurrentValue(G4UIcommand*) 
84{
85  return "";
86}
87
88template <typename T>
89T*
90G4VModelCommand<T>::Model() 
91{
92  return fpModel;
93}
94
95template <typename T>
96G4String
97G4VModelCommand<T>::Placement() 
98{
99  return fPlacement;
100}
101
102#endif
103
104
105
Note: See TracBrowser for help on using the repository browser.