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);
11 class Handle(HYDROData_Polyline);
13 DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
16 /**\class HYDROData_CalculationCase
17 * \brief Calculation case is defined by selection of Geometry objects with or without
\93Zone of water
\94.
20 class HYDROData_CalculationCase : public HYDROData_Entity
26 * Enumeration of tags corresponding to the persistent object parameters.
30 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
31 DataTag_GeometryObject, ///< reference geometry objects
32 DataTag_ChildRegion, ///< child regions
33 DataTag_Region, ///< reference regions
34 DataTag_Polyline ///< reference boundary polyline
39 DEFINE_STANDARD_RTTI(HYDROData_CalculationCase);
42 * Returns the kind of this object. Must be redefined in all objects of known type.
44 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_CALCULATION; }
48 * Dump Calculation object to Python script representation.
50 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
53 // Public methods to work with Calculation
56 * Split reference geometry objects to non-intersected regions.
58 HYDRODATA_EXPORT virtual void SplitGeometryObjects();
62 * Add new one reference geometry object for calculation case.
64 HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
67 * Returns all reference geometry objects of calculation case.
69 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
72 * Removes reference geometry object from calculation case.
74 HYDRODATA_EXPORT virtual void RemoveGeometryObject( const Handle(HYDROData_Object)& theObject );
77 * Removes all reference geometry objects from calculation case.
79 HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
83 * Sets reference boundary polyline object for calculation case.
85 HYDRODATA_EXPORT virtual void SetBoundaryPolyline( const Handle(HYDROData_Polyline)& thePolyline );
88 * Returns reference boundary polyline object of calculation case.
90 HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetBoundaryPolyline() const;
93 * Remove reference boundary polyline object from calculation case.
95 HYDRODATA_EXPORT virtual void RemoveBoundaryPolyline();
99 * Add new one child region for calculation case.
100 * The new region is added into the list of reference regions.
101 * The label of theZone is changed during this operation
102 * because of new region becomes the new parent for this zone.
104 HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion( const Handle(HYDROData_Zone)& theZone );
108 * Add new one reference region for calculation case.
109 * The label of theRegion is changed in case if old parent is not this calculation.
111 HYDRODATA_EXPORT virtual bool AddRegion( const Handle(HYDROData_Region)& theRegion );
114 * Returns all reference regions of calculation case.
116 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
119 * Updates names of regions to correct order.
121 HYDRODATA_EXPORT virtual void UpdateRegionsOrder();
124 * Removes reference region from calculation case.
126 HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
129 * Removes all reference regions from calculation case.
131 HYDRODATA_EXPORT virtual void RemoveRegions();
136 * Add new one region for calculation case.
137 * The new region is added into the list of reference regions.
139 HYDRODATA_EXPORT virtual Handle(HYDROData_Region) addNewRegion();
144 friend class HYDROData_Iterator;
147 * Creates new object in the internal data structure. Use higher level objects
148 * to create objects with real content.
150 HYDROData_CalculationCase();
153 * Destructs properties of the object and object itself, removes it from the document.
155 ~HYDROData_CalculationCase();