VGM Version 5.3
Loading...
Searching...
No Matches
SolidMap.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_SOLID_MAP_H
21#define GEANT4_GM_SOLID_MAP_H
22
23#include <map>
24
25class G4VSolid;
26
27namespace VGM {
28class ISolid;
29}
30
31namespace Geant4GM {
32
33class SolidMap;
34
36{
37 public:
38 typedef std::map<VGM::ISolid*, G4VSolid*> G4SolidMap;
39 typedef G4SolidMap::const_iterator G4SolidMapCIterator;
40
41 typedef std::map<G4VSolid*, VGM::ISolid*> VgmSolidMap;
42 typedef VgmSolidMap::const_iterator VgmSolidMapCIterator;
43
44 public:
45 SolidMap();
46 virtual ~SolidMap();
47
48 // static access methods
49 static SolidMap* Instance();
50
51 // methods
52 void AddSolid(VGM::ISolid*, G4VSolid*);
53
54 // get methods
55 G4VSolid* GetSolid(VGM::ISolid* iSolid) const;
56 VGM::ISolid* GetSolid(G4VSolid* solid) const;
57
58 private:
59 SolidMap(const SolidMap&);
60
61 // static data members
62 static SolidMap* fgInstance;
63
64 // data members
65 G4SolidMap fG4Solids;
66 VgmSolidMap fVgmSolids;
67};
68
69} // namespace Geant4GM
70
71#endif // GEANT4_GM_SOLID_MAP_H
The map between VGM and Geant4 solids.
Definition SolidMap.h:36
std::map< G4VSolid *, VGM::ISolid * > VgmSolidMap
Definition SolidMap.h:41
std::map< VGM::ISolid *, G4VSolid * > G4SolidMap
Definition SolidMap.h:38
G4VSolid * GetSolid(VGM::ISolid *iSolid) const
Definition SolidMap.cxx:68
G4SolidMap::const_iterator G4SolidMapCIterator
Definition SolidMap.h:39
VgmSolidMap::const_iterator VgmSolidMapCIterator
Definition SolidMap.h:42
static SolidMap * Instance()
Definition SolidMap.cxx:28
virtual ~SolidMap()
Definition SolidMap.cxx:52
void AddSolid(VGM::ISolid *, G4VSolid *)
Definition SolidMap.cxx:59
The VGM interface to solids.
Definition ISolid.h:58
VGM implementation for Geant4.
Definition Element.h:29
VGM interfaces.
Definition VMedium.h:28