Salome HOME
Merge from V6_main_20120808 08Aug12
[modules/med.git] / src / MEDCouplingCorba_Swig / MEDCouplingCorba.i
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 %module MEDCouplingCorba
21
22 %{
23 #include "MEDCouplingFieldDoubleServant.hxx"  
24 #include "MEDCouplingFieldTemplateServant.hxx"
25 #include "MEDCouplingMultiFieldsServant.hxx"
26 #include "MEDCouplingFieldOverTimeServant.hxx"
27 #include "MEDCouplingUMeshServant.hxx"
28 #include "MEDCouplingExtrudedMeshServant.hxx"
29 #include "MEDCouplingCMeshServant.hxx"
30 #include "DataArrayDoubleServant.hxx"
31 #include "DataArrayIntServant.hxx"
32 #include "MEDCouplingCorbaTypemaps.i"
33
34 using namespace ParaMEDMEM;
35 %}
36
37 %include "MEDCouplingCommon.i"
38
39 namespace ParaMEDMEM
40 {
41   class MEDCouplingFieldDoubleServant
42   {
43   public:
44     %extend
45        {
46          static PyObject *_this(const MEDCouplingFieldDouble *cppPointerOfMesh)
47          {
48            return buildServantAndActivate<MEDCouplingFieldDoubleServant>(cppPointerOfMesh);
49          }
50        }
51   };
52
53   class MEDCouplingFieldTemplateServant
54   {
55   public:
56     %extend
57        {
58          static PyObject *_this(const MEDCouplingFieldTemplate *cppPointerOfMesh)
59          {
60            return buildServantAndActivate<MEDCouplingFieldTemplateServant>(cppPointerOfMesh);
61          }
62        }
63   };
64
65   class MEDCouplingMultiFieldsServant
66   {
67   public:
68     %extend
69        {
70          static PyObject *_this(const MEDCouplingMultiFields *cppPointerOfMesh)
71          {
72            return buildServantAndActivate<MEDCouplingMultiFieldsServant>(cppPointerOfMesh);
73          }
74        }
75   };
76
77   class MEDCouplingFieldOverTimeServant
78   {
79   public:
80     %extend
81        {
82          static PyObject *_this(const MEDCouplingFieldOverTime *cppPointerOfMesh)
83          {
84            return buildServantAndActivate<MEDCouplingFieldOverTimeServant>(cppPointerOfMesh);
85          }
86        }
87   };
88
89   class MEDCouplingUMeshServant
90   {
91   public:
92     %extend
93        {
94          static PyObject *_this(const MEDCouplingUMesh *cppPointerOfMesh)
95          {
96            return buildServantAndActivate<MEDCouplingUMeshServant>(cppPointerOfMesh);
97          }
98        }
99   };
100
101   class MEDCouplingExtrudedMeshServant
102   {
103   public:
104     %extend
105        {
106          static PyObject *_this(const MEDCouplingExtrudedMesh *cppPointerOfMesh)
107          {
108            return buildServantAndActivate<MEDCouplingExtrudedMeshServant>(cppPointerOfMesh);
109          }
110        }
111   };
112
113   class MEDCouplingCMeshServant
114   {
115   public:
116     %extend
117        {
118          static PyObject *_this(const MEDCouplingCMesh *cppPointerOfMesh)
119          {
120            return buildServantAndActivate<MEDCouplingCMeshServant>(cppPointerOfMesh);
121          }
122        }
123   };
124
125   class DataArrayDoubleServant
126   {
127   public:
128     %extend
129        {
130          static PyObject *_this(const DataArrayDouble *cppPointerOfMesh)
131          {
132            return buildServantAndActivate<DataArrayDoubleServant>(cppPointerOfMesh);
133          }
134        }
135   };
136
137   class DataArrayIntServant
138   {
139   public:
140     %extend
141        {
142          static PyObject *_this(const DataArrayInt *cppPointerOfMesh)
143          {
144            return buildServantAndActivate<DataArrayIntServant>(cppPointerOfMesh);
145          }
146        }
147   };
148 }
149
150 %pythoncode %{
151 def ParaMEDMEMDataArrayDoubleIadd(self,*args):
152     import _MEDCouplingCorba
153     return _MEDCouplingCorba.DataArrayDouble____iadd___(self, self, *args)
154 def ParaMEDMEMDataArrayDoubleIsub(self,*args):
155     import _MEDCouplingCorba
156     return _MEDCouplingCorba.DataArrayDouble____isub___(self, self, *args)
157 def ParaMEDMEMDataArrayDoubleImul(self,*args):
158     import _MEDCouplingCorba
159     return _MEDCouplingCorba.DataArrayDouble____imul___(self, self, *args)
160 def ParaMEDMEMDataArrayDoubleIdiv(self,*args):
161     import _MEDCouplingCorba
162     return _MEDCouplingCorba.DataArrayDouble____idiv___(self, self, *args)
163 def ParaMEDMEMMEDCouplingFieldDoubleIadd(self,*args):
164     import _MEDCouplingCorba
165     return _MEDCouplingCorba.MEDCouplingFieldDouble____iadd___(self, self, *args)
166 def ParaMEDMEMMEDCouplingFieldDoubleIsub(self,*args):
167     import _MEDCouplingCorba
168     return _MEDCouplingCorba.MEDCouplingFieldDouble____isub___(self, self, *args)
169 def ParaMEDMEMMEDCouplingFieldDoubleImul(self,*args):
170     import _MEDCouplingCorba
171     return _MEDCouplingCorba.MEDCouplingFieldDouble____imul___(self, self, *args)
172 def ParaMEDMEMMEDCouplingFieldDoubleIdiv(self,*args):
173     import _MEDCouplingCorba
174     return _MEDCouplingCorba.MEDCouplingFieldDouble____idiv___(self, self, *args)
175 def ParaMEDMEMDataArrayIntIadd(self,*args):
176     import _MEDCouplingCorba
177     return _MEDCouplingCorba.DataArrayInt____iadd___(self, self, *args)
178 def ParaMEDMEMDataArrayIntIsub(self,*args):
179     import _MEDCouplingCorba
180     return _MEDCouplingCorba.DataArrayInt____isub___(self, self, *args)
181 def ParaMEDMEMDataArrayIntImul(self,*args):
182     import _MEDCouplingCorba
183     return _MEDCouplingCorba.DataArrayInt____imul___(self, self, *args)
184 def ParaMEDMEMDataArrayIntIdiv(self,*args):
185     import _MEDCouplingCorba
186     return _MEDCouplingCorba.DataArrayInt____idiv___(self, self, *args)
187 def ParaMEDMEMDataArrayIntImod(self,*args):
188     import _MEDCouplingCorba
189     return _MEDCouplingCorba.DataArrayInt____imod___(self, self, *args)
190 %}
191
192 %include "MEDCouplingFinalize.i"