X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FModelAPI%2FModelAPI.i;h=969ed7fd599502a0237efcb34cb5de7690747eba;hb=9270adddc12db9661c676544537b0e8eb78c1624;hp=d0f093813b9a422003990c9a72319907b416b4b1;hpb=e812429b9754c7750d3d62bc53145353f62d9acf;p=modules%2Fshaper.git diff --git a/src/ModelAPI/ModelAPI.i b/src/ModelAPI/ModelAPI.i index d0f093813..969ed7fd5 100644 --- a/src/ModelAPI/ModelAPI.i +++ b/src/ModelAPI/ModelAPI.i @@ -1,4 +1,4 @@ -// Copyright (C) 2014-2019 CEA/DEN, EDF R&D +// Copyright (C) 2014-2022 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -32,6 +32,8 @@ // fix for SWIG v2.0.4 #define SWIGPY_SLICE_ARG(obj) ((PyObject*)(obj)) + + #define SWIGPY_UNICODE_ARG(obj) ((PyObject*) (obj)) %} // import other modules @@ -42,8 +44,6 @@ #define MODELAPI_EXPORT // standard definitions -%include "typemaps.i" -%include "std_string.i" %include "std_list.i" %include "std_shared_ptr.i" %include "std_set.i" @@ -97,7 +97,6 @@ %shared_ptr(ModelAPI_ResultField) %shared_ptr(ModelAPI_ResultParameter) %shared_ptr(ModelAPI_ResultCompSolid) -%shared_ptr(ModelAPI_ObjectUpdatedMessage) %typecheck(SWIG_TYPECHECK_POINTER) const ModelAPI_AttributeTables::Value { $1 = (PyFloat_Check($input) || PyLong_Check($input) || PyUnicode_Check($input) || PyBool_Check($input)) ? 1 : 0; @@ -170,6 +169,7 @@ // std::list -> [] %template(StringList) std::list; +%template(AttributeList) std::list >; %template(ObjectList) std::list >; %template(FeatureList) std::list >; %template(ResultList) std::list >; @@ -196,7 +196,11 @@ template std::shared_ptr shared_ptr_cast(std::shared_ptr %template(modelAPI_ResultGroup) shared_ptr_cast; %template(modelAPI_ResultField) shared_ptr_cast; -%template(messageToUpdatedMessage) shared_ptr_cast; +%inline %{ + ModelAPI_ObjectUpdatedMessage* messageToUpdatedMessage(std::shared_ptr msg) { + return static_cast(msg.get()); + } +%} // Attribute casts %template(modelAPI_AttributeDocRef) shared_ptr_cast;