|
||||
File indexing completed on 2025-01-18 09:59:21
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 // Abstract filter class. 0028 // 0029 // Jane Tinslay, March 2006 0030 // 0031 #ifndef G4VFILTER_HH 0032 #define G4VFILTER_HH 0033 0034 #include "globals.hh" 0035 #include "G4String.hh" 0036 #include <iostream> 0037 0038 template <typename T> 0039 class G4VFilter { 0040 0041 public: // With description 0042 0043 typedef T Type; 0044 0045 // Construct with filter name 0046 G4VFilter(const G4String& name); 0047 0048 virtual ~G4VFilter(); 0049 0050 // Filter method 0051 virtual G4bool Accept(const T&) const = 0; 0052 0053 // Print configuration 0054 virtual void PrintAll(std::ostream& ostr) const = 0; 0055 0056 // Reset 0057 virtual void Reset() = 0; 0058 0059 // Filter name 0060 G4String Name() const; 0061 G4String GetName() const; 0062 0063 private: 0064 0065 // Data member 0066 G4String fName; 0067 0068 }; 0069 0070 template <typename T> 0071 G4VFilter<T>::G4VFilter(const G4String& name) 0072 :fName(name) 0073 {} 0074 0075 template <typename T> 0076 G4VFilter<T>::~G4VFilter() {} 0077 0078 template <typename T> 0079 G4String 0080 G4VFilter<T>::Name() const 0081 { 0082 return fName; 0083 } 0084 0085 template <typename T> 0086 G4String 0087 G4VFilter<T>::GetName() const 0088 { 0089 return Name(); 0090 } 0091 0092 #endif 0093
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |