Salome HOME
Reference Bathymetry objects moved to base for geometry objects class.
[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 class Handle(HYDROData_Bathymetry);
12
13 /**\class HYDROData_Object
14  * \brief The base class for all geometrical objects in the HYDRO module.
15  *
16  */
17 class HYDROData_Object : public HYDROData_Entity
18 {
19 protected:
20   /**
21    * Enumeration of tags corresponding to the persistent object parameters.
22    */
23   enum DataTag
24   {
25     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
26     DataTag_TopShape,
27     DataTag_Shape3D,
28     DataTag_Bathymetry,   ///< reference bathymetry
29   };
30
31   /**
32    * Enumeration of tags corresponding to the child sub-objects of object.
33    */
34   enum ChildTag
35   {
36     ChildTag_First = HYDROData_Entity::ChildTag_First + 100, ///< first tag, to reserve
37   };
38
39 public:
40   DEFINE_STANDARD_RTTI(HYDROData_Object);
41
42   /**
43    * Sets the top(2d projection) shape of the object.
44    */
45   HYDRODATA_EXPORT virtual void SetTopShape( const TopoDS_Shape& theShape );
46
47   /**
48    * Returns the top shape of the object.
49    */
50   HYDRODATA_EXPORT virtual TopoDS_Shape GetTopShape() const = 0;
51
52   /**
53    * Sets the 3d shape of the object.
54    */
55   HYDRODATA_EXPORT virtual void SetShape3D( const TopoDS_Shape& theShape );
56
57   /**
58    * Returns the 3d shape of the object.
59    */
60   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape3D() const = 0;
61
62   
63   /**
64    * Set reference bathymetry object for geometry object.
65    */
66   HYDRODATA_EXPORT virtual void SetBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
67
68   /**
69    * Returns reference bathymetry object of geometry object.
70    */
71   HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetBathymetry() const;
72
73   /**
74    * Clear the reference bathymetry object for geometry object.
75    */
76   HYDRODATA_EXPORT virtual void RemoveBathymetry();
77
78
79 protected:
80
81   /**
82    * Creates new object in the internal data structure. Use higher level objects 
83    * to create objects with real content.
84    */
85   HYDRODATA_EXPORT HYDROData_Object();
86
87   /**
88    * Destructs properties of the object and object itself, removes it from the document.
89    */
90   virtual HYDRODATA_EXPORT ~HYDROData_Object();
91
92 protected:
93
94   /**
95    * Retrieve the top shape of the object from data label.
96    */
97   HYDRODATA_EXPORT TopoDS_Shape getTopShape() const;
98
99   /**
100    * Retrieve the 3d shape of the object from data label.
101    */
102   HYDRODATA_EXPORT TopoDS_Shape getShape3D() const;
103
104 };
105
106 #endif