Salome HOME
9fea6cc192553a0a87b5938d277f78d037cde963
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI.i
1 // Copyright (C) 2014-2019  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
37 %include "doxyhelp.i"
38
39 // import other modules
40 %import "GeomAPI.i"
41 %import "ModelAPI.i"
42 %import "GeomDataAPI.i"
43
44 // to avoid error on this
45 #define MODELHIGHAPI_EXPORT
46
47 // standard definitions
48 %include "typemaps.i"
49 %include "std_list.i"
50 %include "std_pair.i"
51 %include "std_string.i"
52 %include "std_shared_ptr.i"
53
54 // directors
55 %feature("director") ModelHighAPI_Dumper;
56
57 // renamed methods
58 %rename(__print__) ModelHighAPI_Dumper::operator<<;
59
60 // shared pointers
61 %shared_ptr(ModelHighAPI_Interface)
62 %shared_ptr(ModelHighAPI_Folder)
63
64 // typemaps
65
66 %typemap(in) const ModelHighAPI_Double & (ModelHighAPI_Double temp) {
67   if (PyFloat_Check($input) || PyLong_Check($input)) {
68     temp = ModelHighAPI_Double(PyFloat_AsDouble($input));
69     $1 = &temp;
70   } else if (PyUnicode_Check($input)) {
71     temp = ModelHighAPI_Double(PyUnicode_AsUTF8($input));
72     $1 = &temp;
73   } else if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
74   } else {
75     PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Double, float, int or string.");
76     return NULL;
77   }
78 }
79 %typecheck(SWIG_TYPECHECK_POINTER) ModelHighAPI_Double, const ModelHighAPI_Double & {
80   $1 = ((PyFloat_Check($input) || PyLong_Check($input) || PyUnicode_Check($input)) && !PyBool_Check($input)) ? 1 : 0;
81 }
82
83 %typemap(in) const ModelHighAPI_Integer & (ModelHighAPI_Integer temp) {
84   if (PyLong_Check($input)) {
85     temp = ModelHighAPI_Integer(static_cast<int>(PyLong_AsLong($input)));
86     $1 = &temp;
87   } else if (PyUnicode_Check($input)) {
88     temp = ModelHighAPI_Integer(PyUnicode_AsUTF8($input));
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
272
273 // fix compilarion error: 'res*' was not declared in this scope
274 %typemap(freearg) const std::list<ModelHighAPI_RefAttr> & {}
275 %typemap(freearg) const std::list<std::shared_ptr<ModelAPI_Object> > & {}
276
277 %typemap(in) const std::list<ModelHighAPI_RefAttr> & (std::list<ModelHighAPI_RefAttr> temp) {
278   std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
279   int newmem = 0;
280   if (PySequence_Check($input)) {
281     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
282       PyObject * item = PySequence_GetItem($input, i);
283       if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
284         if (!temp_attribute) {
285           PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_RefAttr, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
286           return NULL;
287         }
288         temp.push_back(ModelHighAPI_RefAttr(*temp_attribute));
289         if (newmem & SWIG_CAST_NEW_MEMORY) {
290           delete temp_attribute;
291         }
292       }
293       Py_DECREF(item);
294     }
295     $1 = &temp;
296   } else {
297     PyErr_SetString(PyExc_ValueError, "argument must be list of ModelHighAPI_RefAttr, ModelHighAPI_Interface, ModelAPI_Attribute or ModelAPI_Object.");
298     return NULL;
299   }
300 }
301
302 %typemap(in) const std::list<std::shared_ptr<ModelAPI_Object> > & (std::list<std::shared_ptr<ModelAPI_Object> > temp) {
303   std::shared_ptr<ModelAPI_Object> * temp_object;
304   std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
305   int newmem = 0;
306   if (PySequence_Check($input)) {
307     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
308       PyObject * item = PySequence_GetItem($input, i);
309       if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
310         if (!temp_object) {
311           PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_Interface or ModelAPI_Object.");
312           return NULL;
313         }
314         temp.push_back(*temp_object);
315         if (newmem & SWIG_CAST_NEW_MEMORY) {
316           delete temp_object;
317         }
318       } else
319       if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
320         if (!temp_interface) {
321           PyErr_SetString(PyExc_TypeError, "argument must be list of ModelHighAPI_Interface or ModelAPI_Object.");
322           return NULL;
323         }
324         temp.push_back((*temp_interface)->defaultResult());
325         if (newmem & SWIG_CAST_NEW_MEMORY) {
326           delete temp_interface;
327         }
328       }
329       Py_DECREF(item);
330     }
331     $1 = &temp;
332   } else {
333     PyErr_SetString(PyExc_ValueError, "argument must be list of ModelHighAPI_Interface or ModelAPI_Object.");
334     return NULL;
335   }
336 }
337
338 %typecheck(SWIG_TYPECHECK_POINTER) std::list<std::shared_ptr<ModelAPI_Object> >, const std::list<std::shared_ptr<ModelAPI_Object> >& {
339   std::shared_ptr<ModelAPI_Object> * temp_object;
340   std::shared_ptr<ModelHighAPI_Interface> * temp_interface;
341   int newmem = 0;
342   if (PySequence_Check($input)) {
343     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
344       PyObject * item = PySequence_GetItem($input, i);
345       if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
346         if (temp_object) {
347           $1 = 1;
348         } else {
349           $1 = 0;
350           break;
351         }
352       } else
353       if ((SWIG_ConvertPtrAndOwn(item, (void **)&temp_interface, $descriptor(std::shared_ptr<ModelHighAPI_Interface> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
354         if (temp_interface) {
355           $1 = 1;
356         } else {
357           $1 = 0;
358           break;
359         }
360       }
361       Py_DECREF(item);
362     }
363   } else {
364     $1 = 0;
365   }
366 }
367
368
369 %typemap(in) const std::list<int> & (std::list<int> temp) {
370   int newmem = 0;
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   int newmem = 0;
391   if (PySequence_Check($input)) {
392     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
393       PyObject * item = PySequence_GetItem($input, i);
394       if (PyLong_Check(item)) {
395         $1 = 1;
396       } else {
397         $1 = 0;
398         break;
399       }
400       Py_DECREF(item);
401     }
402   } else {
403     $1 = 0;
404   }
405 }
406
407
408 %typemap(in) const std::list<double> & (std::list<double> temp) {
409   int newmem = 0;
410   if (PyTuple_Check($input)) {
411     for (Py_ssize_t i = 0; i < PyTuple_Size($input); ++i) {
412       PyObject * item = PySequence_GetItem($input, i);
413       if (PyNumber_Check(item)) {
414         temp.push_back((double)PyFloat_AsDouble(item));
415       } else {
416         PyErr_SetString(PyExc_TypeError, "argument must double value.");
417         return NULL;
418       }
419       Py_DECREF(item);
420     }
421     $1 = &temp;
422   } else {
423     PyErr_SetString(PyExc_ValueError, "argument must be a tuple of double values.");
424     return NULL;
425   }
426 }
427
428 %typecheck(SWIG_TYPECHECK_POINTER) std::list<double>, const std::list<double>& {
429   int newmem = 0;
430   if (PyTuple_Check($input)) {
431     for (Py_ssize_t i = 0; i < PyTuple_Size($input); ++i) {
432       PyObject * item = PySequence_GetItem($input, i);
433       if (PyNumber_Check(item)) {
434         $1 = 1;
435       } else {
436         $1 = 0;
437         break;
438       }
439       Py_DECREF(item);
440     }
441   } else {
442     $1 = 0;
443   }
444 }
445
446
447 %typemap(in) const std::list<ModelHighAPI_Double> & (std::list<ModelHighAPI_Double> temp) {
448   ModelHighAPI_Double * temp_double;
449   if (PySequence_Check($input)) {
450     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
451       PyObject * item = PySequence_GetItem($input, i);
452       if (PyFloat_Check(item) || PyLong_Check(item)) {
453         temp.push_back(ModelHighAPI_Double(PyFloat_AsDouble(item)));
454       } else if (PyUnicode_Check(item)) {
455         temp.push_back(ModelHighAPI_Double(PyUnicode_AsUTF8(item)));
456       } else if ((SWIG_ConvertPtr(item, (void **)&temp_double, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
457         temp.push_back(*temp_double);
458       } else {
459         PyErr_SetString(PyExc_ValueError, "argument must be a list of ModelHighAPI_Double, float, int or string.");
460         return NULL;
461       }
462       Py_DECREF(item);
463     }
464     $1 = &temp;
465   } else {
466     PyErr_SetString(PyExc_ValueError, "argument must be a list of ModelHighAPI_Double, float, int or string.");
467     return NULL;
468   }
469 }
470
471 %typecheck(SWIG_TYPECHECK_POINTER) std::list<ModelHighAPI_Double>, const std::list<ModelHighAPI_Double> & {
472   if (PySequence_Check($input)) {
473     $1 = 1;
474     for (Py_ssize_t i = 0; i < PySequence_Size($input) && $1; ++i) {
475       PyObject * item = PySequence_GetItem($input, i);
476       $1 = ((PyFloat_Check(item) || PyLong_Check(item) || PyUnicode_Check(item)) && !PyBool_Check(item)) ? 1 : 0;
477       Py_DECREF(item);
478     }
479   } else {
480     $1 = 0;
481   }
482 }
483
484
485 %typemap(in) const std::list<ModelHighAPI_Integer> & (std::list<ModelHighAPI_Integer> temp) {
486   ModelHighAPI_Integer * temp_int;
487   if (PySequence_Check($input)) {
488     for (Py_ssize_t i = 0; i < PySequence_Size($input); ++i) {
489       PyObject * item = PySequence_GetItem($input, i);
490       if (PyLong_Check(item)) {
491         temp.push_back(ModelHighAPI_Integer(PyLong_AsLong(item)));
492       } else if (PyUnicode_Check(item)) {
493         temp.push_back(ModelHighAPI_Integer(PyUnicode_AsUTF8(item)));
494       } else if ((SWIG_ConvertPtr(item, (void **)&temp_int, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
495         temp.push_back(*temp_int);
496       } else {
497         PyErr_SetString(PyExc_ValueError, "argument must be a list of ModelHighAPI_Integer, int or string.");
498         return NULL;
499       }
500       Py_DECREF(item);
501     }
502     $1 = &temp;
503   } else {
504     PyErr_SetString(PyExc_ValueError, "argument must be a list of ModelHighAPI_Integer, int or string.");
505     return NULL;
506   }
507 }
508
509 %typecheck(SWIG_TYPECHECK_POINTER) std::list<ModelHighAPI_Integer>, const std::list<ModelHighAPI_Integer> & {
510   if (PySequence_Check($input)) {
511     $1 = 1;
512     for (Py_ssize_t i = 0; i < PySequence_Size($input) && $1; ++i) {
513       PyObject * item = PySequence_GetItem($input, i);
514       $1 = ((PyLong_Check(item) || PyUnicode_Check(item)) && !PyBool_Check(item)) ? 1 : 0;
515       Py_DECREF(item);
516     }
517   } else {
518     $1 = 0;
519   }
520 }
521
522
523 // all supported interfaces
524 %include "ModelHighAPI_Double.h"
525 %include "ModelHighAPI_Dumper.h"
526 %include "ModelHighAPI_Integer.h"
527 %include "ModelHighAPI_Interface.h"
528 %include "ModelHighAPI_Folder.h"
529 %include "ModelHighAPI_RefAttr.h"
530 %include "ModelHighAPI_Reference.h"
531 %include "ModelHighAPI_Selection.h"
532 %include "ModelHighAPI_Services.h"
533 %include "ModelHighAPI_Macro.h"
534 %include "ModelHighAPI_Tools.h"