1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 #include <HYDROData_Calculation.h>
27 class HYDROData_Calculation : HYDROData_Object
31 #include <HYDROData_Calculation.h>
34 %ConvertToSubClassCode
35 switch ( sipCpp->GetKind() )
37 case KIND_CALCULATION:
38 sipClass = sipClass_HYDROData_Calculation;
42 // We don't recognise the type.
50 * Split reference geometry objects to non-intersected regions.
52 void SplitGeometryObjects();
55 * Returns number of geometry objects for calculation case.
57 int NbGeometryObjects() const;
60 * dd new one geometry object for calculation case.
62 void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)];
65 Handle(HYDROData_Object) aGeomObj =
66 Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
67 if ( !aGeomObj.IsNull() )
69 Py_BEGIN_ALLOW_THREADS
70 sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddGeometryObject( aGeomObj ) :
71 sipCpp->AddGeometryObject( aGeomObj );
78 * Replace the geometry object for calculation case.
80 void SetGeometryObject( const int theIndex,
81 HYDROData_Object theObject ) [void (const int, const Handle_HYDROData_Object&)];
84 Handle(HYDROData_Object) aGeomObj =
85 Handle(HYDROData_Object)::DownCast( createHandle( a1 ) );
86 if ( !aGeomObj.IsNull() )
88 Py_BEGIN_ALLOW_THREADS
89 sipSelfWasArg ? sipCpp->HYDROData_Calculation::SetGeometryObject( a0, aGeomObj ) :
90 sipCpp->SetGeometryObject( a0, aGeomObj );
97 * Sets the geometry object for calculation case.
99 //void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects );
102 * Returns geometry object of calculation case by index.
104 HYDROData_Object GetGeometryObject( const int theIndex ) const [Handle_HYDROData_Object (const int)];
107 Handle(HYDROData_Object) aGeomObj;
109 Py_BEGIN_ALLOW_THREADS
110 aGeomObj = sipSelfWasArg ? sipCpp->HYDROData_Calculation::GetGeometryObject( a0 ) :
111 sipCpp->GetGeometryObject( a0 );
114 sipRes = (HYDROData_Object*)createPointer( aGeomObj );
119 * Returns all geometry objects of calculation case.
121 //HYDROData_SequenceOfObjects GetGeometryObjects() const;
124 * Removes all geometry objects from calculation case.
126 void RemoveGeometryObjects();
130 * Add new one region for calculation case.
131 * The new region is not added into the list of reference regions.
133 HYDROData_Region AddNewRegion() [Handle_HYDROData_Region ()];
136 Handle(HYDROData_Region) aNewRegion;
138 Py_BEGIN_ALLOW_THREADS
139 aNewRegion = sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddNewRegion() :
140 sipCpp->AddNewRegion();
143 sipRes = (HYDROData_Region*)createPointer( aNewRegion );
148 * Removes all child regions from calculation case.
150 void RemoveChildRegions();
154 * Returns number of reference regions for calculation case.
156 int NbRegions() const;
159 * Add new one reference region for calculation case.
161 void AddRegion( HYDROData_Region theRegion ) [void (const Handle_HYDROData_Region&)];
164 Handle(HYDROData_Region) aRegion =
165 Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
166 if ( !aRegion.IsNull() )
168 Py_BEGIN_ALLOW_THREADS
169 sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddRegion( aRegion ) :
170 sipCpp->AddRegion( aRegion );
177 * Replace the reference region for calculation case.
179 void SetRegion( const int theIndex,
180 HYDROData_Region theRegion ) [void (const int, const Handle_HYDROData_Region&)];
183 Handle(HYDROData_Region) aRegion =
184 Handle(HYDROData_Region)::DownCast( createHandle( a1 ) );
185 if ( !aRegion.IsNull() )
187 Py_BEGIN_ALLOW_THREADS
188 sipSelfWasArg ? sipCpp->HYDROData_Calculation::SetRegion( a0, aRegion ) :
189 sipCpp->SetRegion( a0, aRegion );
196 * Inserts the reference region for calculation case before given index.
198 void InsertRegion( const int theBeforeIndex,
199 HYDROData_Region theRegion ) [void (const int, const Handle_HYDROData_Region&)];
202 Handle(HYDROData_Region) aRegion =
203 Handle(HYDROData_Region)::DownCast( createHandle( a1 ) );
204 if ( !aRegion.IsNull() )
206 Py_BEGIN_ALLOW_THREADS
207 sipSelfWasArg ? sipCpp->HYDROData_Calculation::InsertRegion( a0, aRegion ) :
208 sipCpp->InsertRegion( a0, aRegion );
215 * Sets reference regions for calculation case.
217 //void SetRegions( const HYDROData_SequenceOfObjects& theRegions );
220 * Returns reference region of calculation case by index.
222 HYDROData_Region GetRegion( const int theIndex ) const [Handle_HYDROData_Region (const int)];
225 Handle(HYDROData_Region) aRefRegion;
227 Py_BEGIN_ALLOW_THREADS
228 aRefRegion = sipSelfWasArg ? sipCpp->HYDROData_Calculation::GetRegion( a0 ) :
229 sipCpp->GetRegion( a0 );
232 sipRes = (HYDROData_Region*)createPointer( aRefRegion );
237 * Returns all reference regions of calculation case.
239 //void HYDROData_SequenceOfObjects GetRegions() const;
242 * Removes reference region from calculation case.
244 void RemoveRegion( HYDROData_Region theRegion ) [void (const Handle_HYDROData_Region&)];
247 Handle(HYDROData_Region) aRegion =
248 Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
249 if ( !aRegion.IsNull() )
251 Py_BEGIN_ALLOW_THREADS
252 sipSelfWasArg ? sipCpp->HYDROData_Calculation::RemoveRegion( aRegion ) :
253 sipCpp->RemoveRegion( aRegion );
260 * Removes region from calculation case by it index.
262 void RemoveRegion( const int theIndex );
265 * Removes all reference regions from calculation case.
267 void RemoveRegions();
273 * Creates new object in the internal data structure. Use higher level objects
274 * to create objects with real content.
276 HYDROData_Calculation();
279 * Destructs properties of the object and object itself, removes it from the document.
281 ~HYDROData_Calculation();