]> SALOME platform Git repositories - modules/hydro.git/blob - src/HYDROData/HYDROData_Zone.h
Salome HOME
a0c4279cb55164f8730fc2a0a413f54d06ebc98c
[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_Bathymetry);
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 bathymetries
23   enum MergeBathymetriesType
24   {
25     Merge_UNKNOWN, // Undefined
26     Merge_ZMIN,    // The minimum values
27     Merge_ZMAX,    // The maximum values
28     Merge_Object   // Only one bathymetry 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_Bathymetry,      ///< reference bathymetry
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    * Dump object to Python script representation.
54    */
55   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
56
57
58   /**
59    * Sets the shape of the zone.
60    */
61   HYDRODATA_EXPORT virtual void SetShape( const TopoDS_Shape& theShape );
62
63   /**
64    * Returns the shape of the zone.
65    */
66   HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
67
68
69   /**
70    * Sets the merging type for conflict bathymetries.
71    * By default it is set to Merge_UNKNOWN.
72    */
73   HYDRODATA_EXPORT virtual void SetMergeType( const MergeBathymetriesType& theType );
74
75   /**
76    * Returns the merging type for conflict bathymetries.
77    */
78   HYDRODATA_EXPORT virtual MergeBathymetriesType GetMergeType() const;
79
80
81   /**
82    * Sets the reference bathymetry to resolve the conflict.
83    * This object is used only in case of "Merge_Object" merge type.
84    */
85   HYDRODATA_EXPORT virtual void SetMergeBathymetry( const Handle(HYDROData_Bathymetry)& theBathymetry );
86
87   /**
88    * Returns the reference bathymetry to resolve the conflict.
89    */
90   HYDRODATA_EXPORT virtual Handle(HYDROData_Bathymetry) GetMergeBathymetry() const;
91
92   /**
93    * Removes the reference bathymetry for resolving the conflict.
94    */
95   HYDRODATA_EXPORT virtual void RemoveMergeBathymetry();
96   
97
98   /**
99    * Add new one geometry object for zone.
100    */
101   HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
102
103   /**
104    * Returns all geometry objects of zone.
105    */
106   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
107
108   /**
109    * Removes all geometry objects from zone.
110    */
111   HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
112
113
114 protected:
115
116   friend class HYDROData_Region;
117   friend class HYDROData_Iterator;
118
119   /**
120    * Creates new object in the internal data structure. Use higher level objects 
121    * to create objects with real content.
122    */
123   HYDROData_Zone();
124
125   /**
126    * Destructs properties of the object and object itself, removes it from the document.
127    */
128   ~HYDROData_Zone();
129
130 };
131
132 #endif