Salome HOME
Merge remote-tracking branch 'origin/BR_quadtree' into V7_dev
[modules/hydro.git] / src / HYDROPy / HYDROData_Zone.sip
1 // Copyright (C) 2014-2015  EDF-R&D
2 // This library is free software; you can redistribute it and/or
3 // modify it under the terms of the GNU Lesser General Public
4 // License as published by the Free Software Foundation; either
5 // version 2.1 of the License, or (at your option) any later version.
6 //
7 // This library is distributed in the hope that it will be useful,
8 // but WITHOUT ANY WARRANTY; without even the implied warranty of
9 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10 // Lesser General Public License for more details.
11 //
12 // You should have received a copy of the GNU Lesser General Public
13 // License along with this library; if not, write to the Free Software
14 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19 %ExportedHeaderCode
20 #include <HYDROData_Zone.h>
21 %End
22
23 class HYDROData_Zone : public HYDROData_Entity
24 {
25
26 %ConvertToSubClassCode
27     switch ( sipCpp->GetKind() )
28     {
29       case KIND_ZONE:
30         sipClass = sipClass_HYDROData_Zone;
31         break;
32
33       default:
34         // We don't recognise the type.
35         sipClass = NULL;
36     }
37 %End
38
39 %TypeHeaderCode
40 #include <HYDROData_Zone.h>
41 %End
42
43 public:
44
45   // Enumeration of mergin types for conflict altitudes
46   enum MergeType
47   {
48     Merge_ZMIN,   // The minimum values
49     Merge_ZMAX,   // The maximum values
50     Merge_Object   // Only one altitude will be taken into account
51   };
52
53 public:      
54
55   void SetMergeType( const MergeType& theType );
56   MergeType GetMergeType() const;
57
58   void SetMergeAltitude( HYDROData_IAltitudeObject theAltitude )
59   [void (const Handle_HYDROData_IAltitudeObject&)];
60   %MethodCode
61     Handle(HYDROData_IAltitudeObject) aRefAltitude =
62       Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
63     if ( !aRefAltitude.IsNull() )
64     {
65       Py_BEGIN_ALLOW_THREADS
66       sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeObject( aRefAltitude ) : 
67                       sipCpp->SetMergeObject( aRefAltitude );
68       Py_END_ALLOW_THREADS
69     }
70   %End
71
72   HYDROData_IAltitudeObject GetMergeAltitude() const [Handle_HYDROData_IAltitudeObject ()];
73   %MethodCode
74     Handle(HYDROData_IAltitudeObject) aRefAltitude;
75     Py_BEGIN_ALLOW_THREADS
76     Handle(HYDROData_Entity) aRefObject = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeObject() : 
77                                                           sipCpp->GetMergeObject();
78         aRefAltitude = Handle(HYDROData_IAltitudeObject)::DownCast( aRefObject );
79     Py_END_ALLOW_THREADS
80     sipRes = (HYDROData_IAltitudeObject*)createPointer( aRefAltitude );
81   %End
82
83   void RemoveMergeAltitude();
84   %MethodCode
85     Py_BEGIN_ALLOW_THREADS
86       sipSelfWasArg ? sipCpp->HYDROData_Zone::RemoveMergeObject() : 
87                       sipCpp->RemoveMergeObject();
88     Py_END_ALLOW_THREADS
89   %End
90
91   void SetMergeObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
92   %MethodCode
93     Handle(HYDROData_Entity) aRefObject =
94       Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
95     if ( !aRefObject.IsNull() )
96     {
97       Py_BEGIN_ALLOW_THREADS
98       sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeObject( aRefObject ) : 
99                       sipCpp->SetMergeObject( aRefObject );
100       Py_END_ALLOW_THREADS
101     }
102   %End
103
104   HYDROData_Entity GetMergeObject() const [Handle_HYDROData_Entity ()];
105   %MethodCode
106     Handle(HYDROData_Entity) aRefObject;
107     Py_BEGIN_ALLOW_THREADS
108     aRefObject = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeObject() : 
109                                  sipCpp->GetMergeObject();
110     Py_END_ALLOW_THREADS
111     sipRes = (HYDROData_Entity*)createPointer( aRefObject );
112   %End
113
114   void RemoveMergeObject();
115
116   void AddObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
117   %MethodCode
118
119     Handle(HYDROData_Entity) anObj =
120       Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
121     if ( !anObj.IsNull() )
122     {
123       Py_BEGIN_ALLOW_THREADS
124       sipSelfWasArg ? sipCpp->HYDROData_Zone::AddObject( anObj ) : 
125                       sipCpp->AddObject( anObj );
126       Py_END_ALLOW_THREADS
127     }
128
129   %End
130
131   HYDROData_SequenceOfObjects GetObjects() const;
132
133   void RemoveObjects();
134   void SetInterpolator( HYDROData_IInterpolator* theInter );
135   HYDROData_IInterpolator* GetInterpolator() const;
136
137 protected:
138
139   HYDROData_Zone();
140   ~HYDROData_Zone();
141 };