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
46 enum MergeAltitudesType
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 MergeAltitudesType& theType );
62 * Returns the merging type for conflict altitudes.
64 MergeAltitudesType 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::SetMergeAltitude( aRefAltitude ) :
80 sipCpp->SetMergeAltitude( 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 aRefAltitude = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeAltitude() :
96 sipCpp->GetMergeAltitude();
99 sipRes = (HYDROData_IAltitudeObject*)createPointer( aRefAltitude );
104 * Removes the reference altitude for resolving the conflict.
106 void RemoveMergeAltitude();
110 * dd new one geometry object for zone.
112 void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)];
115 Handle(HYDROData_Object) aGeomObj =
116 Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
117 if ( !aGeomObj.IsNull() )
119 Py_BEGIN_ALLOW_THREADS
120 sipSelfWasArg ? sipCpp->HYDROData_Zone::AddGeometryObject( aGeomObj ) :
121 sipCpp->AddGeometryObject( aGeomObj );
128 * Returns all geometry objects of zone.
130 HYDROData_SequenceOfObjects GetGeometryObjects() const;
133 * Removes all geometry objects from zone.
135 void RemoveGeometryObjects();
139 * Sets the interpolator for zone. By default it is NULL and original
140 * interpolation algorithms are used to calculate points altitudes.
141 * If you set interpolator it won't be stored in the data model structure,
142 * it will be deleted during that time as this zone will be freed.
144 void SetInterpolator( HYDROData_IInterpolator* theInter );
147 * * Returns the interpolator of zone object.
149 HYDROData_IInterpolator* GetInterpolator() const;
154 * Creates new object in the internal data structure. Use higher level objects
155 * to create objects with real content.
160 * Destructs properties of the object and object itself, removes it from the document.