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 * Checks that object has 2D presentation. Reimlemented to retun true.
63 HYDRODATA_EXPORT virtual bool IsHas2dPrs() const;
67 * Returns flag indicating that object can be removed or not.
69 HYDRODATA_EXPORT virtual bool CanRemove();
72 * Returns the list of all reference objects of this object.
74 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
78 * Sets the shape of the zone.
80 HYDRODATA_EXPORT virtual void SetShape( const TopoDS_Shape& theShape );
83 * Returns the shape of the zone.
85 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
89 * Returns true if zone needs merge of bathymetries.
91 HYDRODATA_EXPORT virtual bool IsMergingNeed() const;
95 * Sets the interpolator for zone. By default it is NULL and original
96 * interpolation algorithms are used to calculate points altitudes.
97 * If you set interpolator it won't be stored in the data model structure,
98 * it will be deleted during that time as this zone will be freed.
100 HYDRODATA_EXPORT virtual void SetInterpolator( HYDROData_IInterpolator* theInter );
103 * * Returns the interpolator of zone object.
105 HYDRODATA_EXPORT virtual HYDROData_IInterpolator* GetInterpolator() const;
109 * Sets the merging type for conflict altitudes.
110 * By default it is set to Merge_UNKNOWN.
112 HYDRODATA_EXPORT virtual void SetMergeType( const MergeAltitudesType& theType );
115 * Returns the merging type for conflict altitudes.
117 HYDRODATA_EXPORT virtual MergeAltitudesType GetMergeType() const;
121 * Sets the reference altitude to resolve the conflict.
122 * This object is used only in case of "Merge_Object" merge type.
124 HYDRODATA_EXPORT virtual void SetMergeAltitude( const Handle(HYDROData_IAltitudeObject)& theAltitude );
127 * Returns the reference altitude to resolve the conflict.
129 HYDRODATA_EXPORT virtual Handle(HYDROData_IAltitudeObject) GetMergeAltitude() const;
132 * Removes the reference altitude for resolving the conflict.
134 HYDRODATA_EXPORT virtual void RemoveMergeAltitude();
138 * Add new one geometry object for zone.
140 HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
143 * Returns all geometry objects of zone.
145 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
148 * Removes all geometry objects from zone.
150 HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
155 friend class HYDROData_Region;
156 friend class HYDROData_Iterator;
159 * Creates new object in the internal data structure. Use higher level objects
160 * to create objects with real content.
162 HYDRODATA_EXPORT HYDROData_Zone();
165 * Destructs properties of the object and object itself, removes it from the document.
167 HYDRODATA_EXPORT ~HYDROData_Zone();
170 HYDROData_IInterpolator* myInterpolator;