Salome HOME
Merge remote-tracking branch 'origin/BR_1321_ECW' into BR_DEMO
[modules/hydro.git] / src / HYDROPy / HYDROData_Polyline3D.sip
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.
6 //
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.
11 //
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
15 //
16 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
17 //
18
19 %ExportedHeaderCode
20 #include "HYDROData_Polyline3D.h"
21 %End
22
23 class HYDROData_Polyline3D : public HYDROData_Object
24 {
25 %TypeHeaderCode
26 #include "HYDROData_Polyline3D.h"
27 %End
28
29 public:
30   /**
31    * Returns default filling color for new 3D polyline.
32    */
33   virtual QColor DefaultFillingColor() const;
34
35   /**
36    * Returns default border color for new 3D polyline.
37    */
38   virtual QColor DefaultBorderColor() const;
39
40
41 public:      
42   // Public methods to work with 3D polyline
43   
44   /**
45    * Sets reference x,y polyline object for 3D polyline.
46    */
47   bool SetPolylineXY( HYDROData_PolylineXY thePolyline,
48                               const bool theIsUpdateProfile = true )
49   [bool ( const opencascade::handle<HYDROData_PolylineXY>&,
50           const bool = true )];
51   %MethodCode
52     Handle(HYDROData_PolylineXY) aRef =
53       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
54     if ( !aRef.IsNull() )
55     {
56       Py_BEGIN_ALLOW_THREADS
57       sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetPolylineXY( aRef, a1 ):
58                                sipCpp->SetPolylineXY( aRef, a1 );
59       Py_END_ALLOW_THREADS
60     }
61   %End
62
63   /**
64    * Returns reference x,y polyline object of 3D polyline.
65    */
66   HYDROData_PolylineXY GetPolylineXY() const
67   [opencascade::handle<HYDROData_PolylineXY> ()];
68   %MethodCode
69     Handle(HYDROData_PolylineXY) aRef;
70     
71     Py_BEGIN_ALLOW_THREADS
72     aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetPolylineXY() : 
73                            sipCpp->GetPolylineXY();
74     Py_END_ALLOW_THREADS
75     
76     sipRes = (HYDROData_PolylineXY*)createPointer( aRef );
77   %End
78
79   /**
80    * Remove reference x,y polyline object from 3D polyline.
81    */
82   void RemovePolylineXY();
83
84
85   /**
86    * Sets reference u,z profile object for 3D polyline.
87    */
88   bool SetProfileUZ( HYDROData_ProfileUZ theProfile )
89   [bool ( const opencascade::handle<HYDROData_ProfileUZ>& )];
90   %MethodCode
91     Handle(HYDROData_ProfileUZ) aRef =
92       Handle(HYDROData_ProfileUZ)::DownCast( createHandle( a0 ) );
93     if ( !aRef.IsNull() )
94     {
95       Py_BEGIN_ALLOW_THREADS
96       sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetProfileUZ( aRef ):
97                                sipCpp->SetProfileUZ( aRef );
98       Py_END_ALLOW_THREADS
99     }
100   %End
101
102   /**
103    * Returns reference u,z profile object of 3D polyline.
104    */
105   HYDROData_ProfileUZ GetProfileUZ() const
106   [Hopencascade::handle<HYDROData_ProfileUZ> ()];
107   %MethodCode
108     Handle(HYDROData_ProfileUZ) aRef;
109     
110     Py_BEGIN_ALLOW_THREADS
111     aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetProfileUZ() : 
112                            sipCpp->GetProfileUZ();
113     Py_END_ALLOW_THREADS
114     
115     sipRes = (HYDROData_ProfileUZ*)createPointer( aRef );
116   %End
117
118   /**
119    * Remove reference u,z profile object from 3D polyline.
120    */
121   virtual void RemoveProfileUZ();
122
123
124   /**
125    * Set reference bathymetry object for geometry object.
126    * Reimplemented to remove reference u,z profile.
127    */
128   bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude )
129   [bool ( const opencascade::handle<HYDROData_IAltitudeObject>& )];
130   %MethodCode
131     Handle(HYDROData_IAltitudeObject) aRef =
132       Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
133     if ( !aRef.IsNull() )
134     {
135       Py_BEGIN_ALLOW_THREADS
136       sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetAltitudeObject( aRef ):
137                                sipCpp->SetAltitudeObject( aRef );
138       Py_END_ALLOW_THREADS
139     }
140   %End
141
142   /**
143    * Clear the reference bathymetry object for geometry object.
144    * Reimplemented to remove child u,z profile.
145    */
146   void RemoveAltitudeObject();
147
148
149   /**
150    * Returns the child u,z profile which has been generated from bathymetry.
151    */
152   HYDROData_ProfileUZ GetChildProfileUZ( const bool theIsCreate = true ) const
153   [opencascade::handle<HYDROData_ProfileUZ> ( const bool = true )];
154   %MethodCode
155     Handle(HYDROData_ProfileUZ) aRef;
156     
157     Py_BEGIN_ALLOW_THREADS
158     aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetChildProfileUZ( a0 ) : 
159                            sipCpp->GetChildProfileUZ( a0 );
160     Py_END_ALLOW_THREADS
161     
162     sipRes = (HYDROData_ProfileUZ*)createPointer( aRef );
163   %End
164
165
166   /**
167    * Sets the child u,z profile for polyline.
168    */
169   void SetChildProfileUZ( HYDROData_ProfileUZ theProfile ) [void ( const opencascade::handle<HYDROData_ProfileUZ>& )];
170   %MethodCode
171     Handle(HYDROData_ProfileUZ) aRef =
172       Handle(HYDROData_ProfileUZ)::DownCast( createHandle( a0 ) );
173     if ( !aRef.IsNull() )
174     {
175       Py_BEGIN_ALLOW_THREADS
176       sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetChildProfileUZ( aRef ):
177                       sipCpp->SetChildProfileUZ( aRef );
178       Py_END_ALLOW_THREADS
179     }
180   %End
181
182 protected:
183
184   /**
185    * Creates new object in the internal data structure. Use higher level objects 
186    * to create objects with real content.
187    */
188   HYDROData_Polyline3D();
189
190   /**
191    * Destructs properties of the object and object itself, removes it from the document.
192    */
193   virtual ~HYDROData_Polyline3D();
194 };