3 #ifndef HYDROData_CalculationCase_HeaderFile
4 #define HYDROData_CalculationCase_HeaderFile
6 #include <HYDROData_Entity.h>
8 class Handle(HYDROData_Object);
9 class Handle(HYDROData_Region);
10 class Handle(HYDROData_Zone);
12 DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
15 /**\class HYDROData_CalculationCase
16 * \brief Calculation case is defined by selection of Geometry objects with or without
\93Zone of water
\94.
19 class HYDROData_CalculationCase : 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_GeometryObject, ///< reference geometry objects
31 DataTag_Region ///< reference regions
35 * Enumeration of tags corresponding to the child sub-objects of object.
39 ChildTag_First = HYDROData_Entity::ChildTag_First + 100, ///< first tag, to reserve
40 ChildTag_Region ///< child regions
45 DEFINE_STANDARD_RTTI(HYDROData_CalculationCase);
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_CALCULATION; }
54 * Dump Calculation object to Python script representation.
56 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
59 // Public methods to work with Calculation
62 * Split reference geometry objects to non-intersected regions.
64 HYDRODATA_EXPORT virtual void SplitGeometryObjects();
68 * Add new one reference geometry object for calculation case.
70 HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
73 * Returns all reference geometry objects of calculation case.
75 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
78 * Removes reference geometry object from calculation case.
80 HYDRODATA_EXPORT virtual void RemoveGeometryObject( const Handle(HYDROData_Object)& theObject );
83 * Removes all reference geometry objects from calculation case.
85 HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
89 * Add new one child region for calculation case.
90 * The new region is added into the list of reference regions.
91 * The label of theZone is changed during this operation
92 * because of new region becomes the new parent for this zone.
94 HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion( const Handle(HYDROData_Zone)& theZone );
98 * Add new one reference region for calculation case.
99 * The label of theRegion is changed in case if old parent is not this calculation.
101 HYDRODATA_EXPORT virtual bool AddRegion( const Handle(HYDROData_Region)& theRegion );
104 * Returns all reference regions of calculation case.
106 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
109 * Removes reference region from calculation case.
111 HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
114 * Removes all reference regions from calculation case.
116 HYDRODATA_EXPORT virtual void RemoveRegions();
121 * Add new one region for calculation case.
122 * The new region is added into the list of reference regions.
124 HYDRODATA_EXPORT virtual Handle(HYDROData_Region) addNewRegion();
129 friend class HYDROData_Iterator;
132 * Creates new object in the internal data structure. Use higher level objects
133 * to create objects with real content.
135 HYDROData_CalculationCase();
138 * Destructs properties of the object and object itself, removes it from the document.
140 ~HYDROData_CalculationCase();