Salome HOME
Update flag for calculation case during polyline changing.
[modules/hydro.git] / src / HYDROData / HYDROData_CalculationCase.h
1
2
3 #ifndef HYDROData_CalculationCase_HeaderFile
4 #define HYDROData_CalculationCase_HeaderFile
5
6 #include <HYDROData_Entity.h>
7
8 class Handle(HYDROData_Object);
9 class Handle(HYDROData_Region);
10 class Handle(HYDROData_Zone);
11 class Handle(HYDROData_Polyline);
12
13 DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity)
14
15
16 /**\class HYDROData_CalculationCase
17  * \brief Calculation case is defined by selection of Geometry objects with or without \93Zone of water\94.
18  *
19  */
20 class HYDROData_CalculationCase : public HYDROData_Entity
21 {
22
23 protected:
24
25   /**
26    * Enumeration of tags corresponding to the persistent object parameters.
27    */
28   enum DataTag
29   {
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
35   };
36
37 public:
38
39   DEFINE_STANDARD_RTTI(HYDROData_CalculationCase);
40
41   /**
42    * Returns the kind of this object. Must be redefined in all objects of known type.
43    */
44   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_CALCULATION; }
45
46
47   /**
48    * Dump Calculation object to Python script representation.
49    */
50   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
51
52 public:      
53   // Public methods to work with Calculation
54
55   /**
56    * Split reference geometry objects to non-intersected regions.
57    */
58   HYDRODATA_EXPORT virtual void SplitGeometryObjects();
59
60
61   /**
62    * Add new one reference geometry object for calculation case.
63    */
64   HYDRODATA_EXPORT virtual bool AddGeometryObject( const Handle(HYDROData_Object)& theObject );
65
66   /**
67    * Returns all reference geometry objects of calculation case.
68    */
69   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
70
71   /**
72    * Removes reference geometry object from calculation case.
73    */
74   HYDRODATA_EXPORT virtual void RemoveGeometryObject( const Handle(HYDROData_Object)& theObject );
75
76   /**
77    * Removes all reference geometry objects from calculation case.
78    */
79   HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
80
81
82   /**
83    * Sets reference boundary polyline object for calculation case.
84    */
85   HYDRODATA_EXPORT virtual void SetBoundaryPolyline( const Handle(HYDROData_Polyline)& thePolyline );
86
87   /**
88    * Returns reference boundary polyline object of calculation case.
89    */
90   HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetBoundaryPolyline() const;
91
92   /**
93    * Remove reference boundary polyline object from calculation case.
94    */
95   HYDRODATA_EXPORT virtual void RemoveBoundaryPolyline();
96
97
98   /**
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.
103    */
104   HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion( const Handle(HYDROData_Zone)& theZone );
105
106
107   /**
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.
110    */
111   HYDRODATA_EXPORT virtual bool AddRegion( const Handle(HYDROData_Region)& theRegion );
112
113   /**
114    * Returns all reference regions of calculation case.
115    */
116   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
117
118   /**
119    * Removes reference region from calculation case.
120    */
121   HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
122
123   /**
124    * Removes all reference regions from calculation case.
125    */
126   HYDRODATA_EXPORT virtual void RemoveRegions();
127
128 private:
129
130   /**
131    * Add new one region for calculation case.
132    * The new region is added into the list of reference regions.
133    */
134   HYDRODATA_EXPORT virtual Handle(HYDROData_Region) addNewRegion();
135
136
137 protected:
138
139   friend class HYDROData_Iterator;
140
141   /**
142    * Creates new object in the internal data structure. Use higher level objects 
143    * to create objects with real content.
144    */
145   HYDROData_CalculationCase();
146
147   /**
148    * Destructs properties of the object and object itself, removes it from the document.
149    */
150   ~HYDROData_CalculationCase();
151 };
152
153 #endif