2 #ifndef HYDROData_Region_HeaderFile
3 #define HYDROData_Region_HeaderFile
5 #include "HYDROData_ShapesGroup.h"
8 DEFINE_STANDARD_HANDLE(HYDROData_Region, HYDROData_Entity)
10 class Handle(HYDROData_Zone);
14 /**\class HYDROData_Region
15 * \brief Regions are groups (lists) of zones, they can include one or several zones.
17 class HYDROData_Region : public HYDROData_Entity
23 * Enumeration of tags corresponding to the persistent object parameters.
27 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
28 DataTag_ChildZone, ///< child zones
29 DataTag_Zone, ///< reference zones
33 DEFINE_STANDARD_RTTI(HYDROData_Region);
36 * Returns the kind of this object. Must be redefined in all objects of known type.
38 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_REGION; }
42 * Returns flag indicating that object is updateble or not.
44 HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
48 * Removes object and it child sub-objects from the data structure.
49 * Reimplemented to update names of regions in father calculation.
51 HYDRODATA_EXPORT virtual void Remove();
54 * Returns flag indicating that object can be removed or not.
56 HYDRODATA_EXPORT virtual bool CanRemove();
59 * Returns the list of all reference objects of this object.
61 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
65 * Add new one reference zone for region.
66 * The label of theZone is changed in case if old parent is not this region.
68 HYDRODATA_EXPORT virtual bool AddZone( const Handle(HYDROData_Zone)& theZone );
71 * Returns all reference zone of region.
73 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetZones() const;
76 * Removes reference zone from region.
78 HYDRODATA_EXPORT virtual void RemoveZone( const Handle(HYDROData_Zone)& theZone );
81 * Removes all reference zones from region.
83 HYDRODATA_EXPORT virtual void RemoveZones();
86 * \brief Returns the shape of the region.
87 * Shape of the region could be:
88 * - a face which is the union of the region zones faces
89 * - a shell if the zones faces can't be united into one face
90 * \return shape as TopoDS_Shape
92 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs* theSeqOfGroups = 0 ) const;
97 * Create new one reference zone for region on child label.
98 * The new zone is added into the list of reference zones.
100 HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) addNewZone();
104 friend class HYDROData_CalculationCase;
105 friend class HYDROData_Iterator;
108 * Creates new object in the internal data structure. Use higher level objects
109 * to create objects with real content.
111 HYDRODATA_EXPORT HYDROData_Region();
114 * Destructs properties of the object and object itself, removes it from the document.
116 HYDRODATA_EXPORT ~HYDROData_Region();