X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_Zone.sip;h=31e1dd2c711ba9d9431615a83a4f34edcbbf6437;hb=10a9948d19f358b0ccf850d362d8ad8173b3ea5f;hp=6a1aba28ab0d6c335952f1ad40e48a0f089eae92;hpb=b2b21a9b49f0df8f53c3a1bcb459a4ec081a84ec;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_Zone.sip b/src/HYDROPy/HYDROData_Zone.sip index 6a1aba28..31e1dd2c 100644 --- a/src/HYDROPy/HYDROData_Zone.sip +++ b/src/HYDROPy/HYDROData_Zone.sip @@ -43,7 +43,7 @@ class HYDROData_Zone : public HYDROData_Entity public: // Enumeration of mergin types for conflict altitudes - enum MergeAltitudesType + enum MergeType { Merge_ZMIN, // The minimum values Merge_ZMAX, // The maximum values @@ -56,12 +56,12 @@ public: * Sets the merging type for conflict altitudes. * By default it is set to Merge_ZMIN. */ - void SetMergeType( const MergeAltitudesType& theType ); + void SetMergeType( const MergeType& theType ); /** * Returns the merging type for conflict altitudes. */ - MergeAltitudesType GetMergeType() const; + MergeType GetMergeType() const; /** @@ -76,8 +76,8 @@ public: if ( !aRefAltitude.IsNull() ) { Py_BEGIN_ALLOW_THREADS - sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeAltitude( aRefAltitude ) : - sipCpp->SetMergeAltitude( aRefAltitude ); + sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeObject( aRefAltitude ) : + sipCpp->SetMergeObject( aRefAltitude ); Py_END_ALLOW_THREADS } @@ -92,8 +92,9 @@ public: Handle(HYDROData_IAltitudeObject) aRefAltitude; Py_BEGIN_ALLOW_THREADS - aRefAltitude = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeAltitude() : - sipCpp->GetMergeAltitude(); + Handle(HYDROData_Entity) aRefObject = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeObject() : + sipCpp->GetMergeObject(); + aRefAltitude = Handle(HYDROData_IAltitudeObject)::DownCast( aRefObject ); Py_END_ALLOW_THREADS sipRes = (HYDROData_IAltitudeObject*)createPointer( aRefAltitude ); @@ -104,35 +105,83 @@ public: * Removes the reference altitude for resolving the conflict. */ void RemoveMergeAltitude(); + %MethodCode + + Py_BEGIN_ALLOW_THREADS + sipSelfWasArg ? sipCpp->HYDROData_Zone::RemoveMergeObject() : + sipCpp->RemoveMergeObject(); + Py_END_ALLOW_THREADS + + %End + + /** + * Sets the reference object to resolve the conflict. + * This object is used only in case of "Merge_Object" merge type. + */ + void SetMergeObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)]; + %MethodCode + + Handle(HYDROData_Entity) aRefObject = + Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) ); + if ( !aRefObject.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipSelfWasArg ? sipCpp->HYDROData_Zone::SetMergeObject( aRefObject ) : + sipCpp->SetMergeObject( aRefObject ); + Py_END_ALLOW_THREADS + } + %End + + /** + * Returns the reference object to resolve the conflict. + */ + HYDROData_Entity GetMergeObject() const [Handle_HYDROData_Entity ()]; + %MethodCode + + Handle(HYDROData_Entity) aRefObject; + + Py_BEGIN_ALLOW_THREADS + aRefObject = sipSelfWasArg ? sipCpp->HYDROData_Zone::GetMergeObject() : + sipCpp->GetMergeObject(); + Py_END_ALLOW_THREADS + + sipRes = (HYDROData_Entity*)createPointer( aRefObject ); + + %End + + /** + * Removes the reference object for resolving the conflict. + */ + void RemoveMergeObject(); /** - * dd new one geometry object for zone. + * Add new one object for zone. */ - void AddGeometryObject( HYDROData_Object theRegion ) [void (const Handle_HYDROData_Object&)]; + void AddObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)]; %MethodCode - Handle(HYDROData_Object) aGeomObj = - Handle(HYDROData_Object)::DownCast( createHandle( a0 ) ); - if ( !aGeomObj.IsNull() ) + Handle(HYDROData_Entity) anObj = + Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) ); + if ( !anObj.IsNull() ) { Py_BEGIN_ALLOW_THREADS - sipSelfWasArg ? sipCpp->HYDROData_Zone::AddGeometryObject( aGeomObj ) : - sipCpp->AddGeometryObject( aGeomObj ); + sipSelfWasArg ? sipCpp->HYDROData_Zone::AddObject( anObj ) : + sipCpp->AddObject( anObj ); Py_END_ALLOW_THREADS } %End /** - * Returns all geometry objects of zone. + * Returns all objects of zone. */ - HYDROData_SequenceOfObjects GetGeometryObjects() const; + HYDROData_SequenceOfObjects GetObjects() const; /** - * Removes all geometry objects from zone. + * Removes all objects from zone. */ - void RemoveGeometryObjects(); + void RemoveObjects(); /**