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