Geant4 VMC Version 6.6
Loading...
Searching...
No Matches
TG4IntMap.h
Go to the documentation of this file.
1#ifndef TG4_INT_MAP_H
2#define TG4_INT_MAP_H
3
4//------------------------------------------------
5// The Geant4 Virtual Monte Carlo package
6// Copyright (C) 2007 - 2014 Ivana Hrivnacova
7// All rights reserved.
8//
9// For the licensing terms see geant4_vmc/LICENSE.
10// Contact: root-vmc@cern.ch
11//-------------------------------------------------
12
17
18#include <globals.hh>
19#include <map>
20
25
27{
28 public:
30 typedef std::map<G4String, G4int, std::less<G4String> > Map;
31
33 typedef Map::iterator MapIterator;
34
36 typedef Map::const_iterator MapConstIterator;
37
38 public:
39 TG4IntMap();
40 ~TG4IntMap();
41
42 // methods
43 G4bool Add(const G4String& first, G4int second);
44 G4int GetSecond(const G4String& name, G4bool warn = true);
45 G4int GetSize() const;
46 void PrintAll() const;
47 void Clear();
48
49 protected:
50 private:
52 TG4IntMap(const TG4IntMap& right);
55
56 // methods
57 G4bool IsDefined(const G4String& first);
58
59 // data members
61};
62
63#endif // TG4_NAME_MAP_H
The map container for integer numbers associated with names.
Definition TG4IntMap.h:27
TG4IntMap(const TG4IntMap &right)
Not implemented.
Map::iterator MapIterator
The iterator for the map of integers to strings.
Definition TG4IntMap.h:33
Map::const_iterator MapConstIterator
The constant iterator for the map of integers to strings.
Definition TG4IntMap.h:36
void Clear()
Map fMap
map container
Definition TG4IntMap.h:60
G4int GetSize() const
Definition TG4IntMap.cxx:85
G4int GetSecond(const G4String &name, G4bool warn=true)
Definition TG4IntMap.cxx:68
TG4IntMap & operator=(const TG4IntMap &right)
Not implemented.
std::map< G4String, G4int, std::less< G4String > > Map
The map of integers to strings.
Definition TG4IntMap.h:30
G4bool Add(const G4String &first, G4int second)
Definition TG4IntMap.cxx:54
G4bool IsDefined(const G4String &first)
Definition TG4IntMap.cxx:38
void PrintAll() const
Definition TG4IntMap.cxx:93