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