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_ChildRegion, ///< child regions
32 DataTag_Region ///< reference regions
37 DEFINE_STANDARD_RTTI(HYDROData_CalculationCase);
40 * Returns the kind of this object. Must be redefined in all objects of known type.
42 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_CALCULATION; }
46 * Dump Calculation object to Python script representation.
48 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
51 // Public methods to work with Calculation
54 * Split reference geometry objects to non-intersected regions.
56 HYDRODATA_EXPORT virtual void SplitGeometryObjects();
60 * Add new one reference geometry object for calculation case.
62 HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
65 * Returns all reference geometry objects of calculation case.
67 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
70 * Removes reference geometry object from calculation case.
72 HYDRODATA_EXPORT virtual void RemoveGeometryObject( const Handle(HYDROData_Object)& theObject );
75 * Removes all reference geometry objects from calculation case.
77 HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
81 * Add new one child region for calculation case.
82 * The new region is added into the list of reference regions.
83 * The label of theZone is changed during this operation
84 * because of new region becomes the new parent for this zone.
86 HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion( const Handle(HYDROData_Zone)& theZone );
90 * Add new one reference region for calculation case.
91 * The label of theRegion is changed in case if old parent is not this calculation.
93 HYDRODATA_EXPORT virtual bool AddRegion( const Handle(HYDROData_Region)& theRegion );
96 * Returns all reference regions of calculation case.
98 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
101 * Removes reference region from calculation case.
103 HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
106 * Removes all reference regions from calculation case.
108 HYDRODATA_EXPORT virtual void RemoveRegions();
113 * Add new one region for calculation case.
114 * The new region is added into the list of reference regions.
116 HYDRODATA_EXPORT virtual Handle(HYDROData_Region) addNewRegion();
121 friend class HYDROData_Iterator;
124 * Creates new object in the internal data structure. Use higher level objects
125 * to create objects with real content.
127 HYDROData_CalculationCase();
130 * Destructs properties of the object and object itself, removes it from the document.
132 ~HYDROData_CalculationCase();