2 #ifndef HYDROData_Zone_HeaderFile
3 #define HYDROData_Zone_HeaderFile
5 #include <HYDROData_Entity.h>
7 class Handle(HYDROData_Object);
8 class Handle(HYDROData_IAltitudeObject);
11 DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity)
14 /**\class HYDROData_Zone
15 * \brief Class that stores/retreives information about the 2d face.
17 class HYDROData_Zone : public HYDROData_Entity
22 // Enumeration of mergin types for conflict altitudes
23 enum MergeAltitudesType
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
33 * Enumeration of tags corresponding to the persistent object parameters.
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
45 DEFINE_STANDARD_RTTI(HYDROData_Zone);
48 * Returns the kind of this object. Must be redefined in all objects of known type.
50 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_ZONE; }
53 * Dump object to Python script representation.
55 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
59 * Returns flag indicating that object is updateble or not.
61 HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
65 * Returns flag indicating that object can be removed or not.
67 HYDRODATA_EXPORT virtual bool CanRemove();
70 * Returns the list of all reference objects of this object.
72 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
76 * Sets the shape of the zone.
78 HYDRODATA_EXPORT virtual void SetShape( const TopoDS_Shape& theShape );
81 * Returns the shape of the zone.
83 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape() const;
87 * Returns true if zone needs merge of bathymetries.
89 HYDRODATA_EXPORT virtual bool IsMergingNeed() const;
93 * Sets the merging type for conflict altitudes.
94 * By default it is set to Merge_UNKNOWN.
96 HYDRODATA_EXPORT virtual void SetMergeType( const MergeAltitudesType& theType );
99 * Returns the merging type for conflict altitudes.
101 HYDRODATA_EXPORT virtual MergeAltitudesType GetMergeType() const;
105 * Sets the reference altitude to resolve the conflict.
106 * This object is used only in case of "Merge_Object" merge type.
108 HYDRODATA_EXPORT virtual void SetMergeAltitude( const Handle(HYDROData_IAltitudeObject)& theAltitude );
111 * Returns the reference altitude to resolve the conflict.
113 HYDRODATA_EXPORT virtual Handle(HYDROData_IAltitudeObject) GetMergeAltitude() const;
116 * Removes the reference altitude for resolving the conflict.
118 HYDRODATA_EXPORT virtual void RemoveMergeAltitude();
122 * Add new one geometry object for zone.
124 HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
127 * Returns all geometry objects of zone.
129 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
132 * Removes all geometry objects from zone.
134 HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
139 friend class HYDROData_Region;
140 friend class HYDROData_Iterator;
143 * Creates new object in the internal data structure. Use higher level objects
144 * to create objects with real content.
146 HYDRODATA_EXPORT HYDROData_Zone();
149 * Destructs properties of the object and object itself, removes it from the document.
151 HYDRODATA_EXPORT ~HYDROData_Zone();