Geant4 VMC Version 6.6
|
The map container for associated names. More...
#include <TG4NameMap.h>
Public Types | |
typedef std::map< G4String, G4String, std::less< G4String > > | Map |
The map of strings to strings. | |
typedef Map::iterator | MapIterator |
The iterator for the map of strings to strings. | |
typedef Map::const_iterator | MapConstIterator |
The constant iterator for the map of strings to strings. | |
Public Member Functions | |
TG4NameMap () | |
~TG4NameMap () | |
G4bool | Add (const G4String &first, const G4String &second) |
G4bool | AddInverse (const G4String &first, const G4String &second) |
G4bool | AddName (const G4String &name) |
const G4String & | GetFirst (const G4String &second) const |
const G4String & | GetSecond (const G4String &first) const |
void | PrintAll () const |
void | Clear () |
void | SetSecond (const G4String &name) |
Private Member Functions | |
TG4NameMap (const TG4NameMap &right) | |
Not implemented. | |
TG4NameMap & | operator= (const TG4NameMap &right) |
Not implemented. | |
Private Attributes | |
Map | fMap |
map container | |
Map | fInverseMap |
inverse map container | |
G4String | fSecond |
the current second | |
Static Private Attributes | |
static G4String | fgUndefined = "Undefined" |
the value of undefined second | |
The map container for associated names.
The names can be added into map either in pairs (Add() method) or standalone - then they are paired with the fSecond data member (AddName() method)
Definition at line 30 of file TG4NameMap.h.
std::map<G4String, G4String, std::less<G4String> > TG4NameMap::Map |
The map of strings to strings.
Definition at line 34 of file TG4NameMap.h.
Map::iterator TG4NameMap::MapIterator |
The iterator for the map of strings to strings.
Definition at line 37 of file TG4NameMap.h.
Map::const_iterator TG4NameMap::MapConstIterator |
The constant iterator for the map of strings to strings.
Definition at line 40 of file TG4NameMap.h.
TG4NameMap::TG4NameMap | ( | ) |
Default constructor
Definition at line 24 of file TG4NameMap.cxx.
TG4NameMap::~TG4NameMap | ( | ) |
Destructor
Definition at line 30 of file TG4NameMap.cxx.
|
private |
Not implemented.
G4bool TG4NameMap::Add | ( | const G4String & | first, |
const G4String & | second ) |
Add names pair to the map. fSecond is not used in this add method.
Definition at line 40 of file TG4NameMap.cxx.
Referenced by TG4ParticlesManager::DefineParticles().
G4bool TG4NameMap::AddInverse | ( | const G4String & | first, |
const G4String & | second ) |
Add names pair only to the inverse map.
Definition at line 56 of file TG4NameMap.cxx.
Referenced by TG4ParticlesManager::DefineParticles().
G4bool TG4NameMap::AddName | ( | const G4String & | name | ) |
Add name to the map.
Definition at line 70 of file TG4NameMap.cxx.
const G4String & TG4NameMap::GetFirst | ( | const G4String & | second | ) | const |
Get first name associated with given second name.
Definition at line 85 of file TG4NameMap.cxx.
Referenced by AddInverse(), and TG4ParticlesManager::GetParticleDefinition().
const G4String & TG4NameMap::GetSecond | ( | const G4String & | first | ) | const |
Get second name associated with given first name.
Definition at line 97 of file TG4NameMap.cxx.
Referenced by Add(), AddName(), and TG4ParticlesManager::GetPDGEncoding().
void TG4NameMap::PrintAll | ( | ) | const |
Dump the whole map.
Definition at line 109 of file TG4NameMap.cxx.
Referenced by TG4ParticlesManager::DefineParticles().
void TG4NameMap::Clear | ( | ) |
Clear the map.
Definition at line 139 of file TG4NameMap.cxx.
|
inline |
Set the current second
Definition at line 75 of file TG4NameMap.h.
|
private |
Not implemented.
|
staticprivate |
the value of undefined second
Definition at line 65 of file TG4NameMap.h.
Referenced by Add(), AddInverse(), AddName(), Clear(), GetFirst(), and GetSecond().
|
private |
map container
Definition at line 68 of file TG4NameMap.h.
Referenced by Add(), AddName(), Clear(), GetSecond(), and PrintAll().
|
private |
inverse map container
Definition at line 69 of file TG4NameMap.h.
Referenced by Add(), AddInverse(), AddName(), Clear(), GetFirst(), and PrintAll().
|
private |
the current second
Definition at line 70 of file TG4NameMap.h.
Referenced by AddName(), Clear(), and SetSecond().