// 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, 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 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU // Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // %ExportedHeaderCode #include "HYDROData_Channel.h" %End class HYDROData_Channel : public HYDROData_ArtificialObject { %TypeHeaderCode #include "HYDROData_Channel.h" %End %ConvertToSubClassCode // HYDROData_Channel sub-classes provide a unique kind ID. switch ( sipCpp->GetKind() ) { case KIND_DIGUE: sipClass = sipClass_HYDROData_Digue; break; case KIND_UNKNOWN: sipClass = sipClass_HYDROData_ArtificialObject; break; default: // We don't recognise the type. sipClass = NULL; } %End public: /** * Returns default filling color for new channel. */ virtual QColor DefaultFillingColor() const; /** * Returns default border color for new channel. */ virtual QColor DefaultBorderColor() const; public: // Public methods to work with Channel /** * Sets reference guide line object for channel. */ bool SetGuideLine( HYDROData_Polyline3D theGuideLine ) [bool ( const Handle_HYDROData_Polyline3D& )]; %MethodCode Handle(HYDROData_Polyline3D) aRef = Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) ); if ( !aRef.IsNull() ) { Py_BEGIN_ALLOW_THREADS sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetGuideLine( aRef ): sipCpp->SetGuideLine( aRef ); Py_END_ALLOW_THREADS } %End /** * Returns reference guide line object of channel. */ HYDROData_Polyline3D GetGuideLine() const [Handle_HYDROData_Polyline3D ()]; %MethodCode Handle(HYDROData_Polyline3D) aRef; Py_BEGIN_ALLOW_THREADS aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetGuideLine() : sipCpp->GetGuideLine(); Py_END_ALLOW_THREADS sipRes = (HYDROData_Polyline3D*)createPointer( aRef ); %End /** * Remove reference guide line object from channel. */ void RemoveGuideLine(); /** * Sets reference profile object for channel. */ bool SetProfile( HYDROData_Profile theProfile ) [bool ( const Handle_HYDROData_Profile& )]; %MethodCode Handle(HYDROData_Profile) aRef = Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) ); if ( !aRef.IsNull() ) { Py_BEGIN_ALLOW_THREADS sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetProfile( aRef ): sipCpp->SetProfile( aRef ); Py_END_ALLOW_THREADS } %End /** * Returns reference profile object of channel. */ HYDROData_Profile GetProfile() const [Handle_HYDROData_Profile ()]; %MethodCode Handle(HYDROData_Profile) aRef; Py_BEGIN_ALLOW_THREADS aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetProfile() : sipCpp->GetProfile(); Py_END_ALLOW_THREADS sipRes = (HYDROData_Profile*)createPointer( aRef ); %End /** * Remove reference profile object from channel. */ void RemoveProfile(); protected: /** * Creates new object in the internal data structure. Use higher level objects * to create objects with real content. */ HYDROData_Channel(); /** * Destructs properties of the object and object itself, removes it from the document. */ virtual ~HYDROData_Channel(); };