]> SALOME platform Git repositories - modules/shaper.git/blob - src/ModelHighAPI/ModelHighAPI.i
Salome HOME
Merge remote-tracking branch 'remotes/origin/EDF_2020_Lot2'
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI.i
1 // Copyright (C) 2014-2020  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, or (at your option) any later version.
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 /* ModelHighAPI.i */
21 %module(directors="1") ModelHighAPI
22 %feature("director:except") {
23     if ($error != NULL) {
24       PyErr_Print();
25       std::cerr << std::endl;
26       throw Swig::DirectorMethodException();
27     }
28 }
29
30 %{
31   #include "ModelHighAPI_swig.h"
32
33   // fix for SWIG v2.0.4
34   #define SWIGPY_SLICE_ARG(obj) ((PyObject*)(obj))
35
36   #define SWIGPY_UNICODE_ARG(obj) ((PyObject*) (obj))
37 %}
38
39 %include "doxyhelp.i"
40
41 // import other modules
42 %import "GeomAPI.i"
43 %import "ModelAPI.i"
44 %import "GeomDataAPI.i"
45
46 // to avoid error on this
47 #define MODELHIGHAPI_EXPORT
48
49 // standard definitions
50 %include "std_pair.i"
51
52 // directors
53 %feature("director") ModelHighAPI_Dumper;
54
55 // renamed methods
56 %rename(__print__) ModelHighAPI_Dumper::operator<<;
57
58 // shared pointers
59 %shared_ptr(ModelHighAPI_Interface)
60 %shared_ptr(ModelHighAPI_Folder)
61
62 // typemaps
63
64 %typemap(in) const ModelHighAPI_Double & (ModelHighAPI_Double temp) {
65   if (PyFloat_Check($input) || PyLong_Check($input)) {
66     temp = ModelHighAPI_Double(PyFloat_AsDouble($input));
67     $1 = &temp;
68   } else if (PyUnicode_Check($input)) {
69     temp = ModelHighAPI_Double(PyUnicode_AsUTF8($input));
70     $1 = &temp;
71   } else if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
72   } else {
73     PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Double, float, int or string.");
74     return NULL;
75   }
76 }
77 %typecheck(SWIG_TYPECHECK_POINTER) ModelHighAPI_Double, const ModelHighAPI_Double & {
78   $1 = ((PyFloat_Check($input) || PyLong_Check($input) || PyUnicode_Check($input)) && !PyBool_Check($input)) ? 1 : 0;
79 }
80
81 %typemap(in) const ModelHighAPI_Integer & (ModelHighAPI_Integer temp) {
82   if (PyLong_Check($input)) {
83     temp = ModelHighAPI_Integer(static_cast<int>(PyLong_AsLong($input)));
84     $1 = &temp;
85   } else if (PyUnicode_Check($input)) {
86     temp = ModelHighAPI_Integer(PyUnicode_AsUTF8($input));
87     $1 = &temp;
88   } else if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
89   } else {
90     PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Integer, int or string.");
91     return NULL;
92   }
93 }
94 %typecheck(SWIG_TYPECHECK_POINTER) ModelHighAPI_Integer, const ModelHighAPI_Integer & {
95   $1 = ((PyLong_Check($input) || PyUnicode_Check($input)) && !PyBool_Check($input)) ? 1 : 0;
96 }
97
98 %typemap(in) const ModelHighAPI_RefAttr & (ModelHighAPI_RefAttr temp) {
99   std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
100   std::shared_ptr<ModelAPI_Object> * temp_object;
101   std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
102   ModelHighAPI_Selection* temp_selection;
103   int newmem = 0;
104   if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
105     if (!temp_selection) {
106       PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
107       return NULL;
108     }
109     temp = ModelHighAPI_RefAttr(std::shared_ptr<ModelAPI_Object>(temp_selection->resultSubShapePair().first));
110     if (newmem & SWIG_CAST_NEW_MEMORY) {
111       delete temp_selection;
112     }
113     $1 = &temp;
114   } else
115   if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
116     if (!temp_attribute) {
117       PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
118       return NULL;
119     }
120     temp = ModelHighAPI_RefAttr(*temp_attribute);
121     if (newmem & SWIG_CAST_NEW_MEMORY) {
122       delete temp_attribute;
123     }
124     $1 = &temp;
125   } else
126   if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
127     if (!temp_object) {
128       PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
129       return NULL;
130     }
131     temp = ModelHighAPI_RefAttr(*temp_object);
132     if (newmem & SWIG_CAST_NEW_MEMORY) {
133       delete temp_object;
134     }
135     $1 = &temp;
136   } else
137   if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
138     if (!temp_interface) {
139       PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
140       return NULL;
141     }
142     temp = ModelHighAPI_RefAttr(*temp_interface);
143     if (newmem & SWIG_CAST_NEW_MEMORY) {
144       delete temp_interface;
145     }
146     $1 = &temp;
147   } else
148   if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
149   } else {
150     PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_RefAttr, ModelHighAPI_Selection, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
151     return NULL;
152   }
153 }
154
155 %typecheck(SWIG_TYPECHECK_POINTER) ModelHighAPI_RefAttr, const ModelHighAPI_RefAttr & {
156   std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
157   std::shared_ptr<ModelAPI_Object> * temp_object;
158   std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
159   ModelHighAPI_Selection* temp_selection;
160   int newmem = 0;
161   if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
162     if (temp_attribute) {
163       $1 = 1;
164     } else {
165       $1 = 0;
166     }
167   } else if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
168     if (temp_object) {
169       $1 = 1;
170     } else {
171       $1 = 0;
172     }
173   } else if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
174     if (temp_interface) {
175       $1 = 1;
176     } else {
177       $1 = 0;
178     }
179   } else if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_selection, $descriptor(ModelHighAPI_Selection*), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
180     if (temp_selection) {
181       $1 = 1;
182     } else {
183       $1 = 0;
184     }
185   } else {
186     $1 = 0;
187   }
188 }
189
190 %typemap(in) const ModelHighAPI_Reference & (ModelHighAPI_Reference temp) {
191   std::shared_ptr<ModelAPI_Object> * temp_object;
192   std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
193   int newmem = 0;
194   if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
195     if (!temp_object) {
196       PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface or ModelAPI_Object.");
197       return NULL;
198     }
199     temp = ModelHighAPI_Reference(*temp_object);
200     if (newmem & SWIG_CAST_NEW_MEMORY) {
201       delete temp_object;
202     }
203     $1 = &temp;
204   } else
205   if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
206     if (!temp_interface) {
207       PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface or ModelAPI_Object.");
208       return NULL;
209     }
210     temp = ModelHighAPI_Reference(*temp_interface);
211     if (newmem & SWIG_CAST_NEW_MEMORY) {
212       delete temp_interface;
213     }
214     $1 = &temp;
215   } else
216   if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
217   } else {
218     PyErr_SetString(PyExc_TypeError, "argument must be ModelHighAPI_Interface or ModelAPI_Object.");
219     return NULL;
220   }
221 }
222
223 %typecheck(SWIG_TYPECHECK_POINTER) ModelHighAPI_Reference, const ModelHighAPI_Reference & {
224   std::shared_ptr<ModelAPI_Object> * temp_object;
225   std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
226   int newmem = 0;
227   if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
228     if (temp_object) {
229       $1 = 1;
230     } else {
231       $1 = 0;
232     }
233   } else
234   if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
235     if (temp_interface) {
236       $1 = 1;
237     } else {
238       $1 = 0;
239     }
240   } else {
241     $1 = 0;
242   }
243 }
244
245 %typemap(out) const ModelHighAPI_Selection & {
246   $1_basetype * ptr = new $1_basetype(*$1);
247   $result = SWIG_NewPointerObj( (void*) ptr, $1_descriptor, 1 );
248 }
249
250 %typemap(out) const ModelHighAPI_Reference & {
251   $1_basetype * ptr = new $1_basetype(*$1);
252   $result = SWIG_NewPointerObj( (void*) ptr, $1_descriptor, 1 );
253 }
254
255 %typemap(out) const ModelHighAPI_RefAttr & {
256   $1_basetype * ptr = new $1_basetype(*$1);
257   $result = SWIG_NewPointerObj( (void*) ptr, $1_descriptor, 1 );
258 }
259
260 // std::list -> []
261 %template(SelectionList) std::list<ModelHighAPI_Selection>;
262 %template(SelectionListList) std::list<std::list<ModelHighAPI_Selection> >;
263 %template(RefAttrList) std::list<ModelHighAPI_RefAttr>;
264 %template(RefList) std::list<ModelHighAPI_Reference>;
265
266 // std::pair -> []
267 %template(ResultSubShapePair) std::pair<std::shared_ptr<ModelAPI_Result>, std::shared_ptr<GeomAPI_Shape> >;
268 %template(StringsPair) std::pair<std::string, std::string>;
269 %template(StringWStringPair) std::pair<std::string, std::wstring>;
270
271
272 // fix compilarion error: 'res*' was not declared in this scope
273 %typemap(freearg) const std::list<ModelHighAPI_RefAttr> & {}
274 %typemap(freearg) const std::list<std::shared_ptr<ModelAPI_Object> > & {}
275
276 %typemap(in) const std::list<ModelHighAPI_RefAttr> & (std::list<ModelHighAPI_RefAttr> temp) {
277   std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
278   int newmem = 0;
279   if (PySequence_Check($input)) {
280     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
281       PyObject * item = PySequence_GetItem($input, i);
282       if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
283         if (!temp_attribute) {
284           PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_RefAttr, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
285           return NULL;
286         }
287         temp.push_back(ModelHighAPI_RefAttr(*temp_attribute));
288         if (newmem & SWIG_CAST_NEW_MEMORY) {
289           delete temp_attribute;
290         }
291       }
292       Py_DECREF(item);
293     }
294     $1 = &temp;
295   } else {
296     PyErr_SetString(PyExc_ValueError, "argument must be list of ModelHighAPI_RefAttr, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
297     return NULL;
298   }
299 }
300
301 %typemap(in) const std::list<std::shared_ptr<ModelAPI_Object> > & (std::list<std::shared_ptr<ModelAPI_Object> > temp) {
302   std::shared_ptr<ModelAPI_Object> * temp_object;
303   std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
304   int newmem = 0;
305   if (PySequence_Check($input)) {
306     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
307       PyObject * item = PySequence_GetItem($input, i);
308       if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
309         if (!temp_object) {
310           PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_Interface or ModelAPI_Object.");
311           return NULL;
312         }
313         temp.push_back(*temp_object);
314         if (newmem & SWIG_CAST_NEW_MEMORY) {
315           delete temp_object;
316         }
317       } else
318       if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
319         if (!temp_interface) {
320           PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_Interface or ModelAPI_Object.");
321           return NULL;
322         }
323         temp.push_back((*temp_interface)->defaultResult());
324         if (newmem & SWIG_CAST_NEW_MEMORY) {
325           delete temp_interface;
326         }
327       }
328       Py_DECREF(item);
329     }
330     $1 = &temp;
331   } else {
332     PyErr_SetString(PyExc_ValueError, "argument must be list of ModelHighAPI_Interface or ModelAPI_Object.");
333     return NULL;
334   }
335 }
336
337 %typecheck(SWIG_TYPECHECK_POINTER) std::list<std::shared_ptr<ModelAPI_Object> >, const std::list<std::shared_ptr<ModelAPI_Object> >& {
338   std::shared_ptr<ModelAPI_Object> * temp_object;
339   std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
340   int newmem = 0;
341   if (PySequence_Check($input)) {
342     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
343       PyObject * item = PySequence_GetItem($input, i);
344       if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
345         if (temp_object) {
346           $1 = 1;
347         } else {
348           $1 = 0;
349           break;
350         }
351       } else
352       if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
353         if (temp_interface) {
354           $1 = 1;
355         } else {
356           $1 = 0;
357           break;
358         }
359       }
360       Py_DECREF(item);
361     }
362   } else {
363     $1 = 0;
364   }
365 }
366
367
368 %typemap(in) const std::list<int> & (std::list<int> temp) {
369   if (PySequence_Check($input)) {
370     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
371       PyObject * item = PySequence_GetItem($input, i);
372       if (PyLong_Check(item)) {
373         temp.push_back((int)PyLong_AsLong(item));
374       } else {
375         PyErr_SetString(PyExc_TypeError, "argument must integet value.");
376         return NULL;
377       }
378       Py_DECREF(item);
379     }
380     $1 = &temp;
381   } else {
382     PyErr_SetString(PyExc_ValueError, "argument must be a tuple of integer values.");
383     return NULL;
384   }
385 }
386
387 %typecheck(SWIG_TYPECHECK_POINTER) std::list<int>, const std::list<int>& {
388   if (PySequence_Check($input)) {
389     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
390       PyObject * item = PySequence_GetItem($input, i);
391       if (PyLong_Check(item)) {
392         $1 = 1;
393       } else {
394         $1 = 0;
395         break;
396       }
397       Py_DECREF(item);
398     }
399   } else {
400     $1 = 0;
401   }
402 }
403
404
405 %typemap(in) const std::list<double> & (std::list<double> temp) {
406   if (PyTuple_Check($input)) {
407     for (Py_ssize_t i = 0; i < PyTuple_Size($input); ++i) {
408       PyObject * item = PySequence_GetItem($input, i);
409       if (PyNumber_Check(item)) {
410         temp.push_back((double)PyFloat_AsDouble(item));
411       } else {
412         PyErr_SetString(PyExc_TypeError, "argument must double value.");
413         return NULL;
414       }
415       Py_DECREF(item);
416     }
417     $1 = &temp;
418   } else {
419     PyErr_SetString(PyExc_ValueError, "argument must be a tuple of double values.");
420     return NULL;
421   }
422 }
423
424 %typecheck(SWIG_TYPECHECK_POINTER) std::list<double>, const std::list<double>& {
425   if (PyTuple_Check($input)) {
426     for (Py_ssize_t i = 0; i < PyTuple_Size($input); ++i) {
427       PyObject * item = PySequence_GetItem($input, i);
428       if (PyNumber_Check(item)) {
429         $1 = 1;
430       } else {
431         $1 = 0;
432         break;
433       }
434       Py_DECREF(item);
435     }
436   } else {
437     $1 = 0;
438   }
439 }
440
441
442 %typemap(in) const std::list<ModelHighAPI_Double> & (std::list<ModelHighAPI_Double> temp) {
443   ModelHighAPI_Double * temp_double;
444   if (PySequence_Check($input)) {
445     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
446       PyObject * item = PySequence_GetItem($input, i);
447       if (PyFloat_Check(item) || PyLong_Check(item)) {
448         temp.push_back(ModelHighAPI_Double(PyFloat_AsDouble(item)));
449       } else if (PyUnicode_Check(item)) {
450         temp.push_back(ModelHighAPI_Double(PyUnicode_AsUTF8(item)));
451       } else if ((SWIG_ConvertPtr(item, (void **)&temp_double, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
452         temp.push_back(*temp_double);
453       } else {
454         PyErr_SetString(PyExc_ValueError, "argument must be a list of ModelHighAPI_Double, float, int or string.");
455         return NULL;
456       }
457       Py_DECREF(item);
458     }
459     $1 = &temp;
460   } else {
461     PyErr_SetString(PyExc_ValueError, "argument must be a list of ModelHighAPI_Double, float, int or string.");
462     return NULL;
463   }
464 }
465
466 %typecheck(SWIG_TYPECHECK_POINTER) std::list<ModelHighAPI_Double>, const std::list<ModelHighAPI_Double> & {
467   if (PySequence_Check($input)) {
468     $1 = 1;
469     for (Py_ssize_t i = 0; i < PySequence_Size($input) && $1; ++i) {
470       PyObject * item = PySequence_GetItem($input, i);
471       $1 = ((PyFloat_Check(item) || PyLong_Check(item) || PyUnicode_Check(item)) && !PyBool_Check(item)) ? 1 : 0;
472       Py_DECREF(item);
473     }
474   } else {
475     $1 = 0;
476   }
477 }
478
479
480 %typemap(in) const std::list<ModelHighAPI_Integer> & (std::list<ModelHighAPI_Integer> temp) {
481   ModelHighAPI_Integer * temp_int;
482   if (PySequence_Check($input)) {
483     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
484       PyObject * item = PySequence_GetItem($input, i);
485       if (PyLong_Check(item)) {
486         temp.push_back(ModelHighAPI_Integer(PyLong_AsLong(item)));
487       } else if (PyUnicode_Check(item)) {
488         temp.push_back(ModelHighAPI_Integer(PyUnicode_AsUTF8(item)));
489       } else if ((SWIG_ConvertPtr(item, (void **)&temp_int, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
490         temp.push_back(*temp_int);
491       } else {
492         PyErr_SetString(PyExc_ValueError, "argument must be a list of ModelHighAPI_Integer, int or string.");
493         return NULL;
494       }
495       Py_DECREF(item);
496     }
497     $1 = &temp;
498   } else {
499     PyErr_SetString(PyExc_ValueError, "argument must be a list of ModelHighAPI_Integer, int or string.");
500     return NULL;
501   }
502 }
503
504 %typecheck(SWIG_TYPECHECK_POINTER) std::list<ModelHighAPI_Integer>, const std::list<ModelHighAPI_Integer> & {
505   if (PySequence_Check($input)) {
506     $1 = 1;
507     for (Py_ssize_t i = 0; i < PySequence_Size($input) && $1; ++i) {
508       PyObject * item = PySequence_GetItem($input, i);
509       $1 = ((PyLong_Check(item) || PyUnicode_Check(item)) && !PyBool_Check(item)) ? 1 : 0;
510       Py_DECREF(item);
511     }
512   } else {
513     $1 = 0;
514   }
515 }
516
517
518 // all supported interfaces
519 %include "ModelHighAPI_Double.h"
520 %include "ModelHighAPI_Dumper.h"
521 %include "ModelHighAPI_Integer.h"
522 %include "ModelHighAPI_Interface.h"
523 %include "ModelHighAPI_Folder.h"
524 %include "ModelHighAPI_RefAttr.h"
525 %include "ModelHighAPI_Reference.h"
526 %include "ModelHighAPI_Selection.h"
527 %include "ModelHighAPI_Services.h"
528 %include "ModelHighAPI_Macro.h"
529 %include "ModelHighAPI_Tools.h"