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.
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.
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
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #include <HYDROData_Zone.h>
23 class HYDROData_Zone : public HYDROData_Entity
26 %ConvertToSubClassCode
27 switch ( sipCpp->GetKind() )
30 sipClass = sipClass_HYDROData_Zone;
34 // We don't recognise the type.
40 #include <HYDROData_Zone.h>
45 // Enumeration of mergin types for conflict altitudes
48 Merge_ZMIN, // The minimum values
49 Merge_ZMAX, // The maximum values
50 Merge_Object // Only one altitude will be taken into account
56 * Sets the merging type for conflict altitudes.
57 * By default it is set to Merge_ZMIN.
59 void SetMergeType( const MergeType& theType );
62 * Returns the merging type for conflict altitudes.
64 MergeType GetMergeType() const;
68 * Sets the reference altitude to resolve the conflict.
69 * This object is used only in case of "Merge_Object" merge type.
71 void SetMergeAltitude( HYDROData_IAltitudeObject theAltitude ) [void (const Handle_HYDROData_IAltitudeObject&)];
74 Handle(HYDROData_IAltitudeObject) aRefAltitude =
75 Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
76 if ( !aRefAltitude.IsNull() )
78 Py_BEGIN_ALLOW_THREADS
79 sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeObject( aRefAltitude ) :
80 sipCpp->SetMergeObject( aRefAltitude );
87 * Returns the reference altitude to resolve the conflict.
89 HYDROData_IAltitudeObject GetMergeAltitude() const [Handle_HYDROData_IAltitudeObject ()];
92 Handle(HYDROData_IAltitudeObject) aRefAltitude;
94 Py_BEGIN_ALLOW_THREADS
95 Handle(HYDROData_Entity) aRefObject = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeObject() :
96 sipCpp->GetMergeObject();
97 aRefAltitude = Handle(HYDROData_IAltitudeObject)::DownCast( aRefObject );
100 sipRes = (HYDROData_IAltitudeObject*)createPointer( aRefAltitude );
105 * Removes the reference altitude for resolving the conflict.
107 void RemoveMergeAltitude();
110 Py_BEGIN_ALLOW_THREADS
111 sipSelfWasArg ? sipCpp->HYDROData_Zone::RemoveMergeObject() :
112 sipCpp->RemoveMergeObject();
118 * Sets the reference object to resolve the conflict.
119 * This object is used only in case of "Merge_Object" merge type.
121 void SetMergeObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
124 Handle(HYDROData_Entity) aRefObject =
125 Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
126 if ( !aRefObject.IsNull() )
128 Py_BEGIN_ALLOW_THREADS
129 sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeObject( aRefObject ) :
130 sipCpp->SetMergeObject( aRefObject );
137 * Returns the reference object to resolve the conflict.
139 HYDROData_Entity GetMergeObject() const [Handle_HYDROData_Entity ()];
142 Handle(HYDROData_Entity) aRefObject;
144 Py_BEGIN_ALLOW_THREADS
145 aRefObject = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeObject() :
146 sipCpp->GetMergeObject();
149 sipRes = (HYDROData_Entity*)createPointer( aRefObject );
154 * Removes the reference object for resolving the conflict.
156 void RemoveMergeObject();
159 * Add new one object for zone.
161 void AddObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
164 Handle(HYDROData_Entity) anObj =
165 Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
166 if ( !anObj.IsNull() )
168 Py_BEGIN_ALLOW_THREADS
169 sipSelfWasArg ? sipCpp->HYDROData_Zone::AddObject( anObj ) :
170 sipCpp->AddObject( anObj );
177 * Returns all objects of zone.
179 HYDROData_SequenceOfObjects GetObjects() const;
182 * Removes all objects from zone.
184 void RemoveObjects();
188 * Sets the interpolator for zone. By default it is NULL and original
189 * interpolation algorithms are used to calculate points altitudes.
190 * If you set interpolator it won't be stored in the data model structure,
191 * it will be deleted during that time as this zone will be freed.
193 void SetInterpolator( HYDROData_IInterpolator* theInter );
196 * * Returns the interpolator of zone object.
198 HYDROData_IInterpolator* GetInterpolator() const;
203 * Creates new object in the internal data structure. Use higher level objects
204 * to create objects with real content.
209 * Destructs properties of the object and object itself, removes it from the document.