VGM Version 5.3
Loading...
Searching...
No Matches
ElementMap.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The Geant4GM package of the Virtual Geometry Model
5// Copyright (C) 2007, Ivana Hrivnacova
6// All rights reserved.
7//
8// For the licensing terms see vgm/LICENSE.
9// Contact: ivana@ipno.in2p3.fr
10// -----------------------------------------------------------------------
11
13//
19
20#ifndef GEANT4_GM_ELEMENT_MAP_H
21#define GEANT4_GM_ELEMENT_MAP_H
22
23#include <map>
24
25class G4Element;
26
27namespace VGM {
28class IElement;
29}
30
31namespace Geant4GM {
32
33class ElementMap;
34
36{
37 public:
38 typedef std::map<VGM::IElement*, G4Element*> G4ElementMap;
39 typedef G4ElementMap::const_iterator G4ElementMapCIterator;
40
41 typedef std::map<G4Element*, VGM::IElement*> VgmElementMap;
42 typedef VgmElementMap::const_iterator VgmElementMapCIterator;
43
44 public:
45 ElementMap();
46 virtual ~ElementMap();
47
48 // static access methods
49 static ElementMap* Instance();
50
51 // methods
52 void AddElement(VGM::IElement*, G4Element*);
53 void Print() const;
54
55 // get methods
56 G4Element* GetElement(VGM::IElement* iElement) const;
57 VGM::IElement* GetElement(G4Element* g4Element) const;
58
59 protected:
60 ElementMap(const ElementMap&);
61
62 private:
63 // static data members
64 static ElementMap* fgInstance;
65
66 // data members
67 G4ElementMap fG4Elements;
68 VgmElementMap fVgmElements;
69};
70
71} // namespace Geant4GM
72
73#endif // GEANT4_GM_ELEMENT_MAP_H
The map between VGM and Geant4 elements.
Definition ElementMap.h:36
VgmElementMap::const_iterator VgmElementMapCIterator
Definition ElementMap.h:42
G4ElementMap::const_iterator G4ElementMapCIterator
Definition ElementMap.h:39
void AddElement(VGM::IElement *, G4Element *)
std::map< G4Element *, VGM::IElement * > VgmElementMap
Definition ElementMap.h:41
static ElementMap * Instance()
std::map< VGM::IElement *, G4Element * > G4ElementMap
Definition ElementMap.h:38
G4Element * GetElement(VGM::IElement *iElement) const
The VGM interface to elements.
Definition IElement.h:34
VGM implementation for Geant4.
Definition Element.h:29
VGM interfaces.
Definition VMedium.h:28