2 #ifndef HYDROData_Zone_HeaderFile
3 #define HYDROData_Zone_HeaderFile
5 #include "HYDROData_Entity.h"
6 #include "HYDROData_IInterpolator.h"
8 class Handle(HYDROData_Object);
9 class Handle(HYDROData_IAltitudeObject);
12 DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity)
15 /**\class HYDROData_Zone
16 * \brief Class that stores/retreives information about the 2d face.
18 class HYDROData_Zone : public HYDROData_Entity
23 // Enumeration of mergin types for conflict altitudes
24 enum MergeAltitudesType
26 Merge_UNKNOWN, // Undefined
27 Merge_ZMIN, // The minimum values
28 Merge_ZMAX, // The maximum values
29 Merge_Object // Only one altitude will be taken into account
34 * Enumeration of tags corresponding to the persistent object parameters.
38 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
39 DataTag_Shape, ///< reference shape
40 DataTag_GeometryObject, ///< reference geometry objects
41 DataTag_MergeType, ///< mergin type of conflict bathymetries
42 DataTag_MergeAltitude, ///< reference altitude for conflict merge
46 DEFINE_STANDARD_RTTI(HYDROData_Zone);
49 * Returns the kind of this object. Must be redefined in all objects of known type.
51 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_ZONE; }
55 * Returns flag indicating that object is updateble or not.
57 HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
61 * Returns flag indicating that object can be removed or not.
63 HYDRODATA_EXPORT virtual bool CanRemove();
66 * Returns the list of all reference objects of this object.
68 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
72 * Sets the shape of the zone.
74 HYDRODATA_EXPORT virtual void SetShape( const TopoDS_Shape& theShape );
77 * Returns the shape of the zone.
79 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
83 * Returns true if zone needs merge of bathymetries.
85 HYDRODATA_EXPORT virtual bool IsMergingNeed() const;
89 * Sets the interpolator for zone. By default it is NULL and original
90 * interpolation algorithms are used to calculate points altitudes.
91 * If you set interpolator it won't be stored in the data model structure,
92 * it will be deleted during that time as this zone will be freed.
94 HYDRODATA_EXPORT virtual void SetInterpolator( HYDROData_IInterpolator* theInter );
97 * * Returns the interpolator of zone object.
99 HYDRODATA_EXPORT virtual HYDROData_IInterpolator* GetInterpolator() const;
103 * Sets the merging type for conflict altitudes.
104 * By default it is set to Merge_UNKNOWN.
106 HYDRODATA_EXPORT virtual void SetMergeType( const MergeAltitudesType& theType );
109 * Returns the merging type for conflict altitudes.
111 HYDRODATA_EXPORT virtual MergeAltitudesType GetMergeType() const;
115 * Sets the reference altitude to resolve the conflict.
116 * This object is used only in case of "Merge_Object" merge type.
118 HYDRODATA_EXPORT virtual void SetMergeAltitude( const Handle(HYDROData_IAltitudeObject)& theAltitude );
121 * Returns the reference altitude to resolve the conflict.
123 HYDRODATA_EXPORT virtual Handle(HYDROData_IAltitudeObject) GetMergeAltitude() const;
126 * Removes the reference altitude for resolving the conflict.
128 HYDRODATA_EXPORT virtual void RemoveMergeAltitude();
132 * Add new one geometry object for zone.
134 HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
137 * Returns all geometry objects of zone.
139 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
142 * Removes all geometry objects from zone.
144 HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
149 friend class HYDROData_Region;
150 friend class HYDROData_Iterator;
153 * Creates new object in the internal data structure. Use higher level objects
154 * to create objects with real content.
156 HYDRODATA_EXPORT HYDROData_Zone();
159 * Destructs properties of the object and object itself, removes it from the document.
161 HYDRODATA_EXPORT ~HYDROData_Zone();
164 HYDROData_IInterpolator* myInterpolator;