Salome HOME
Functions declaration corrected.
[modules/hydro.git] / src / HYDROPy / HYDROData_Region.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_Region.h>
25 %End
26
27 class HYDROData_Region : HYDROData_Entity
28 {
29
30 %TypeHeaderCode
31 #include <HYDROData_Region.h>
32 %End
33
34 %ConvertToSubClassCode
35     switch ( sipCpp->GetKind() )
36     {
37       case KIND_REGION:
38         sipClass = sipClass_HYDROData_Region;
39         break;
40
41       default:
42         // We don't recognise the type.
43         sipClass = NULL;
44     }
45 %End
46
47 public:      
48
49   /**
50    * Create new one reference zone for region on child label.
51    * The new zone is not added into the list of reference zones.
52    */
53   HYDROData_Zone AddNewZone() [Handle_HYDROData_Zone ()];
54   %MethodCode
55
56     Handle(HYDROData_Zone) aNewZone;
57     
58     Py_BEGIN_ALLOW_THREADS
59     aNewZone = sipSelfWasArg ? sipCpp->HYDROData_Region::AddNewZone() : 
60                                sipCpp->AddNewZone();
61     Py_END_ALLOW_THREADS
62     
63     sipRes = (HYDROData_Zone*)createPointer( aNewZone );
64
65   %End
66
67   /**
68    * Removes all child zones from region.
69    */
70   void RemoveChildZones();
71
72
73   /**
74    * Returns number of reference zones of region.
75    */
76   int NbZones() const;
77
78   /**
79    * Add new one reference zone for region.
80    */
81   void AddZone( HYDROData_Zone theZone ) [void (const Handle_HYDROData_Zone&)];
82   %MethodCode
83
84     Handle(HYDROData_Zone) aZone =
85       Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
86     if ( !aZone.IsNull() )
87     {
88       Py_BEGIN_ALLOW_THREADS
89       sipSelfWasArg ? sipCpp->HYDROData_Region::AddZone( aZone ) : 
90                       sipCpp->AddZone( aZone );
91       Py_END_ALLOW_THREADS
92     }
93
94   %End
95
96   /**
97    * Replace the reference zone for region.
98    */
99   void SetZone( const int      theIndex, 
100                 HYDROData_Zone theZone ) [void (const int, const Handle_HYDROData_Zone&)];
101   %MethodCode
102
103     Handle(HYDROData_Zone) aZone =
104       Handle(HYDROData_Zone)::DownCast( createHandle( a1 ) );
105     if ( !aZone.IsNull() )
106     {
107       Py_BEGIN_ALLOW_THREADS
108       sipSelfWasArg ? sipCpp->HYDROData_Region::SetZone( a0, aZone ) : 
109                       sipCpp->SetZone( a0, aZone );
110       Py_END_ALLOW_THREADS
111     }
112
113   %End
114
115   /**
116    * Inserts the reference zone for region before given index.
117    */
118   void InsertZone( const int      theBeforeIndex, 
119                    HYDROData_Zone theZone ) [void (const int, const Handle_HYDROData_Zone&)];
120   %MethodCode
121
122     Handle(HYDROData_Zone) aZone =
123       Handle(HYDROData_Zone)::DownCast( createHandle( a1 ) );
124     if ( !aZone.IsNull() )
125     {
126       Py_BEGIN_ALLOW_THREADS
127       sipSelfWasArg ? sipCpp->HYDROData_Region::InsertZone( a0, aZone ) : 
128                       sipCpp->InsertZone( a0, aZone );
129       Py_END_ALLOW_THREADS
130     }
131
132   %End
133
134   /**
135    * Sets reference zones for calculation region.
136    */
137   //void SetZones( const HYDROData_SequenceOfObjects& theZones );
138
139   /**
140    * Returns reference zone of region by index.
141    */
142   HYDROData_Zone GetZone( const int theIndex ) const [Handle_HYDROData_Zone (const int)];
143   %MethodCode
144
145     Handle(HYDROData_Zone) aRefZone;
146     
147     Py_BEGIN_ALLOW_THREADS
148     aRefZone = sipSelfWasArg ? sipCpp->HYDROData_Region::GetZone( a0 ) : 
149                                sipCpp->GetZone( a0 );
150     Py_END_ALLOW_THREADS
151     
152     sipRes = (HYDROData_Zone*)createPointer( aRefZone );
153   
154   %End
155
156   /**
157    * Returns all reference zone of region.
158    */
159   //void HYDROData_SequenceOfObjects GetZones() const;
160
161   /**
162    * Removes reference zone from region.
163    */
164   void RemoveZone( HYDROData_Zone theZone ) [void (const Handle_HYDROData_Zone&)];
165   %MethodCode
166
167     Handle(HYDROData_Zone) aZone =
168       Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
169     if ( !aZone.IsNull() )
170     {
171       Py_BEGIN_ALLOW_THREADS
172       sipSelfWasArg ? sipCpp->HYDROData_Region::RemoveZone( aZone ) : 
173                       sipCpp->RemoveZone( aZone );
174       Py_END_ALLOW_THREADS
175     }
176
177   %End
178
179   /**
180    * Removes reference zone from region by it index.
181    */
182   void RemoveZone( const int theIndex );
183
184   /**
185    * Removes all reference zones from region.
186    */
187   void RemoveZones();
188
189
190 protected:
191
192   /**
193    * Creates new object in the internal data structure. Use higher level objects 
194    * to create objects with real content.
195    */
196   HYDROData_Region();
197
198   /**
199    * Destructs properties of the object and object itself, removes it from the document.
200    */
201   ~HYDROData_Region();
202 };
203
204