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_Stream.h"
23 class HYDROData_Stream : public HYDROData_NaturalObject
26 #include "HYDROData_Stream.h"
31 * Update the shape presentations of stream.
36 * Returns default filling color for new stream.
38 virtual QColor DefaultFillingColor() const;
41 * Returns default border color for new stream.
43 virtual QColor DefaultBorderColor() const;
46 * Returns true if given polyline can be used as stream axis.
48 static bool IsValidAsAxis( HYDROData_PolylineXY theAxis )
49 [bool ( const Handle_HYDROData_PolylineXY& )];
51 Handle(HYDROData_PolylineXY) aRef =
52 Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
55 Py_BEGIN_ALLOW_THREADS
56 sipRes = HYDROData_Stream::IsValidAsAxis( aRef );
62 // Public methods to work with Stream data fields
65 * Sets reference hydraulic axis object for stream.
67 bool SetHydraulicAxis( HYDROData_PolylineXY theAxis )
68 [bool ( const Handle_HYDROData_PolylineXY& )];
70 Handle(HYDROData_PolylineXY) aRef =
71 Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
74 Py_BEGIN_ALLOW_THREADS
75 sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::SetHydraulicAxis( aRef ):
76 sipCpp->SetHydraulicAxis( aRef );
82 * Returns reference hydraulic axis object of stream.
84 HYDROData_PolylineXY GetHydraulicAxis() const
85 [Handle_HYDROData_PolylineXY ()];
87 Handle(HYDROData_PolylineXY) aRef;
89 Py_BEGIN_ALLOW_THREADS
90 aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetHydraulicAxis() :
91 sipCpp->GetHydraulicAxis();
94 sipRes = (HYDROData_PolylineXY*)createPointer( aRef );
98 * Remove reference hydraulic axis object from stream.
100 void RemoveHydraulicAxis();
103 * Add new one reference profile object for stream.
105 bool AddProfile( HYDROData_Profile theProfile )
106 [bool ( const Handle_HYDROData_Profile& )];
108 Handle(HYDROData_Profile) aRef =
109 Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
110 if ( !aRef.IsNull() )
112 Py_BEGIN_ALLOW_THREADS
113 sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::AddProfile( aRef ):
114 sipCpp->AddProfile( aRef );
120 * Returns all reference profile objects of stream.
122 HYDROData_SequenceOfObjects GetProfiles() const;
125 * Removes reference profile object from stream.
127 bool RemoveProfile( HYDROData_Profile theProfile )
128 [bool ( const Handle_HYDROData_Profile& )];
130 Handle(HYDROData_Profile) aRef =
131 Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
132 if ( !aRef.IsNull() )
134 Py_BEGIN_ALLOW_THREADS
135 sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::RemoveProfile( aRef ):
136 sipCpp->RemoveProfile( aRef );
142 * Removes all reference profile objects from stream.
144 void RemoveProfiles();
147 * Generates bottom polyline for stream or update the existing bottom polyline.
149 bool GenerateBottomPolyline();
152 * Returns reference bottom polyline object of stream.
154 HYDROData_Polyline3D GetBottomPolyline() const
155 [Handle_HYDROData_Polyline3D ()];
157 Handle(HYDROData_Polyline3D) aRef;
159 Py_BEGIN_ALLOW_THREADS
160 aRef = sipSelfWasArg ? sipCpp->HYDROData_Stream::GetBottomPolyline() :
161 sipCpp->GetBottomPolyline();
164 sipRes = (HYDROData_Polyline3D*)createPointer( aRef );
168 * Sets reference bottom polyline object for stream.
170 bool SetBottomPolyline( HYDROData_Polyline3D theBottom )
171 [bool ( const Handle_HYDROData_Polyline3D& )];
173 Handle(HYDROData_Polyline3D) aRef =
174 Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
175 if ( !aRef.IsNull() )
177 Py_BEGIN_ALLOW_THREADS
178 sipRes = sipSelfWasArg ? sipCpp->HYDROData_Stream::SetBottomPolyline( aRef ):
179 sipCpp->SetBottomPolyline( aRef );
185 * Add interpolated profiles into the stream.
186 * \param theInterpolator the interpolator
187 * \return true in case of success
189 virtual bool Interpolate( HYDROData_IProfilesInterpolator* theInterpolator );
193 * Creates new object in the internal data structure. Use higher level objects
194 * to create objects with real content.
199 * Destructs properties of the object and object itself, removes it from the document.
201 virtual ~HYDROData_Stream();