Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
G4VMaterialExtension.hh
이 파일의 문서화 페이지로 가기
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 //
27 // $Id: G4VMaterialExtension.hh 96776 2016-05-06 14:11:00Z vnivanch $
28 //
29 
30 //---------------------------------------------------------------------------
31 //
32 // ClassName: G4VMaterialExtension
33 //
34 // Description: Contains extended material properties
35 //
36 // Class description:
37 //
38 // Is used to define the additional material information. This class
39 // is an abstract base class to be extended for each extension.
40 // Object(s) of G4VMaterialExtension should be registered to
41 // G4ExtendedMaterial.
42 //
43 
44 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
45 
46 #ifndef G4VMATERIALEXTENSION_HH
47 #define G4VMATERIALEXTENSION_HH 1
48 
49 #include "globals.hh"
50 #include "G4ios.hh"
51 #include <functional>
52 #include <string>
53 #include "G4String.hh"
54 
55 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
56 //Hash of extension material name
57 using G4MaterialExtensionHash=std::hash<std::string>;
58 
60 {
61 public: // with description
62  //
63  // Base class constructor
64  //
67  virtual ~G4VMaterialExtension() {;}
68 
69  virtual void Print() const = 0;
70 
71  // Return the hash value of this extension
72  const std::size_t& GetHash() const { return fHash;}
73  // Return the extension name
74  const G4String& GetName() const { return fName; }
75 protected:
76  // Name of the extension
77  const G4String& fName;
78  // Hash value of the name.
79  // Calculated at initialization time
80  const std::size_t fHash;
81 };
82 
83 //....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo......
84 
85 #endif
const XML_Char * name
Definition: expat.h:151
const std::size_t & GetHash() const
virtual void Print() const =0
G4VMaterialExtension(const G4String &name)
const G4String & GetName() const
std::hash< std::string > G4MaterialExtensionHash