Salome HOME
a9e2e63d2f052836e07da300ad8fc9079185423a
[modules/hydro.git] / src / HYDROPy / HYDROData_Polyline3D.sip
1 // Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
10 //
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // Lesser General Public License for more details.
15 //
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 %ExportedHeaderCode
24 #include "HYDROData_Polyline3D.h"
25 %End
26
27 class HYDROData_Polyline3D : public HYDROData_Object
28 {
29 %TypeHeaderCode
30 #include "HYDROData_Polyline3D.h"
31 %End
32
33 public:
34   /**
35    * Returns default filling color for new 3D polyline.
36    */
37   static QColor DefaultFillingColor();
38
39   /**
40    * Returns default border color for new 3D polyline.
41    */
42   static QColor DefaultBorderColor();
43
44
45 public:      
46   // Public methods to work with 3D polyline
47   
48   /**
49    * Sets reference x,y polyline object for 3D polyline.
50    */
51   bool SetPolylineXY( HYDROData_PolylineXY thePolyline,
52                               const bool theIsUpdateProfile = true )
53   [bool ( const Handle_HYDROData_PolylineXY&,
54           const bool = true )];
55   %MethodCode
56     Handle(HYDROData_PolylineXY) aRef =
57       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
58     if ( !aRef.IsNull() )
59     {
60       Py_BEGIN_ALLOW_THREADS
61       sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetPolylineXY( aRef, a1 ):
62                                sipCpp->SetPolylineXY( aRef, a1 );
63       Py_END_ALLOW_THREADS
64     }
65   %End
66
67   /**
68    * Returns reference x,y polyline object of 3D polyline.
69    */
70   HYDROData_PolylineXY GetPolylineXY() const
71   [Handle_HYDROData_PolylineXY ()];
72   %MethodCode
73     Handle(HYDROData_PolylineXY) aRef;
74     
75     Py_BEGIN_ALLOW_THREADS
76     aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetPolylineXY() : 
77                            sipCpp->GetPolylineXY();
78     Py_END_ALLOW_THREADS
79     
80     sipRes = (HYDROData_PolylineXY*)createPointer( aRef );
81   %End
82
83   /**
84    * Remove reference x,y polyline object from 3D polyline.
85    */
86   void RemovePolylineXY();
87
88
89   /**
90    * Sets reference u,z profile object for 3D polyline.
91    */
92   bool SetProfileUZ( HYDROData_ProfileUZ theProfile )
93   [bool ( const Handle_HYDROData_ProfileUZ& )];
94   %MethodCode
95     Handle(HYDROData_ProfileUZ) aRef =
96       Handle(HYDROData_ProfileUZ)::DownCast( createHandle( a0 ) );
97     if ( !aRef.IsNull() )
98     {
99       Py_BEGIN_ALLOW_THREADS
100       sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetProfileUZ( aRef ):
101                                sipCpp->SetProfileUZ( aRef );
102       Py_END_ALLOW_THREADS
103     }
104   %End
105
106   /**
107    * Returns reference u,z profile object of 3D polyline.
108    */
109   HYDROData_ProfileUZ GetProfileUZ() const
110   [Handle_HYDROData_ProfileUZ ()];
111   %MethodCode
112     Handle(HYDROData_ProfileUZ) aRef;
113     
114     Py_BEGIN_ALLOW_THREADS
115     aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetProfileUZ() : 
116                            sipCpp->GetProfileUZ();
117     Py_END_ALLOW_THREADS
118     
119     sipRes = (HYDROData_ProfileUZ*)createPointer( aRef );
120   %End
121
122   /**
123    * Remove reference u,z profile object from 3D polyline.
124    */
125   virtual void RemoveProfileUZ();
126
127
128   /**
129    * Set reference bathymetry object for geometry object.
130    * Reimplemented to remove reference u,z profile.
131    */
132   bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude )
133   [bool ( const Handle_HYDROData_IAltitudeObject& )];
134   %MethodCode
135     Handle(HYDROData_IAltitudeObject) aRef =
136       Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
137     if ( !aRef.IsNull() )
138     {
139       Py_BEGIN_ALLOW_THREADS
140       sipRes = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::SetAltitudeObject( aRef ):
141                                sipCpp->SetAltitudeObject( aRef );
142       Py_END_ALLOW_THREADS
143     }
144   %End
145
146   /**
147    * Clear the reference bathymetry object for geometry object.
148    * Reimplemented to remove child u,z profile.
149    */
150   void RemoveAltitudeObject();
151
152
153   /**
154    * Returns the child u,z profile which has been generated from bathymetry.
155    */
156   HYDROData_ProfileUZ GetChildProfileUZ( const bool theIsCreate = true ) const
157   [Handle_HYDROData_ProfileUZ ( const bool = true )];
158   %MethodCode
159     Handle(HYDROData_ProfileUZ) aRef;
160     
161     Py_BEGIN_ALLOW_THREADS
162     aRef = sipSelfWasArg ? sipCpp->HYDROData_Polyline3D::GetChildProfileUZ( a0 ) : 
163                            sipCpp->GetChildProfileUZ( a0 );
164     Py_END_ALLOW_THREADS
165     
166     sipRes = (HYDROData_ProfileUZ*)createPointer( aRef );
167   %End
168
169
170 protected:
171
172   /**
173    * Creates new object in the internal data structure. Use higher level objects 
174    * to create objects with real content.
175    */
176   HYDROData_Polyline3D();
177
178   /**
179    * Destructs properties of the object and object itself, removes it from the document.
180    */
181   virtual ~HYDROData_Polyline3D();
182 };