Salome HOME
Get rid of compilation warnings. Part I.
[modules/shaper.git] / src / ModelAPI / ModelAPI.i
index d0f093813b9a422003990c9a72319907b416b4b1..068fd4d7a2e75380e997f60ab24545b0a696f0d6 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2019  CEA/DEN, EDF R&D
+// Copyright (C) 2014-2020  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
@@ -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;
 
 // std::list -> []
 %template(StringList) std::list<std::string>;
+%template(AttributeList) std::list<std::shared_ptr<ModelAPI_Attribute> >;
 %template(ObjectList) std::list<std::shared_ptr<ModelAPI_Object> >;
 %template(FeatureList) std::list<std::shared_ptr<ModelAPI_Feature> >;
 %template(ResultList) std::list<std::shared_ptr<ModelAPI_Result> >;
@@ -196,7 +196,11 @@ template<class T1, class T2> std::shared_ptr<T1> shared_ptr_cast(std::shared_ptr
 %template(modelAPI_ResultGroup) shared_ptr_cast<ModelAPI_ResultGroup, ModelAPI_Result>;
 %template(modelAPI_ResultField) shared_ptr_cast<ModelAPI_ResultField, ModelAPI_Result>;
 
-%template(messageToUpdatedMessage) shared_ptr_cast<ModelAPI_ObjectUpdatedMessage, Events_Message>;
+%inline %{
+  ModelAPI_ObjectUpdatedMessage* messageToUpdatedMessage(std::shared_ptr<Events_Message> msg) {
+    return static_cast<ModelAPI_ObjectUpdatedMessage*>(msg.get());
+  }
+%}
 
 // Attribute casts
 %template(modelAPI_AttributeDocRef)        shared_ptr_cast<ModelAPI_AttributeDocRef, ModelAPI_Attribute>;