Salome HOME
The region object has been added for HYDRO data model.
[modules/hydro.git] / src / HYDROPy / HYDROData_Calculation.sip
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 %ExportedHeaderCode
24 #include <HYDROData_Calculation.h>
25 %End
26
27 class HYDROData_Calculation : HYDROData_Object
28 {
29
30 %TypeHeaderCode
31 #include <HYDROData_Calculation.h>
32 %End
33
34 %ConvertToSubClassCode
35     if ( !Handle(HYDROData_Calculation)::DownCast( sipCpp ).IsNull() )
36       sipClass = sipClass_HYDROData_Calculation;
37     else
38       sipClass = NULL;
39 %End
40
41 public:
42
43   const ObjectKind          GetKind() const;
44
45 public:      
46
47   /**
48    * Sets boundary polyline for calculation case.
49    */
50   void SetBoundaryPolyline( HYDROData_Polyline thePolyline ) [void (const Handle_HYDROData_Polyline&)];
51   %MethodCode
52
53     Handle(HYDROData_Polyline) aRefPolyline =
54       Handle(HYDROData_Polyline)::DownCast( createHandle( a0 ) );
55     if ( !aRefPolyline.IsNull() )
56     {
57       Py_BEGIN_ALLOW_THREADS
58       sipSelfWasArg ? sipCpp->HYDROData_Calculation::SetBoundaryPolyline( aRefPolyline ) : 
59                       sipCpp->SetBoundaryPolyline( aRefPolyline );
60       Py_END_ALLOW_THREADS
61     }
62
63   %End
64
65   /**
66    * Returns boundary polyline of calculation case.
67    */
68   HYDROData_Polyline GetBoundaryPolyline() const [Handle_HYDROData_Polyline ()];
69   %MethodCode
70
71     Handle(HYDROData_Polyline) aRefPolyline;
72     
73     Py_BEGIN_ALLOW_THREADS
74     aRefPolyline = sipSelfWasArg ? sipCpp->HYDROData_Calculation::GetBoundaryPolyline() : 
75                                    sipCpp->GetBoundaryPolyline();
76     Py_END_ALLOW_THREADS
77     
78     sipRes = (HYDROData_Polyline*)createPointer( aRefPolyline );
79   
80   %End
81
82   /**
83    * Removes boundary polyline of calculation case.
84    */
85   void RemoveBoundaryPolyline();
86
87
88
89   /**
90    * Returns number of refrence zones for calculation case.
91    */
92   int NbZones() const;
93
94   /**
95    * Add new one refrence zone for calculation case.
96    */
97   void AddZone( HYDROData_Zone theZone ) [void (const Handle_HYDROData_Zone&)];
98   %MethodCode
99
100     Handle(HYDROData_Zone) aRefZone =
101       Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
102     if ( !aRefZone.IsNull() )
103     {
104       Py_BEGIN_ALLOW_THREADS
105       sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddZone( aRefZone ) : 
106                       sipCpp->AddZone( aRefZone );
107       Py_END_ALLOW_THREADS
108     }
109
110   %End
111
112   /**
113    * Replace the refrence zone for calculation case.
114    */
115   void SetZone( const int      theIndex, 
116                 HYDROData_Zone theZone ) [void (const int, const Handle_HYDROData_Zone&)];
117   %MethodCode
118
119     Handle(HYDROData_Zone) aRefZone =
120       Handle(HYDROData_Zone)::DownCast( createHandle( a1 ) );
121     if ( !aRefZone.IsNull() )
122     {
123       Py_BEGIN_ALLOW_THREADS
124       sipSelfWasArg ? sipCpp->HYDROData_Calculation::SetZone( a0, aRefZone ) : 
125                       sipCpp->SetZone( a0, aRefZone );
126       Py_END_ALLOW_THREADS
127     }
128
129   %End
130
131   /**
132    * Sets the refrence zones for calculation case.
133    */
134   //void SetZones( const HYDROData_SequenceOfObjects& theZones );
135
136   /**
137    * Returns refrence zone of calculation case by index.
138    */
139   HYDROData_Zone GetZone( const int theIndex ) const [Handle_HYDROData_Zone (const int)];
140   %MethodCode
141
142     Handle(HYDROData_Zone) aRefZone;
143     
144     Py_BEGIN_ALLOW_THREADS
145     aRefZone = sipSelfWasArg ? sipCpp->HYDROData_Calculation::GetZone( a0 ) : 
146                                sipCpp->GetZone( a0 );
147     Py_END_ALLOW_THREADS
148     
149     sipRes = (HYDROData_Zone*)createPointer( aRefZone );
150   
151   %End
152
153   /**
154    * Returns all refrence zone of calculation case.
155    */
156   //HYDROData_SequenceOfObjects GetZones() const;
157
158   /**
159    * Removes all refrence zone of calculation case.
160    */
161   void RemoveZones();
162
163
164
165   /**
166    * Returns number of splitted zones for calculation case.
167    */
168   int NbSplittedZones() const;
169
170   /**
171    * Add new one splitted zone for calculation case.
172    */
173   void AddSplittedZone( HYDROData_Zone theZone ) [void (const Handle_HYDROData_Zone&)];
174   %MethodCode
175
176     Handle(HYDROData_Zone) aRefZone =
177       Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
178     if ( !aRefZone.IsNull() )
179     {
180       Py_BEGIN_ALLOW_THREADS
181       sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddSplittedZone( aRefZone ) : 
182                       sipCpp->AddSplittedZone( aRefZone );
183       Py_END_ALLOW_THREADS
184     }
185
186   %End
187
188   /**
189    * Replace the splitted zone for calculation case.
190    */
191   void SetSplittedZone( const int      theIndex, 
192                         HYDROData_Zone theZone ) [void (const int, const Handle_HYDROData_Zone&)];
193   %MethodCode
194
195     Handle(HYDROData_Zone) aRefZone =
196       Handle(HYDROData_Zone)::DownCast( createHandle( a1 ) );
197     if ( !aRefZone.IsNull() )
198     {
199       Py_BEGIN_ALLOW_THREADS
200       sipSelfWasArg ? sipCpp->HYDROData_Calculation::SetSplittedZone( a0, aRefZone ) : 
201                       sipCpp->SetSplittedZone( a0, aRefZone );
202       Py_END_ALLOW_THREADS
203     }
204
205   %End
206
207   /**
208    * Sets the refrence zones for calculation case.
209    */
210   //void SetSplittedZones( const HYDROData_SequenceOfObjects& theZones );
211
212   /**
213    * Returns splitted zone of calculation case by index.
214    */
215   HYDROData_Zone GetSplittedZone( const int theIndex ) const [Handle_HYDROData_Zone (const int)];
216   %MethodCode
217
218     Handle(HYDROData_Zone) aRefZone;
219     
220     Py_BEGIN_ALLOW_THREADS
221     aRefZone = sipSelfWasArg ? sipCpp->HYDROData_Calculation::GetSplittedZone( a0 ) : 
222                                sipCpp->GetSplittedZone( a0 );
223     Py_END_ALLOW_THREADS
224     
225     sipRes = (HYDROData_Zone*)createPointer( aRefZone );
226   
227   %End
228
229   /**
230    * Returns all splitted zones of calculation case.
231    */
232   //HYDROData_SequenceOfObjects GetSplittedZones() const;
233
234   /**
235    * Removes all splitted refrence zone of calculation case.
236    */
237   void RemoveSplittedZones();
238
239
240 protected:
241
242   /**
243    * Creates new object in the internal data structure. Use higher level objects 
244    * to create objects with real content.
245    */
246   HYDROData_Calculation();
247
248   /**
249    * Destructs properties of the object and object itself, removes it from the document.
250    */
251   ~HYDROData_Calculation();
252 };
253
254