Geant4
10.03
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
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
59
class
G4VMaterialExtension
60
{
61
public
:
// with description
62
//
63
// Base class constructor
64
//
65
G4VMaterialExtension
(
const
G4String
&
name
) :
66
fName
(name),
fHash
(
G4MaterialExtensionHash
{}(
name
)) {}
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
G4VMaterialExtension::G4VMaterialExtension
G4VMaterialExtension(const G4String &name)
Definition:
G4VMaterialExtension.hh:65
G4InuclParticleNames::name
const char * name(G4int ptype)
Definition:
G4InuclParticleNames.hh:77
G4VMaterialExtension::Print
virtual void Print() const =0
G4VMaterialExtension::GetHash
const std::size_t & GetHash() const
Definition:
G4VMaterialExtension.hh:72
G4VMaterialExtension::fName
const G4String & fName
Definition:
G4VMaterialExtension.hh:77
G4VMaterialExtension::GetName
const G4String & GetName() const
Definition:
G4VMaterialExtension.hh:74
G4VMaterialExtension::~G4VMaterialExtension
virtual ~G4VMaterialExtension()
Definition:
G4VMaterialExtension.hh:67
G4VMaterialExtension
Definition:
G4VMaterialExtension.hh:59
G4VMaterialExtension::fHash
const std::size_t fHash
Definition:
G4VMaterialExtension.hh:80
globals.hh
G4ios.hh
G4MaterialExtensionHash
std::hash< std::string > G4MaterialExtensionHash
Definition:
G4VMaterialExtension.hh:57
G4String
Definition:
G4String.hh:45
geant4.10.03
source
materials
include
G4VMaterialExtension.hh
Generated on Thu Feb 14 2002 02:28:22 for Geant4 by
1.8.8