3 #ifndef HYDROData_CalculationCase_HeaderFile
4 #define HYDROData_CalculationCase_HeaderFile
6 #include <HYDROData_Entity.h>
10 class Handle(HYDROData_Object);
11 class Handle(HYDROData_Region);
12 class Handle(HYDROData_Zone);
13 class Handle(HYDROData_Polyline);
15 DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
18 /**\class HYDROData_CalculationCase
19 * \brief Calculation case is defined by selection of Geometry objects with or without
\93Zone of water
\94.
22 class HYDROData_CalculationCase : public HYDROData_Entity
28 * Enumeration of tags corresponding to the persistent object parameters.
32 DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
33 DataTag_GeometryObject, ///< reference geometry objects
34 DataTag_ChildRegion, ///< child regions
35 DataTag_Region, ///< reference regions
36 DataTag_Polyline ///< reference boundary polyline
41 DEFINE_STANDARD_RTTI(HYDROData_CalculationCase);
44 * Returns the kind of this object. Must be redefined in all objects of known type.
46 HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_CALCULATION; }
49 * Updates the name of this object.
50 * Reimplemented to update the names of regions and zones.
52 HYDRODATA_EXPORT virtual void SetName( const QString& theName );
55 * Dump Calculation object to Python script representation.
57 HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
60 // Public methods to work with Calculation
63 * Split reference geometry objects to non-intersected regions.
65 HYDRODATA_EXPORT virtual void SplitGeometryObjects();
69 * Add new one reference geometry object for calculation case.
71 HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
74 * Returns all reference geometry objects of calculation case.
76 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
79 * Removes reference geometry object from calculation case.
81 HYDRODATA_EXPORT virtual void RemoveGeometryObject( const Handle(HYDROData_Object)& theObject );
84 * Removes all reference geometry objects from calculation case.
86 HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
90 * Sets reference boundary polyline object for calculation case.
92 HYDRODATA_EXPORT virtual void SetBoundaryPolyline( const Handle(HYDROData_Polyline)& thePolyline );
95 * Returns reference boundary polyline object of calculation case.
97 HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetBoundaryPolyline() const;
100 * Remove reference boundary polyline object from calculation case.
102 HYDRODATA_EXPORT virtual void RemoveBoundaryPolyline();
106 * Add new one child region for calculation case.
107 * The new region is added into the list of reference regions.
108 * The label of theZone is changed during this operation
109 * because of new region becomes the new parent for this zone.
111 HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion( const Handle(HYDROData_Zone)& theZone );
115 * Add new one reference region for calculation case.
116 * The label of theRegion is changed in case if old parent is not this calculation.
118 HYDRODATA_EXPORT virtual bool AddRegion( const Handle(HYDROData_Region)& theRegion );
121 * Returns all reference regions of calculation case.
123 HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
126 * Updates names of regions to correct order.
128 HYDRODATA_EXPORT virtual void UpdateRegionsOrder();
131 * Removes reference region from calculation case.
133 HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
136 * Removes all reference regions from calculation case.
138 HYDRODATA_EXPORT virtual void RemoveRegions();
141 * Returns shell containing faces which correspond to regions.
142 * \return shell as TopoDS_Shell
144 HYDRODATA_EXPORT virtual TopoDS_Shell GetShell();
149 * Add new one region for calculation case.
150 * The new region is added into the list of reference regions.
152 HYDRODATA_EXPORT virtual Handle(HYDROData_Region) addNewRegion();
157 friend class HYDROData_Iterator;
160 * Creates new object in the internal data structure. Use higher level objects
161 * to create objects with real content.
163 HYDRODATA_EXPORT HYDROData_CalculationCase();
166 * Destructs properties of the object and object itself, removes it from the document.
168 HYDRODATA_EXPORT ~HYDROData_CalculationCase();