|
||||
File indexing completed on 2025-01-18 09:59:25
0001 // 0002 // ******************************************************************** 0003 // * License and Disclaimer * 0004 // * * 0005 // * The Geant4 software is copyright of the Copyright Holders of * 0006 // * the Geant4 Collaboration. It is provided under the terms and * 0007 // * conditions of the Geant4 Software License, included in the file * 0008 // * LICENSE and available at http://cern.ch/geant4/license . These * 0009 // * include a list of copyright holders. * 0010 // * * 0011 // * Neither the authors of this software system, nor their employing * 0012 // * institutes,nor the agencies providing financial support for this * 0013 // * work make any representation or warranty, express or implied, * 0014 // * regarding this software system or assume any liability for its * 0015 // * use. Please see the license in the file LICENSE and URL above * 0016 // * for the full disclaimer and the limitation of liability. * 0017 // * * 0018 // * This code implementation is the result of the scientific and * 0019 // * technical work of the GEANT4 collaboration. * 0020 // * By using, copying, modifying or distributing the software (or * 0021 // * any work based on the software) you agree to acknowledge its * 0022 // * use in resulting scientific publications, and indicate your * 0023 // * acceptance of all terms of the Geant4 Software license. * 0024 // ******************************************************************** 0025 // 0026 // 0027 // Jane Tinslay, John Allison, Joseph Perl November 2005 0028 // 0029 // Class Description 0030 // Templated base class for model messengers. Commands specific to a particular 0031 // concrete model should inherit from G4VModelCommand, with the concrete model 0032 // type as the template parameter. 0033 // Class Description - End: 0034 0035 #ifndef G4VMODELCOMMAND_HH 0036 #define G4VMODELCOMMAND_HH 0037 0038 #include "G4UImessenger.hh" 0039 #include "G4String.hh" 0040 0041 class G4UIcommand; 0042 0043 template <typename T> 0044 class G4VModelCommand : public G4UImessenger { 0045 0046 public: 0047 0048 // Constructor 0049 G4VModelCommand(T* model, const G4String& placement=""); 0050 0051 // Destructor 0052 virtual ~G4VModelCommand(); 0053 0054 // Methods 0055 G4String GetCurrentValue(G4UIcommand* command); 0056 G4String Placement(); 0057 0058 protected: 0059 0060 // Access to model 0061 T* Model(); 0062 0063 private: 0064 0065 // Data members 0066 T* fpModel; 0067 G4String fPlacement; 0068 }; 0069 0070 template <typename T> 0071 G4VModelCommand<T>::G4VModelCommand(T* model, const G4String& placement) 0072 :fpModel(model) 0073 ,fPlacement(placement) 0074 {} 0075 0076 template <typename T> 0077 G4VModelCommand<T>::~G4VModelCommand() {} 0078 0079 template <typename T> 0080 G4String 0081 G4VModelCommand<T>::GetCurrentValue(G4UIcommand*) 0082 { 0083 return ""; 0084 } 0085 0086 template <typename T> 0087 T* 0088 G4VModelCommand<T>::Model() 0089 { 0090 return fpModel; 0091 } 0092 0093 template <typename T> 0094 G4String 0095 G4VModelCommand<T>::Placement() 0096 { 0097 return fPlacement; 0098 } 0099 0100 #endif 0101 0102 0103
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |