Salome HOME
Sorting alphabetically.
[modules/hydro.git] / src / HYDROPy / HYDROData_Domain.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_Domain.h>
25 %End
26
27 class HYDROData_Domain : HYDROData_Object /Abstract/
28 {
29
30 %TypeHeaderCode
31 #include <HYDROData_Domain.h>
32 %End
33
34 %ConvertToSubClassCode
35     // HYDROData_Object sub-classes provide a unique kind ID.
36     switch ( sipCpp->GetKind() )
37     {
38       case KIND_REGION:
39         sipClass = sipClass_HYDROData_Region;
40         break;
41
42       case KIND_ZONE:
43         sipClass = sipClass_HYDROData_Zone;
44         break;
45
46       case KIND_UNKNOWN:
47         sipClass = sipClass_HYDROData_Object;
48         break;
49
50       default:
51         // We don't recognise the type.
52         sipClass = NULL;
53     }
54 %End
55
56 public:      
57
58   /**
59    * Sets filling color for zone.
60    */
61   void SetFillingColor( const QColor& theColor );
62
63   /**
64    * Returns filling color of zone.
65    */
66   QColor GetFillingColor() const;
67
68   /**
69    * Sets border color for zone.
70    */
71   void SetBorderColor( const QColor& theColor );
72
73   /**
74    * Returns border color of zone.
75    */
76   QColor GetBorderColor() const;
77
78   /**
79    * Returns number of bathymetry objects for zone.
80    */
81   int NbBathymetries() const;
82
83   /**
84    * Add reference bathymetry object for zone.
85    */
86   void AddBathymetry( HYDROData_Bathymetry theBathymetry ) [void (const Handle_HYDROData_Bathymetry&)];
87   %MethodCode
88
89     Handle(HYDROData_Bathymetry) aRefBath =
90       Handle(HYDROData_Bathymetry)::DownCast( createHandle( a0 ) );
91     if ( !aRefBath.IsNull() )
92     {
93       Py_BEGIN_ALLOW_THREADS
94       sipSelfWasArg ? sipCpp->HYDROData_Domain::AddBathymetry( aRefBath ) : 
95                       sipCpp->AddBathymetry( aRefBath );
96       Py_END_ALLOW_THREADS
97     }
98
99   %End
100
101   /**
102    * Change reference bathymetry object with given index for zone.
103    */
104   void SetBathymetry( const int            theIndex, 
105                       HYDROData_Bathymetry theBathymetry ) [void (const int, const Handle_HYDROData_Bathymetry&)];
106   %MethodCode
107
108     Handle(HYDROData_Bathymetry) aRefBath =
109       Handle(HYDROData_Bathymetry)::DownCast( createHandle( a1 ) );
110     if ( !aRefBath.IsNull() )
111     {
112       Py_BEGIN_ALLOW_THREADS
113       sipSelfWasArg ? sipCpp->HYDROData_Domain::SetBathymetry( a0, aRefBath ) : 
114                       sipCpp->SetBathymetry( a0, aRefBath );
115       Py_END_ALLOW_THREADS
116     }
117
118   %End
119
120   /**
121    * Returns reference bathymetry object of zone by it index.
122    */
123   HYDROData_Bathymetry GetBathymetry( const int theIndex ) const [Handle_HYDROData_Bathymetry (const int)];
124   %MethodCode
125
126     Handle(HYDROData_Bathymetry) aRefBath;
127     
128     Py_BEGIN_ALLOW_THREADS
129     aRefBath = sipSelfWasArg ? sipCpp->HYDROData_Domain::GetBathymetry( a0 ) : 
130                                sipCpp->GetBathymetry( a0 );
131     Py_END_ALLOW_THREADS
132     
133     sipRes = (HYDROData_Bathymetry*)createPointer( aRefBath );
134   
135   %End
136
137   /**
138    * Returns list of all reference bathymetry objects of zone.
139    */
140   //HYDROData_SequenceOfObjects GetBathymetries() const;
141
142   /**
143    * Clear list of bathymetry objects of zone.
144    */
145   void RemoveBathymetries();
146
147 protected:
148
149   /**
150    * Creates new object in the internal data structure. Use higher level objects 
151    * to create objects with real content.
152    */
153   HYDROData_Domain();
154
155   /**
156    * Destructs properties of the object and object itself, removes it from the document.
157    */
158   ~HYDROData_Domain();
159 };
160
161