Geant4  10.03.p01
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4VMaterialExtension.hh
Go to the documentation of this file.
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
G4VMaterialExtension(const G4String &name)
virtual void Print() const =0
const std::size_t & GetHash() const
const G4String & GetName() const
std::hash< std::string > G4MaterialExtensionHash