Salome HOME
Path to resource files corrected as in LINUX platform.
[modules/hydro.git] / src / HYDROData / HYDROData_Calculation.h
1
2
3 #ifndef HYDROData_Calculation_HeaderFile
4 #define HYDROData_Calculation_HeaderFile
5
6 #include <HYDROData_Entity.h>
7
8 class Handle(HYDROData_Object);
9 class Handle(HYDROData_Region);
10
11 DEFINE_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Entity)
12
13
14 /**\class HYDROData_Calculation
15  * \brief Calculation case is defined by selection of Geometry objects with or without \93Zone of water\94.
16  *
17  */
18 class HYDROData_Calculation : public HYDROData_Entity
19 {
20
21 protected:
22
23   /**
24    * Enumeration of tags corresponding to the persistent object parameters.
25    */
26   enum DataTag
27   {
28     DataTag_First = HYDROData_Entity::DataTag_First + 100, ///< first tag, to reserve
29     DataTag_GeometryObject,   ///< reference geometry objects
30     DataTag_Region            ///< reference regions
31   };
32
33   /**
34    * Enumeration of tags corresponding to the child sub-objects of object.
35    */
36   enum ChildTag
37   {
38     ChildTag_First = HYDROData_Entity::ChildTag_First + 100, ///< first tag, to reserve
39     ChildTag_Region      ///< child regions
40   };
41
42 public:
43
44   DEFINE_STANDARD_RTTI(HYDROData_Calculation);
45
46   /**
47    * Returns the kind of this object. Must be redefined in all objects of known type.
48    */
49   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_CALCULATION; }
50
51
52   /**
53    * Dump Calculation object to Python script representation.
54    */
55   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
56
57 public:      
58   // Public methods to work with Calculation
59
60   /**
61    * Split reference geometry objects to non-intersected regions.
62    */
63   HYDRODATA_EXPORT virtual void SplitGeometryObjects();
64
65
66   /**
67    * Returns number of geometry objects for calculation case.
68    */
69   HYDRODATA_EXPORT virtual int NbGeometryObjects() const;
70
71   /**
72    * Add new one geometry object for calculation case.
73    */
74   HYDRODATA_EXPORT virtual void AddGeometryObject( const Handle(HYDROData_Object)& theObject );
75
76   /**
77    * Replace the geometry object for calculation case.
78    */
79   HYDRODATA_EXPORT virtual void SetGeometryObject( const int                       theIndex,
80                                                    const Handle(HYDROData_Object)& theObject );
81
82   /**
83    * Sets the geometry object for calculation case.
84    */
85   HYDRODATA_EXPORT virtual void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects );
86
87   /**
88    * Returns geometry object of calculation case by index.
89    */
90   HYDRODATA_EXPORT virtual Handle(HYDROData_Object) GetGeometryObject( const int theIndex ) const;
91
92   /**
93    * Returns all geometry objects of calculation case.
94    */
95   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetGeometryObjects() const;
96
97   /**
98    * Removes all geometry objects from calculation case.
99    */
100   HYDRODATA_EXPORT virtual void RemoveGeometryObjects();
101
102
103   /**
104    * Add new one region for calculation case.
105    * The new region is not added into the list of reference regions.
106    */
107   HYDRODATA_EXPORT virtual Handle(HYDROData_Region) AddNewRegion();
108
109   /**
110    * Removes all child regions from calculation case.
111    */
112   HYDRODATA_EXPORT virtual void RemoveChildRegions();
113
114
115   /**
116    * Returns number of reference regions of calculation case.
117    */
118   int NbRegions() const;
119
120   /**
121    * Add new one reference region for calculation case.
122    */
123   HYDRODATA_EXPORT virtual void AddRegion( const Handle(HYDROData_Region)& theRegion );
124
125   /**
126    * Replace the reference region for calculation case.
127    */
128   HYDRODATA_EXPORT virtual void SetRegion( const int                       theIndex,
129                                            const Handle(HYDROData_Region)& theRegion );
130
131   /**
132    * Inserts the reference region for calculation case before given index.
133    */
134   HYDRODATA_EXPORT virtual void InsertRegion( const int                       theBeforeIndex,
135                                               const Handle(HYDROData_Region)& theRegion );
136
137   /**
138    * Sets reference regions for calculation case.
139    */
140   HYDRODATA_EXPORT virtual void SetRegions( const HYDROData_SequenceOfObjects& theRegions );
141
142   /**
143    * Returns reference region of calculation case by index.
144    */
145   HYDRODATA_EXPORT virtual Handle(HYDROData_Region) GetRegion( const int theIndex ) const;
146
147   /**
148    * Returns all reference regions of calculation case.
149    */
150   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetRegions() const;
151
152   /**
153    * Removes reference region from calculation case.
154    */
155   HYDRODATA_EXPORT virtual void RemoveRegion( const Handle(HYDROData_Region)& theRegion );
156
157   /**
158    * Removes reference region from calculation case by it index.
159    */
160   HYDRODATA_EXPORT virtual void RemoveRegion( const int theIndex );
161
162   /**
163    * Removes all reference regions from calculation case.
164    */
165   HYDRODATA_EXPORT virtual void RemoveRegions();
166
167 protected:
168
169   friend class HYDROData_Iterator;
170
171   /**
172    * Creates new object in the internal data structure. Use higher level objects 
173    * to create objects with real content.
174    */
175   HYDROData_Calculation();
176
177   /**
178    * Destructs properties of the object and object itself, removes it from the document.
179    */
180   ~HYDROData_Calculation();
181 };
182
183 #endif