X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FHYDROPy%2FHYDROData_Polyline3D.sip;h=58de3fd62db5cde058ab33b8600c9778554306e3;hb=4d4d74dd554819c30f1c8ded5520cc6c25aba56b;hp=a690c3bb9f64eec7c5548d8837bfd387e5d9b46c;hpb=1ec37f9d5e793698adfc0c1897d097ce14d287f1;p=modules%2Fhydro.git diff --git a/src/HYDROPy/HYDROData_Polyline3D.sip b/src/HYDROPy/HYDROData_Polyline3D.sip index a690c3bb..58de3fd6 100644 --- a/src/HYDROPy/HYDROData_Polyline3D.sip +++ b/src/HYDROPy/HYDROData_Polyline3D.sip @@ -1,12 +1,8 @@ -// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE -// -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS -// +// Copyright (C) 2014-2015 EDF-R&D // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public // License as published by the Free Software Foundation; either -// version 2.1 of the License. +// version 2.1 of the License, or (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of @@ -34,12 +30,12 @@ public: /** * Returns default filling color for new 3D polyline. */ - static QColor DefaultFillingColor(); + virtual QColor DefaultFillingColor() const; /** * Returns default border color for new 3D polyline. */ - static QColor DefaultBorderColor(); + virtual QColor DefaultBorderColor() const; public: @@ -48,29 +44,76 @@ public: /** * Sets reference x,y polyline object for 3D polyline. */ - virtual bool SetPolylineXY( const Handle(HYDROData_PolylineXY)& thePolyline, - const bool theIsUpdateProfile = true ); + bool SetPolylineXY( HYDROData_PolylineXY thePolyline, + const bool theIsUpdateProfile = true ) + [bool ( const Handle_HYDROData_PolylineXY&, + const bool = true )]; + %MethodCode + Handle(HYDROData_PolylineXY) aRef = + Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) ); + if ( !aRef.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetPolylineXY( aRef, a1 ): + sipCpp->SetPolylineXY( aRef, a1 ); + Py_END_ALLOW_THREADS + } + %End /** * Returns reference x,y polyline object of 3D polyline. */ - virtual Handle(HYDROData_PolylineXY) GetPolylineXY() const; + HYDROData_PolylineXY GetPolylineXY() const + [Handle_HYDROData_PolylineXY ()]; + %MethodCode + Handle(HYDROData_PolylineXY) aRef; + + Py_BEGIN_ALLOW_THREADS + aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetPolylineXY() : + sipCpp->GetPolylineXY(); + Py_END_ALLOW_THREADS + + sipRes = (HYDROData_PolylineXY*)createPointer( aRef ); + %End /** * Remove reference x,y polyline object from 3D polyline. */ - virtual void RemovePolylineXY(); + void RemovePolylineXY(); /** * Sets reference u,z profile object for 3D polyline. */ - virtual bool SetProfileUZ( const Handle(HYDROData_ProfileUZ)& theProfile ); + bool SetProfileUZ( HYDROData_ProfileUZ theProfile ) + [bool ( const Handle_HYDROData_ProfileUZ& )]; + %MethodCode + Handle(HYDROData_ProfileUZ) aRef = + Handle(HYDROData_ProfileUZ)::DownCast( createHandle( a0 ) ); + if ( !aRef.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetProfileUZ( aRef ): + sipCpp->SetProfileUZ( aRef ); + Py_END_ALLOW_THREADS + } + %End /** * Returns reference u,z profile object of 3D polyline. */ - virtual Handle(HYDROData_ProfileUZ) GetProfileUZ() const; + HYDROData_ProfileUZ GetProfileUZ() const + [Handle_HYDROData_ProfileUZ ()]; + %MethodCode + Handle(HYDROData_ProfileUZ) aRef; + + Py_BEGIN_ALLOW_THREADS + aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetProfileUZ() : + sipCpp->GetProfileUZ(); + Py_END_ALLOW_THREADS + + sipRes = (HYDROData_ProfileUZ*)createPointer( aRef ); + %End /** * Remove reference u,z profile object from 3D polyline. @@ -82,20 +125,59 @@ public: * Set reference bathymetry object for geometry object. * Reimplemented to remove reference u,z profile. */ - virtual bool SetAltitudeObject( const Handle(HYDROData_IAltitudeObject)& theAltitude ); + bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude ) + [bool ( const Handle_HYDROData_IAltitudeObject& )]; + %MethodCode + Handle(HYDROData_IAltitudeObject) aRef = + Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) ); + if ( !aRef.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetAltitudeObject( aRef ): + sipCpp->SetAltitudeObject( aRef ); + Py_END_ALLOW_THREADS + } + %End /** * Clear the reference bathymetry object for geometry object. * Reimplemented to remove child u,z profile. */ - virtual void RemoveAltitudeObject(); + void RemoveAltitudeObject(); /** * Returns the child u,z profile which has been generated from bathymetry. */ - Handle(HYDROData_ProfileUZ) GetChildProfileUZ( const bool theIsCreate = true ) const; + HYDROData_ProfileUZ GetChildProfileUZ( const bool theIsCreate = true ) const + [Handle_HYDROData_ProfileUZ ( const bool = true )]; + %MethodCode + Handle(HYDROData_ProfileUZ) aRef; + + Py_BEGIN_ALLOW_THREADS + aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetChildProfileUZ( a0 ) : + sipCpp->GetChildProfileUZ( a0 ); + Py_END_ALLOW_THREADS + + sipRes = (HYDROData_ProfileUZ*)createPointer( aRef ); + %End + + /** + * Sets the child u,z profile for polyline. + */ + void SetChildProfileUZ( HYDROData_ProfileUZ theProfile ) [void ( const Handle_HYDROData_ProfileUZ& )]; + %MethodCode + Handle(HYDROData_ProfileUZ) aRef = + Handle(HYDROData_ProfileUZ)::DownCast( createHandle( a0 ) ); + if ( !aRef.IsNull() ) + { + Py_BEGIN_ALLOW_THREADS + sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetChildProfileUZ( aRef ): + sipCpp->SetChildProfileUZ( aRef ); + Py_END_ALLOW_THREADS + } + %End protected: