5 #include "ModelHighAPI_swig.h"
10 // to avoid error on this
11 #define MODELHIGHAPI_EXPORT
13 // standard definitions
16 %include "std_string.i"
17 %include "std_shared_ptr.i"
20 %shared_ptr(ModelHighAPI_Interface)
24 %typemap(in) const ModelHighAPI_Double & (ModelHighAPI_Double temp) {
25 if (PyFloat_Check($input) || PyInt_Check($input) || PyLong_Check($input)) {
26 temp = ModelHighAPI_Double(PyFloat_AsDouble($input));
28 } else if (PyString_Check($input)) {
29 temp = ModelHighAPI_Double(PyString_AsString($input));
31 } else if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
33 PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Double, float, int or string.");
38 %typecheck(SWIG_TYPECHECK_POINTER) ModelHighAPI_Double, const ModelHighAPI_Double & {
39 $1 = (PyFloat_Check($input) || PyInt_Check($input) || PyLong_Check($input) || PyString_Check($input)) ? 1 : 0;
42 %typemap(in) const ModelHighAPI_Integer & (ModelHighAPI_Integer temp) {
43 if (PyInt_Check($input)) {
44 temp = ModelHighAPI_Integer(static_cast<int>(PyInt_AsLong($input)));
46 } else if (PyString_Check($input)) {
47 temp = ModelHighAPI_Integer(PyString_AsString($input));
49 } else if ((SWIG_ConvertPtr($input, (void **)&$1, $1_descriptor, SWIG_POINTER_EXCEPTION)) == 0) {
51 PyErr_SetString(PyExc_ValueError, "argument must be ModelHighAPI_Integer, int or string.");
56 %typecheck(SWIG_TYPECHECK_POINTER) ModelHighAPI_Integer, const ModelHighAPI_Integer & {
57 $1 = (PyInt_Check($input) || PyString_Check($input)) ? 1 : 0;
60 // all supported interfaces
61 %include "ModelHighAPI_Double.h"
62 %include "ModelHighAPI_Integer.h"
63 %include "ModelHighAPI_Interface.h"
64 %include "ModelHighAPI_Macro.h"
65 %include "ModelHighAPI_Selection.h"
66 %include "ModelHighAPI_Tools.h"
69 %template(SelectionList) std::list<ModelHighAPI_Selection>;