GeoModel - GeoModelCore
GeoShapeSubtraction.h
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef GEOMODELKERNEL_GEOSHAPESUBTRACTION_H
6 #define GEOMODELKERNEL_GEOSHAPESUBTRACTION_H
7 
8 #include "GeoModelKernel/GeoShape.h"
9 
10 
11 #ifndef _GeoShapePersistification_On_
12  class Persistifier;
13 #endif
14 
15 
17 {
18  public:
19  GeoShapeSubtraction (const GeoShape* A, const GeoShape* B);
20 
21  // Returns the volume of the shape, for mass inventory
22  virtual double volume () const;
23 
24  // Returns the NOT shape type, as a string.
25  virtual const std::string & type () const;
26 
27  // Returns the NOT shape type, as a coded integer.
28  virtual ShapeType typeID () const;
29 
30  // Returns the first operand in the subtraction
31  const GeoShape* getOpA () const;
32 
33  // Returns the second operand in the subtraction
34  const GeoShape* getOpB () const;
35 
36  // Executes a GeoShapeAction
37  virtual void exec (GeoShapeAction *action) const;
38 
39  // For type identification.
40  static const std::string& getClassType ();
41 
42  // For type identification.
43  static ShapeType getClassTypeID ();
44 
45  protected:
46  virtual ~GeoShapeSubtraction();
47 
48  private:
50  GeoShapeSubtraction & operator=(const GeoShapeSubtraction &right);
51 
52  // The shape operand in the Subtraction operation
53  const GeoShape* m_opA;
54 
55  // The shape operand in the Subtraction operation
56  const GeoShape* m_opB;
57 
58  static const std::string s_classType;
59  static const ShapeType s_classTypeID;
60 
61  // For I/O only!
63  friend Persistifier;
64 
65 };
66 
67 inline const std::string& GeoShapeSubtraction::getClassType ()
68 {
69  return s_classType;
70 }
71 
72 inline ShapeType GeoShapeSubtraction::getClassTypeID ()
73 {
74  return s_classTypeID;
75 }
76 
77 #endif
This class is a visitor for shapes. It allows a navigation of the boolean expression tree for shapes...
This class describes a Shape. Shapes will be able to do the following things:
Definition: GeoShape.h:38