5 #include "ModelHighAPI_swig.h"
10 // import other modules
12 %import "GeomDataAPI.i"
14 // to avoid error on this
15 #define MODELHIGHAPI_EXPORT
17 // standard definitions
20 %include "std_string.i"
21 %include "std_shared_ptr.i"
24 %shared_ptr(ModelHighAPI_Interface)
28 %typemap(in) const ModelHighAPI_Double & (ModelHighAPI_Double temp) {
29 if (PyFloat_Check($input) || PyInt_Check($input) || PyLong_Check($input)) {
30 temp = ModelHighAPI_Double(PyFloat_AsDouble($input));
32 } else if (PyString_Check($input)) {
33 temp = ModelHighAPI_Double(PyString_AsString($input));
35 } else if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
37 PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Double, float, int or string.");
41 %typecheck(SWIG_TYPECHECK_POINTER) ModelHighAPI_Double, const ModelHighAPI_Double & {
42 $1 = (PyFloat_Check($input) || PyInt_Check($input) || PyLong_Check($input) || PyString_Check($input)) ? 1 : 0;
45 %typemap(in) const ModelHighAPI_Integer & (ModelHighAPI_Integer temp) {
46 if (PyInt_Check($input)) {
47 temp = ModelHighAPI_Integer(static_cast<int>(PyInt_AsLong($input)));
49 } else if (PyString_Check($input)) {
50 temp = ModelHighAPI_Integer(PyString_AsString($input));
52 } else if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
54 PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Integer, int or string.");
58 %typecheck(SWIG_TYPECHECK_POINTER) ModelHighAPI_Integer, const ModelHighAPI_Integer & {
59 $1 = (PyInt_Check($input) || PyString_Check($input)) ? 1 : 0;
62 %typemap(in) const ModelHighAPI_RefAttr & (ModelHighAPI_RefAttr temp) {
63 std::shared_ptr<ModelAPI_Attribute> * temp_attribute;
64 std::shared_ptr<ModelAPI_Object> * temp_object;
66 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_attribute, $descriptor(std::shared_ptr<ModelAPI_Attribute> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
67 temp = ModelHighAPI_RefAttr(*temp_attribute);
68 if (newmem & SWIG_CAST_NEW_MEMORY) {
69 delete temp_attribute;
73 if ((SWIG_ConvertPtrAndOwn($input, (void **)&temp_object, $descriptor(std::shared_ptr<ModelAPI_Object> *), SWIG_POINTER_EXCEPTION, &newmem)) == 0) {
74 temp = ModelHighAPI_RefAttr(*temp_object);
75 if (newmem & SWIG_CAST_NEW_MEMORY) {
80 if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
82 PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Double, float, int or string.");
87 // all supported interfaces
88 %include "ModelHighAPI_Double.h"
89 %include "ModelHighAPI_Integer.h"
90 %include "ModelHighAPI_Interface.h"
91 %include "ModelHighAPI_Macro.h"
92 %include "ModelHighAPI_RefAttr.h"
93 %include "ModelHighAPI_Selection.h"
94 %include "ModelHighAPI_Tools.h"