X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_Zone.sip;h=5246a603239382c08caa1bac44849d09e1a440b2;hb=f58865bdfb548ebba53ecb264f17ef357fa4c409;hp=e70baae0e675e3027ea0f6e301355abc9089e74b;hpb=84f8b4a57d3cdad820bc1333a5066699cd1c8ae3;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_Zone.sip b/src/HYDROPy/HYDROData_Zone.sip index e70baae0..5246a603 100644 --- a/src/HYDROPy/HYDROData_Zone.sip +++ b/src/HYDROPy/HYDROData_Zone.sip @@ -24,13 +24,9 @@ #include %End -class HYDROData_Zone : HYDROData_Entity +class HYDROData_Zone : public HYDROData_Entity { -%TypeHeaderCode -#include -%End - %ConvertToSubClassCode switch ( sipCpp->GetKind() ) { @@ -44,76 +40,98 @@ class HYDROData_Zone : HYDROData_Entity } %End +%TypeHeaderCode +#include +%End + +public: + + // Enumeration of mergin types for conflict altitudes + enum MergeAltitudesType + { + Merge_ZMIN, // The minimum values + Merge_ZMAX, // The maximum values + Merge_Object // Only one altitude will be taken into account + }; + public: /** - * Returns number of geometry objects for zone. + * Sets the merging type for conflict altitudes. + * By default it is set to Merge_ZMIN. */ - int NbGeometryObjects() const; + void SetMergeType( const MergeAltitudesType& theType ); /** - * dd new one geometry object for zone. + * Returns the merging type for conflict altitudes. */ - void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)]; - %MethodCode + MergeAltitudesType GetMergeType() const; - Handle(HYDROData_Object) aGeomObj = - Handle(HYDROData_Object)::DownCast( createHandle( a0 ) ); - if ( !aGeomObj.IsNull() ) - { - Py_BEGIN_ALLOW_THREADS - sipSelfWasArg ? sipCpp->HYDROData_Zone::AddGeometryObject( aGeomObj ) : - sipCpp->AddGeometryObject( aGeomObj ); - Py_END_ALLOW_THREADS - } - - %End /** - * Replace the geometry object for zone. + * Sets the reference altitude to resolve the conflict. + * This object is used only in case of "Merge_Object" merge type. */ - void SetGeometryObject( const int theIndex, - HYDROData_Object theObject ) [void (const int, const Handle_HYDROData_Object&)]; + void SetMergeAltitude( HYDROData_IAltitudeObject theAltitude ) [void (const Handle_HYDROData_IAltitudeObject&)]; %MethodCode - Handle(HYDROData_Object) aGeomObj = - Handle(HYDROData_Object)::DownCast( createHandle( a1 ) ); - if ( !aGeomObj.IsNull() ) + Handle(HYDROData_IAltitudeObject) aRefAltitude = + Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) ); + if ( !aRefAltitude.IsNull() ) { Py_BEGIN_ALLOW_THREADS - sipSelfWasArg ? sipCpp->HYDROData_Zone::SetGeometryObject( a0, aGeomObj ) : - sipCpp->SetGeometryObject( a0, aGeomObj ); + sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeAltitude( aRefAltitude ) : + sipCpp->SetMergeAltitude( aRefAltitude ); Py_END_ALLOW_THREADS } %End /** - * Sets the geometry object for zone. + * Returns the reference altitude to resolve the conflict. */ - //void SetGeometryObjects( const HYDROData_SequenceOfObjects& theObjects ); - - /** - * Returns geometry object of zone by index. - */ - HYDROData_Object GetGeometryObject( const int theIndex ) const [Handle_HYDROData_Object (const int)]; + HYDROData_IAltitudeObject GetMergeAltitude() const [Handle_HYDROData_IAltitudeObject ()]; %MethodCode - Handle(HYDROData_Object) aGeomObj; + Handle(HYDROData_IAltitudeObject) aRefAltitude; Py_BEGIN_ALLOW_THREADS - aGeomObj = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetGeometryObject( a0 ) : - sipCpp->GetGeometryObject( a0 ); + aRefAltitude = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeAltitude() : + sipCpp->GetMergeAltitude(); Py_END_ALLOW_THREADS - sipRes = (HYDROData_Object*)createPointer( aGeomObj ); + sipRes = (HYDROData_IAltitudeObject*)createPointer( aRefAltitude ); %End + /** + * Removes the reference altitude for resolving the conflict. + */ + void RemoveMergeAltitude(); + + + /** + * dd new one geometry object for zone. + */ + void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)]; + %MethodCode + + Handle(HYDROData_Object) aGeomObj = + Handle(HYDROData_Object)::DownCast( createHandle( a0 ) ); + if ( !aGeomObj.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipSelfWasArg ? sipCpp->HYDROData_Zone::AddGeometryObject( aGeomObj ) : + sipCpp->AddGeometryObject( aGeomObj ); + Py_END_ALLOW_THREADS + } + + %End + /** * Returns all geometry objects of zone. */ - //HYDROData_SequenceOfObjects GetGeometryObjects() const; + HYDROData_SequenceOfObjects GetGeometryObjects() const; /** * Removes all geometry objects from zone.