Salome HOME
Useless code removed.
[modules/hydro.git] / src / HYDROData / HYDROData_Zone.h
1
2 #ifndef HYDROData_Zone_HeaderFile
3 #define HYDROData_Zone_HeaderFile
4
5 #include <HYDROData_Entity.h>
6
7 class Handle(HYDROData_Object);
8 class Handle(HYDROData_IAltitudeObject);
9 class TopoDS_Shape;
10
11 DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity)
12
13
14 /**\class HYDROData_Zone
15  * \brief Class that stores/retreives information about the 2d face.
16  */
17 class HYDROData_Zone : public HYDROData_Entity
18 {
19
20 public:
21
22   // Enumeration of mergin types for conflict altitudes
23   enum MergeAltitudesType
24   {
25     Merge_UNKNOWN, // Undefined
26     Merge_ZMIN,    // The minimum values
27     Merge_ZMAX,    // The maximum values
28     Merge_Object   // Only one altitude will be taken into account
29   };
30
31 protected:
32   /**
33    * Enumeration of tags corresponding to the persistent object parameters.
34    */
35   enum DataTag
36   {
37     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
38     DataTag_Shape,           ///< reference shape
39     DataTag_GeometryObject,  ///< reference geometry objects
40     DataTag_MergeType,       ///< mergin type of conflict bathymetries
41     DataTag_MergeAltitude,   ///< reference altitude for conflict merge
42   };
43
44 public:
45   DEFINE_STANDARD_RTTI(HYDROData_Zone);
46
47   /**
48    * Returns the kind of this object. Must be redefined in all objects of known type.
49    */
50   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_ZONE; }
51
52
53   /**
54    * Returns flag indicating that object is updateble or not.
55    */
56   HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
57
58
59   /**
60    * Returns flag indicating that object can be removed or not.
61    */
62   HYDRODATA_EXPORT virtual bool CanRemove();
63
64   /**
65    * Returns the list of all reference objects of this object.
66    */
67   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
68
69
70   /**
71    * Sets the shape of the zone.
72    */
73   HYDRODATA_EXPORT virtual void SetShape( const TopoDS_Shape& theShape );
74
75   /**
76    * Returns the shape of the zone.
77    */
78   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
79
80
81   /**
82    * Returns true if zone needs merge of bathymetries.
83    */
84   HYDRODATA_EXPORT virtual bool IsMergingNeed() const;
85
86
87   /**
88    * Sets the merging type for conflict altitudes.
89    * By default it is set to Merge_UNKNOWN.
90    */
91   HYDRODATA_EXPORT virtual void SetMergeType( const MergeAltitudesType& theType );
92
93   /**
94    * Returns the merging type for conflict altitudes.
95    */
96   HYDRODATA_EXPORT virtual MergeAltitudesType GetMergeType() const;
97
98
99   /**
100    * Sets the reference altitude to resolve the conflict.
101    * This object is used only in case of "Merge_Object" merge type.
102    */
103   HYDRODATA_EXPORT virtual void SetMergeAltitude( const Handle(HYDROData_IAltitudeObject)& theAltitude );
104
105   /**
106    * Returns the reference altitude to resolve the conflict.
107    */
108   HYDRODATA_EXPORT virtual Handle(HYDROData_IAltitudeObject) GetMergeAltitude() const;
109
110   /**
111    * Removes the reference altitude for resolving the conflict.
112    */
113   HYDRODATA_EXPORT virtual void RemoveMergeAltitude();
114   
115
116   /**
117    * Add new one geometry object for zone.
118    */
119   HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
120
121   /**
122    * Returns all geometry objects of zone.
123    */
124   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
125
126   /**
127    * Removes all geometry objects from zone.
128    */
129   HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
130
131
132 protected:
133
134   friend class HYDROData_Region;
135   friend class HYDROData_Iterator;
136
137   /**
138    * Creates new object in the internal data structure. Use higher level objects 
139    * to create objects with real content.
140    */
141   HYDRODATA_EXPORT HYDROData_Zone();
142
143   /**
144    * Destructs properties of the object and object itself, removes it from the document.
145    */
146   HYDRODATA_EXPORT ~HYDROData_Zone();
147
148 };
149
150 #endif