Salome HOME
- Merge type combo box in Calculation case dialog is filled and connected to get...
[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_Entity
28 {
29
30 %TypeHeaderCode
31 #include <HYDROData_Calculation.h>
32 %End
33
34 %ConvertToSubClassCode
35     switch ( sipCpp->GetKind() )
36     {
37       case KIND_CALCULATION:
38         sipClass = sipClass_HYDROData_Calculation;
39         break;
40
41       default:
42         // We don't recognise the type.
43         sipClass = NULL;
44     }
45 %End
46
47 public:      
48
49   /**
50    * Split reference geometry objects to non-intersected regions.
51    */
52   void SplitGeometryObjects();
53
54   /**
55    * Returns number of geometry objects for calculation case.
56    */
57   int NbGeometryObjects() const;
58
59   /**
60    * dd new one geometry object for calculation case.
61    */
62   void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)];
63   %MethodCode
64
65     Handle(HYDROData_Object) aGeomObj =
66       Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
67     if ( !aGeomObj.IsNull() )
68     {
69       Py_BEGIN_ALLOW_THREADS
70       sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddGeometryObject( aGeomObj ) : 
71                       sipCpp->AddGeometryObject( aGeomObj );
72       Py_END_ALLOW_THREADS
73     }
74
75   %End
76
77   /**
78    * Returns all geometry objects of calculation case.
79    */
80   //HYDROData_SequenceOfObjects GetGeometryObjects() const;
81
82   /**
83    * Removes all geometry objects from calculation case.
84    */
85   void RemoveGeometryObjects();
86
87
88   /**
89    * Add new one region for calculation case.
90    * The new region is added into the list of reference regions.
91    */
92   HYDROData_Region AddNewRegion() [Handle_HYDROData_Region ()];
93   %MethodCode
94
95     Handle(HYDROData_Region) aNewRegion;
96     
97     Py_BEGIN_ALLOW_THREADS
98     aNewRegion = sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddNewRegion() : 
99                                  sipCpp->AddNewRegion();
100     Py_END_ALLOW_THREADS
101     
102     sipRes = (HYDROData_Region*)createPointer( aNewRegion );
103
104   %End
105
106
107   /**
108    * Add new one reference region for calculation case.
109    */
110   void AddRegion( HYDROData_Region theRegion ) [void (const Handle_HYDROData_Region&)];
111   %MethodCode
112
113     Handle(HYDROData_Region) aRegion =
114       Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
115     if ( !aRegion.IsNull() )
116     {
117       Py_BEGIN_ALLOW_THREADS
118       sipSelfWasArg ? sipCpp->HYDROData_Calculation::AddRegion( aRegion ) : 
119                       sipCpp->AddRegion( aRegion );
120       Py_END_ALLOW_THREADS
121     }
122
123   %End
124
125   /**
126    * Returns all reference regions of calculation case.
127    */
128   //void HYDROData_SequenceOfObjects GetRegions() const;
129
130   /**
131    * Removes reference region from calculation case.
132    */
133   void RemoveRegion( HYDROData_Region theRegion ) [void (const Handle_HYDROData_Region&)];
134   %MethodCode
135
136     Handle(HYDROData_Region) aRegion =
137       Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
138     if ( !aRegion.IsNull() )
139     {
140       Py_BEGIN_ALLOW_THREADS
141       sipSelfWasArg ? sipCpp->HYDROData_Calculation::RemoveRegion( aRegion ) : 
142                       sipCpp->RemoveRegion( aRegion );
143       Py_END_ALLOW_THREADS
144     }
145
146   %End
147
148   /**
149    * Removes all reference regions from calculation case.
150    */
151   void RemoveRegions();
152
153
154 protected:
155
156   /**
157    * Creates new object in the internal data structure. Use higher level objects 
158    * to create objects with real content.
159    */
160   HYDROData_Calculation();
161
162   /**
163    * Destructs properties of the object and object itself, removes it from the document.
164    */
165   ~HYDROData_Calculation();
166 };
167
168