3 #ifndef HYDROData_Calculation_HeaderFile
4 #define HYDROData_Calculation_HeaderFile
6 #include <HYDROData_Entity.h>
8 class Handle(HYDROData_Object);
9 class Handle(HYDROData_Region);
11 DEFINE_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Entity)
14 /**\class HYDROData_Calculation
15 * \brief Calculation case is defined by selection of Geometry objects with or without
\93Zone of water
\94.
18 class HYDROData_Calculation : public HYDROData_Entity
24 * Enumeration of tags corresponding to the persistent object parameters.
28 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
29 DataTag_GeometryObject, ///< reference geometry objects
30 DataTag_Region ///< reference regions
34 * Enumeration of tags corresponding to the child sub-objects of object.
38 ChildTag_First = HYDROData_Entity::ChildTag_First + 100, ///< first tag, to reserve
39 ChildTag_Region ///< child regions
44 DEFINE_STANDARD_RTTI(HYDROData_Calculation);
47 * Returns the kind of this object. Must be redefined in all objects of known type.
49 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_CALCULATION; }
53 * Dump Calculation object to Python script representation.
55 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
58 // Public methods to work with Calculation
61 * Split reference geometry objects to non-intersected regions.
63 HYDRODATA_EXPORT virtual void SplitGeometryObjects();
67 * Returns number of geometry objects for calculation case.
69 HYDRODATA_EXPORT virtual int NbGeometryObjects() const;
72 * Add new one geometry object for calculation case.
74 HYDRODATA_EXPORT virtual void AddGeometryObject( const Handle(HYDROData_Object)& theObject );
77 * Replace the geometry object for calculation case.
79 HYDRODATA_EXPORT virtual void SetGeometryObject( const int theIndex,
80 const Handle(HYDROData_Object)& theObject );
83 * Sets the geometry object for calculation case.
85 HYDRODATA_EXPORT virtual void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects );
88 * Returns geometry object of calculation case by index.
90 HYDRODATA_EXPORT virtual Handle(HYDROData_Object) GetGeometryObject( const int theIndex ) const;
93 * Returns all geometry objects of calculation case.
95 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
98 * Removes all geometry objects from calculation case.
100 HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
104 * Add new one region for calculation case.
105 * The new region is not added into the list of reference regions.
107 HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion();
110 * Removes all child regions from calculation case.
112 HYDRODATA_EXPORT virtual void RemoveChildRegions();
116 * Returns number of reference regions of calculation case.
118 int NbRegions() const;
121 * Add new one reference region for calculation case.
123 HYDRODATA_EXPORT virtual void AddRegion( const Handle(HYDROData_Region)& theRegion );
126 * Replace the reference region for calculation case.
128 HYDRODATA_EXPORT virtual void SetRegion( const int theIndex,
129 const Handle(HYDROData_Region)& theRegion );
132 * Inserts the reference region for calculation case before given index.
134 HYDRODATA_EXPORT virtual void InsertRegion( const int theBeforeIndex,
135 const Handle(HYDROData_Region)& theRegion );
138 * Sets reference regions for calculation case.
140 HYDRODATA_EXPORT virtual void SetRegions( const HYDROData_SequenceOfObjects& theRegions );
143 * Returns reference region of calculation case by index.
145 HYDRODATA_EXPORT virtual Handle(HYDROData_Region) GetRegion( const int theIndex ) const;
148 * Returns all reference regions of calculation case.
150 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
153 * Removes reference region from calculation case.
155 HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
158 * Removes reference region from calculation case by it index.
160 HYDRODATA_EXPORT virtual void RemoveRegion( const int theIndex );
163 * Removes all reference regions from calculation case.
165 HYDRODATA_EXPORT virtual void RemoveRegions();
169 friend class HYDROData_Iterator;
172 * Creates new object in the internal data structure. Use higher level objects
173 * to create objects with real content.
175 HYDROData_Calculation();
178 * Destructs properties of the object and object itself, removes it from the document.
180 ~HYDROData_Calculation();