Salome HOME
Minor change - public keyword added.
[modules/hydro.git] / src / HYDROPy / HYDROData_Channel.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_Channel.h"
25 %End
26
27 class HYDROData_Channel : public HYDROData_ArtificialObject
28 {
29 %TypeHeaderCode
30 #include "HYDROData_Channel.h"
31 %End
32
33 %ConvertToSubClassCode
34     // HYDROData_Channel sub-classes provide a unique kind ID.
35     switch ( sipCpp->GetKind() )
36     {
37       case KIND_DIGUE:
38         sipClass = sipClass_HYDROData_Digue;
39         break;
40
41       case KIND_UNKNOWN:
42         sipClass = sipClass_HYDROData_ArtificialObject;
43         break;
44
45       default:
46         // We don't recognise the type.
47         sipClass = NULL;
48     }
49 %End
50
51 public:
52   /**
53    * Returns default filling color for new channel.
54    */
55   static QColor DefaultFillingColor();
56
57   /**
58    * Returns default border color for new channel.
59    */
60   static QColor DefaultBorderColor();
61
62
63 public:      
64   // Public methods to work with Channel
65   
66   /**
67    * Sets reference guide line object for channel.
68    */
69   bool SetGuideLine( HYDROData_Polyline3D theGuideLine )
70   [bool ( const Handle_HYDROData_Polyline3D& )];
71   %MethodCode
72     Handle(HYDROData_Polyline3D) aRef =
73       Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
74     if ( !aRef.IsNull() )
75     {
76       Py_BEGIN_ALLOW_THREADS
77       sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetGuideLine( aRef ):
78                                sipCpp->SetGuideLine( aRef );
79       Py_END_ALLOW_THREADS
80     }
81   %End
82
83   /**
84    * Returns reference guide line object of channel.
85    */
86   HYDROData_Polyline3D GetGuideLine() const
87   [Handle_HYDROData_Polyline3D ()];
88   %MethodCode
89     Handle(HYDROData_Polyline3D) aRef;
90     
91     Py_BEGIN_ALLOW_THREADS
92     aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetGuideLine() : 
93                            sipCpp->GetGuideLine();
94     Py_END_ALLOW_THREADS
95     
96     sipRes = (HYDROData_Polyline3D*)createPointer( aRef );
97   %End
98
99   /**
100    * Remove reference guide line object from channel.
101    */
102   void RemoveGuideLine();
103
104
105   /**
106    * Sets reference profile object for channel.
107    */
108   bool SetProfile( HYDROData_Profile theProfile )
109   [bool ( const Handle_HYDROData_Profile& )];
110   %MethodCode
111     Handle(HYDROData_Profile) aRef =
112       Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
113     if ( !aRef.IsNull() )
114     {
115       Py_BEGIN_ALLOW_THREADS
116       sipRes = sipSelfWasArg ? sipCpp->HYDROData_Channel::SetProfile( aRef ):
117                                sipCpp->SetProfile( aRef );
118       Py_END_ALLOW_THREADS
119     }
120   %End
121
122   /**
123    * Returns reference profile object of channel.
124    */
125   HYDROData_Profile GetProfile() const
126   [Handle_HYDROData_Profile ()];
127   %MethodCode
128     Handle(HYDROData_Profile) aRef;
129     
130     Py_BEGIN_ALLOW_THREADS
131     aRef = sipSelfWasArg ? sipCpp->HYDROData_Channel::GetProfile() : 
132                            sipCpp->GetProfile();
133     Py_END_ALLOW_THREADS
134     
135     sipRes = (HYDROData_Profile*)createPointer( aRef );
136   %End
137
138   /**
139    * Remove reference profile object from channel.
140    */
141   void RemoveProfile();
142
143
144 protected:
145
146   /**
147    * Creates new object in the internal data structure. Use higher level objects 
148    * to create objects with real content.
149    */
150   HYDROData_Channel();
151
152   /**
153    * Destructs properties of the object and object itself, removes it from the document.
154    */
155   virtual ~HYDROData_Channel();
156 };