Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4IntMap Class Reference

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.
 
TG4IntMapoperator= (const TG4IntMap &right)
 Not implemented.
 
G4bool IsDefined (const G4String &first)
 

Private Attributes

Map fMap
 map container
 

Detailed Description

The map container for integer numbers associated with names.

Author
I. Hrivnacova; IPN, Orsay

Definition at line 26 of file TG4IntMap.h.

Member Typedef Documentation

◆ Map

std::map<G4String, G4int, std::less<G4String> > TG4IntMap::Map

The map of integers to strings.

Definition at line 30 of file TG4IntMap.h.

◆ MapIterator

Map::iterator TG4IntMap::MapIterator

The iterator for the map of integers to strings.

Definition at line 33 of file TG4IntMap.h.

◆ MapConstIterator

Map::const_iterator TG4IntMap::MapConstIterator

The constant iterator for the map of integers to strings.

Definition at line 36 of file TG4IntMap.h.

Constructor & Destructor Documentation

◆ TG4IntMap() [1/2]

TG4IntMap::TG4IntMap ( )

Default constructor

Definition at line 22 of file TG4IntMap.cxx.

◆ ~TG4IntMap()

TG4IntMap::~TG4IntMap ( )

Destructor

Definition at line 28 of file TG4IntMap.cxx.

◆ TG4IntMap() [2/2]

TG4IntMap::TG4IntMap ( const TG4IntMap & right)
private

Not implemented.

Member Function Documentation

◆ Add()

G4bool TG4IntMap::Add ( const G4String & first,
G4int second )

Add pair (name, int number) to the map.

Definition at line 54 of file TG4IntMap.cxx.

◆ GetSecond()

G4int TG4IntMap::GetSecond ( const G4String & name,
G4bool warn = true )

Get second name associated with given name.

Definition at line 68 of file TG4IntMap.cxx.

◆ GetSize()

G4int TG4IntMap::GetSize ( ) const

Get map size.

Definition at line 85 of file TG4IntMap.cxx.

◆ PrintAll()

void TG4IntMap::PrintAll ( ) const

Dump the whole map.

Definition at line 93 of file TG4IntMap.cxx.

◆ Clear()

void TG4IntMap::Clear ( )

Clear the map.

Definition at line 110 of file TG4IntMap.cxx.

◆ operator=()

TG4IntMap & TG4IntMap::operator= ( const TG4IntMap & right)
private

Not implemented.

◆ IsDefined()

G4bool TG4IntMap::IsDefined ( const G4String & first)
private

Return true if the first is already in the map.

Definition at line 38 of file TG4IntMap.cxx.

Referenced by Add().

Member Data Documentation

◆ fMap

Map TG4IntMap::fMap
private

map container

Definition at line 60 of file TG4IntMap.h.

Referenced by Add(), Clear(), GetSecond(), GetSize(), IsDefined(), and PrintAll().


The documentation for this class was generated from the following files: