Geant4 VMC Version 6.6
|
The map container for integer numbers associated with names. More...
#include <TG4IntMap.h>
Public Types | |
typedef std::map< G4String, G4int, std::less< G4String > > | Map |
The map of integers to strings. | |
typedef Map::iterator | MapIterator |
The iterator for the map of integers to strings. | |
typedef Map::const_iterator | MapConstIterator |
The constant iterator for the map of integers to strings. | |
Public Member Functions | |
TG4IntMap () | |
~TG4IntMap () | |
G4bool | Add (const G4String &first, G4int second) |
G4int | GetSecond (const G4String &name, G4bool warn=true) |
G4int | GetSize () const |
void | PrintAll () const |
void | Clear () |
Private Member Functions | |
TG4IntMap (const TG4IntMap &right) | |
Not implemented. | |
TG4IntMap & | operator= (const TG4IntMap &right) |
Not implemented. | |
G4bool | IsDefined (const G4String &first) |
Private Attributes | |
Map | fMap |
map container | |
The map container for integer numbers associated with names.
Definition at line 26 of file TG4IntMap.h.
std::map<G4String, G4int, std::less<G4String> > TG4IntMap::Map |
The map of integers to strings.
Definition at line 30 of file TG4IntMap.h.
Map::iterator TG4IntMap::MapIterator |
The iterator for the map of integers to strings.
Definition at line 33 of file TG4IntMap.h.
Map::const_iterator TG4IntMap::MapConstIterator |
The constant iterator for the map of integers to strings.
Definition at line 36 of file TG4IntMap.h.
TG4IntMap::TG4IntMap | ( | ) |
Default constructor
Definition at line 22 of file TG4IntMap.cxx.
TG4IntMap::~TG4IntMap | ( | ) |
Destructor
Definition at line 28 of file TG4IntMap.cxx.
|
private |
Not implemented.
G4bool TG4IntMap::Add | ( | const G4String & | first, |
G4int | second ) |
Add pair (name, int number) to the map.
Definition at line 54 of file TG4IntMap.cxx.
G4int TG4IntMap::GetSecond | ( | const G4String & | name, |
G4bool | warn = true ) |
Get second name associated with given name.
Definition at line 68 of file TG4IntMap.cxx.
G4int TG4IntMap::GetSize | ( | ) | const |
Get map size.
Definition at line 85 of file TG4IntMap.cxx.
void TG4IntMap::PrintAll | ( | ) | const |
Dump the whole map.
Definition at line 93 of file TG4IntMap.cxx.
void TG4IntMap::Clear | ( | ) |
Clear the map.
Definition at line 110 of file TG4IntMap.cxx.
|
private |
Return true if the first is already in the map.
Definition at line 38 of file TG4IntMap.cxx.
Referenced by Add().
|
private |
map container
Definition at line 60 of file TG4IntMap.h.
Referenced by Add(), Clear(), GetSecond(), GetSize(), IsDefined(), and PrintAll().