Salome HOME
Path to resource files corrected as in LINUX platform.
[modules/hydro.git] / src / HYDROPy / HYDROData_Zone.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_Zone.h>
25 %End
26
27 class HYDROData_Zone : HYDROData_Entity
28 {
29
30 %TypeHeaderCode
31 #include <HYDROData_Zone.h>
32 %End
33
34 %ConvertToSubClassCode
35     switch ( sipCpp->GetKind() )
36     {
37       case KIND_ZONE:
38         sipClass = sipClass_HYDROData_Zone;
39         break;
40
41       default:
42         // We don't recognise the type.
43         sipClass = NULL;
44     }
45 %End
46
47 public:      
48
49   /**
50    * Returns number of geometry objects for zone.
51    */
52   int NbGeometryObjects() const;
53
54   /**
55    * dd new one geometry object for zone.
56    */
57   void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)];
58   %MethodCode
59
60     Handle(HYDROData_Object) aGeomObj =
61       Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
62     if ( !aGeomObj.IsNull() )
63     {
64       Py_BEGIN_ALLOW_THREADS
65       sipSelfWasArg ? sipCpp->HYDROData_Zone::AddGeometryObject( aGeomObj ) : 
66                       sipCpp->AddGeometryObject( aGeomObj );
67       Py_END_ALLOW_THREADS
68     }
69
70   %End
71
72   /**
73    * Replace the geometry object for zone.
74    */
75   void SetGeometryObject( const int        theIndex, 
76                           HYDROData_Object theObject ) [void (const int, const Handle_HYDROData_Object&)];
77   %MethodCode
78
79     Handle(HYDROData_Object) aGeomObj =
80       Handle(HYDROData_Object)::DownCast( createHandle( a1 ) );
81     if ( !aGeomObj.IsNull() )
82     {
83       Py_BEGIN_ALLOW_THREADS
84       sipSelfWasArg ? sipCpp->HYDROData_Zone::SetGeometryObject( a0, aGeomObj ) : 
85                       sipCpp->SetGeometryObject( a0, aGeomObj );
86       Py_END_ALLOW_THREADS
87     }
88
89   %End
90
91   /**
92    * Sets the geometry object for zone.
93    */
94   //void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects );
95
96   /**
97    * Returns geometry object of zone by index.
98    */
99   HYDROData_Object GetGeometryObject( const int theIndex ) const [Handle_HYDROData_Object (const int)];
100   %MethodCode
101
102     Handle(HYDROData_Object) aGeomObj;
103     
104     Py_BEGIN_ALLOW_THREADS
105     aGeomObj = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetGeometryObject( a0 ) : 
106                                sipCpp->GetGeometryObject( a0 );
107     Py_END_ALLOW_THREADS
108     
109     sipRes = (HYDROData_Object*)createPointer( aGeomObj );
110   
111   %End
112
113   /**
114    * Returns all geometry objects of zone.
115    */
116   //HYDROData_SequenceOfObjects GetGeometryObjects() const;
117
118   /**
119    * Removes all geometry objects from zone.
120    */
121   void RemoveGeometryObjects();
122
123 protected:
124
125   /**
126    * Creates new object in the internal data structure. Use higher level objects 
127    * to create objects with real content.
128    */
129   HYDROData_Zone();
130
131   /**
132    * Destructs properties of the object and object itself, removes it from the document.
133    */
134   ~HYDROData_Zone();
135 };
136
137