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);
11 class Handle(HYDROData_Document);
16 /**\class HYDROData_Region
17 * \brief Regions are groups (lists) of zones, they can include one or several zones.
19 class HYDROData_Region : public HYDROData_Entity
25 * Enumeration of tags corresponding to the persistent object parameters.
29 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
30 DataTag_ChildZone, ///< child zones
31 DataTag_Zone, ///< reference zones
35 DEFINE_STANDARD_RTTI(HYDROData_Region);
38 * Returns the kind of this object. Must be redefined in all objects of known type.
40 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_REGION; }
44 * Returns flag indicating that object is updateble or not.
46 HYDRODATA_EXPORT virtual bool CanBeUpdated() const;
50 * Removes object and it child sub-objects from the data structure.
51 * Reimplemented to update names of regions in father calculation.
53 HYDRODATA_EXPORT virtual void Remove();
56 * Returns flag indicating that object can be removed or not.
58 HYDRODATA_EXPORT virtual bool CanRemove();
61 * Returns the list of all reference objects of this object.
63 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetAllReferenceObjects() const;
67 * Add new one reference zone for region.
68 * The label of theZone is changed in case if old parent is not this region.
70 HYDRODATA_EXPORT virtual bool AddZone( const Handle(HYDROData_Zone)& theZone );
73 * Returns all reference zone of region.
75 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetZones() const;
78 * Removes reference zone from region.
80 HYDRODATA_EXPORT virtual void RemoveZone( const Handle(HYDROData_Zone)& theZone );
83 * Removes all reference zones from region.
85 HYDRODATA_EXPORT virtual void RemoveZones();
88 * \brief Returns the shape of the region.
89 * Shape of the region could be:
90 * - a face which is the union of the region zones faces
91 * - a shell if the zones faces can't be united into one face
92 * \return shape as TopoDS_Shape
94 HYDRODATA_EXPORT virtual TopoDS_Shape GetShape( HYDROData_ShapesGroup::SeqOfGroupsDefs* theSeqOfGroups = 0 ) const;
99 * Create new one reference zone for region on child label.
100 * The new zone is added into the list of reference zones.
102 HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) addNewZone( const Handle(HYDROData_Document)& theDoc,
103 const QString& thePrefix,
104 const TopoDS_Face& theFace,
105 const QStringList& theRefObjects );
109 friend class HYDROData_CalculationCase;
110 friend class HYDROData_Iterator;
113 * Creates new object in the internal data structure. Use higher level objects
114 * to create objects with real content.
116 HYDRODATA_EXPORT HYDROData_Region();
119 * Destructs properties of the object and object itself, removes it from the document.
121 HYDRODATA_EXPORT ~HYDROData_Region();