VGM Version 5.3
Loading...
Searching...
No Matches
VVolume.h
Go to the documentation of this file.
1// $Id$
2
3// -----------------------------------------------------------------------
4// The BaseVGM 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 BASE_VGM_V_VOLUME_H
21#define BASE_VGM_V_VOLUME_H
22
23#include "VGM/volumes/IVolume.h"
24
25#include <string>
26#include <vector>
27
28namespace VGM {
29class ISolid;
30class IPlacement;
31} // namespace VGM
32
33namespace BaseVGM {
34
35class VVolume : public virtual VGM::IVolume
36{
37 public:
38 VVolume(VGM::ISolid* solid);
39 virtual ~VVolume();
40
41 // methods
42 virtual std::string Name() const = 0;
43 virtual std::string MaterialName() const = 0;
44 virtual std::string MediumName() const = 0;
45
46 virtual VGM::ISolid* Solid() const;
47 virtual int NofDaughters() const;
48 virtual VGM::IPlacement* Daughter(int i) const;
49
50 virtual void AddDaughter(VGM::IPlacement* daughter);
51
52 virtual void ResetSolid(VGM::ISolid* solid);
53
54 protected:
55 VVolume();
56 VVolume(const VVolume& rhs);
57
58 private:
59 VGM::ISolid* fSolid;
60 std::vector<VGM::IPlacement*> fDaughters;
61};
62
63} // namespace BaseVGM
64
65#endif // BASE_VGM_V_VOLUME_H
The abstract base class for volumes.
Definition VVolume.h:36
virtual VGM::ISolid * Solid() const
Return the associated solid.
Definition VVolume.cxx:73
virtual void ResetSolid(VGM::ISolid *solid)
Definition VVolume.cxx:91
virtual void AddDaughter(VGM::IPlacement *daughter)
Add the specified daughter.
Definition VVolume.cxx:85
virtual std::string Name() const =0
Return the name of this volume.
virtual VGM::IPlacement * Daughter(int i) const
Return the i-th daughter.
Definition VVolume.cxx:79
virtual std::string MediumName() const =0
Return the name of the associated medium.
virtual ~VVolume()
Definition VVolume.cxx:62
virtual int NofDaughters() const
Return the number of volume daughters.
Definition VVolume.cxx:76
virtual std::string MaterialName() const =0
Return the name of the associated material.
The VGM interface to positions of volumes.
Definition IPlacement.h:44
The VGM interface to solids.
Definition ISolid.h:58
The VGM interface to volumes.
Definition IVolume.h:32
BaseVGM utilities.
Definition utilities.h:23
VGM interfaces.
Definition VMedium.h:28