Salome HOME
Splitting of czlculztion zones.
[modules/hydro.git] / src / HYDROData / HYDROData_Calculation.h
1
2 #ifndef HYDROData_HYDROData_Calculation
3 #define HYDROData_HYDROData_Calculation
4
5 #include <HYDROData_Object.h>
6
7 class gp_XY;
8 class gp_XYZ;
9 class QPointF;
10 class QFile;
11
12 class Handle(HYDROData_Polyline);
13 class Handle(HYDROData_Zone);
14
15 DEFINE_STANDARD_HANDLE(HYDROData_Calculation, HYDROData_Object)
16
17
18 /**\class HYDROData_Calculation
19  * \brief Class that stores/retreives information about the Calculation case.
20  *
21  * Calculation case is defined by selection of Geometry objects with or without \93Zone of water\94
22  */
23 class HYDROData_Calculation : public HYDROData_Object
24 {
25
26 protected:
27
28   /**
29    * Enumeration of tags corresponding to the persistent object parameters.
30    */
31   enum DataTag
32   {
33     DataTag_First = HYDROData_Object::DataTag_First + 100, ///< first tag, to reserve
34     DataTag_BoundaryPolyline,    ///< reference boundary polyline
35     DataTag_Zone,                ///< reference zones
36     DataTag_SplittedZone         ///< reference splitted zones
37   };
38
39 public:
40
41   DEFINE_STANDARD_RTTI(HYDROData_Calculation);
42
43   /**
44    * Returns the kind of this object. Must be redefined in all objects of known type.
45    */
46   HYDRODATA_EXPORT virtual const ObjectKind GetKind() const { return KIND_CALCULATION; }
47
48
49   /**
50    * Dump Calculation object to Python script representation.
51    */
52   HYDRODATA_EXPORT virtual QStringList DumpToPython( MapOfTreatedObjects& theTreatedObjects ) const;
53
54 public:      
55   // Public methods to work with Calculation
56
57   /**
58    * Sets boundary polyline for calculation case.
59    */
60   HYDRODATA_EXPORT virtual void SetBoundaryPolyline( const Handle(HYDROData_Polyline)& thePolyline );
61
62   /**
63    * Returns boundary polyline of calculation case.
64    */
65   HYDRODATA_EXPORT virtual Handle(HYDROData_Polyline) GetBoundaryPolyline() const;
66
67   /**
68    * Removes boundary polyline of calculation case.
69    */
70   HYDRODATA_EXPORT virtual void RemoveBoundaryPolyline();
71
72
73   /**
74    * Returns number of refrence zones for calculation case.
75    */
76   HYDRODATA_EXPORT virtual int NbZones() const;
77
78   /**
79    * Add new one refrence zone for calculation case.
80    */
81   HYDRODATA_EXPORT virtual void AddZone( const Handle(HYDROData_Zone)& theZone );
82
83   /**
84    * Replace the refrence zone for calculation case.
85    */
86   HYDRODATA_EXPORT virtual void SetZone( const int                     theIndex,
87                                          const Handle(HYDROData_Zone)& theBathymetry );
88
89   /**
90    * Sets the refrence zones for calculation case.
91    */
92   HYDRODATA_EXPORT virtual void SetZones( const HYDROData_SequenceOfObjects& theZones );
93
94   /**
95    * Returns refrence zone of calculation case by index.
96    */
97   HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) GetZone( const int theIndex ) const;
98
99   /**
100    * Returns all refrence zone of calculation case.
101    */
102   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetZones() const;
103
104   /**
105    * Removes all refrence zone of calculation case.
106    */
107   HYDRODATA_EXPORT virtual void RemoveZones();
108
109
110   /**
111    * Returns number of splitted zones for calculation case.
112    */
113   HYDRODATA_EXPORT virtual int NbSplittedZones() const;
114
115   /**
116    * Add new one splitted zone for calculation case.
117    */
118   HYDRODATA_EXPORT virtual void AddSplittedZone( const Handle(HYDROData_Zone)& theZone );
119
120   /**
121    * Replace the splitted zone for calculation case.
122    */
123   HYDRODATA_EXPORT virtual void SetSplittedZone( const int                     theIndex,
124                                                  const Handle(HYDROData_Zone)& theBathymetry );
125
126   /**
127    * Sets the refrence zones for calculation case.
128    */
129   HYDRODATA_EXPORT virtual void SetSplittedZones( const HYDROData_SequenceOfObjects& theZones );
130
131   /**
132    * Returns splitted zone of calculation case by index.
133    */
134   HYDRODATA_EXPORT virtual Handle(HYDROData_Zone) GetSplittedZone( const int theIndex ) const;
135
136   /**
137    * Returns all splitted zone of calculation case.
138    */
139   HYDRODATA_EXPORT virtual HYDROData_SequenceOfObjects GetSplittedZones() const;
140
141   /**
142    * Removes all splitted refrence zone of calculation case.
143    */
144   HYDRODATA_EXPORT virtual void RemoveSplittedZones();
145
146 protected:
147
148   friend class HYDROData_Iterator;
149
150   /**
151    * Creates new object in the internal data structure. Use higher level objects 
152    * to create objects with real content.
153    */
154   HYDROData_Calculation();
155
156   /**
157    * Destructs properties of the object and object itself, removes it from the document.
158    */
159   ~HYDROData_Calculation();
160 };
161
162 #endif