Salome HOME
Dump to Python script correction.
[modules/hydro.git] / src / HYDROData / HYDROData_Object.h
1
2 #ifndef HYDROData_Object_HeaderFile
3 #define HYDROData_Object_HeaderFile
4
5 #include <HYDROData_Entity.h>
6
7 class TopoDS_Shape;
8
9 DEFINE_STANDARD_HANDLE(HYDROData_Object, HYDROData_Entity)
10
11
12 /**\class HYDROData_Object
13  * \brief The base class for all geometrical objects in the HYDRO module.
14  *
15  */
16 class HYDROData_Object : public HYDROData_Entity
17 {
18 protected:
19   /**
20    * Enumeration of tags corresponding to the persistent object parameters.
21    */
22   enum DataTag
23   {
24     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
25     DataTag_TopShape,
26     DataTag_Shape3D,
27   };
28
29   /**
30    * Enumeration of tags corresponding to the child sub-objects of object.
31    */
32   enum ChildTag
33   {
34     ChildTag_First = HYDROData_Entity::ChildTag_First + 100, ///< first tag, to reserve
35   };
36
37 public:
38   DEFINE_STANDARD_RTTI(HYDROData_Object);
39
40   /**
41    * Sets the top(2d projection) shape of the object.
42    */
43   HYDRODATA_EXPORT virtual void SetTopShape( const TopoDS_Shape& theShape );
44
45   /**
46    * Returns the top shape of the object.
47    */
48   HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const = 0;
49
50   /**
51    * Sets the 3d shape of the object.
52    */
53   HYDRODATA_EXPORT virtual void SetShape3D( const TopoDS_Shape& theShape );
54
55   /**
56    * Returns the 3d shape of the object.
57    */
58   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const = 0;
59
60 protected:
61
62   /**
63    * Creates new object in the internal data structure. Use higher level objects 
64    * to create objects with real content.
65    */
66   HYDRODATA_EXPORT HYDROData_Object();
67
68   /**
69    * Destructs properties of the object and object itself, removes it from the document.
70    */
71   virtual HYDRODATA_EXPORT ~HYDROData_Object();
72
73 protected:
74
75   /**
76    * Retrieve the top shape of the object from data label.
77    */
78   HYDRODATA_EXPORT TopoDS_Shape getTopShape() const;
79
80   /**
81    * Retrieve the 3d shape of the object from data label.
82    */
83   HYDRODATA_EXPORT TopoDS_Shape getShape3D() const;
84
85 };
86
87 #endif