Salome HOME
Updated copyright comment
[modules/yacs.git] / src / runtime_swig / SALOMERuntime.i
index 95103b3a29388bbe1ae3afae97fc7eb433fc58ab..40a200ad244b428f66c54499ffddeadbc3dd37e8 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2006-2016  CEA/DEN, EDF R&D
+// Copyright (C) 2006-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -66,6 +66,7 @@
 #include "PyStdout.hxx"
 #include "ExecutorSwig.hxx"
 #include <sstream>
+#include "Catalog.hxx"
 %}
 
 // ----------------------------------------------------------------------------
@@ -227,8 +228,11 @@ namespace YACS
 // becomes a real derived class, this will have to be changed.
 %rename(OptimizerAlgSync) YACS::ENGINE::PyOptimizerAlgBase;
 %rename(OptimizerAlgASync) YACS::ENGINE::PyOptimizerAlgASync;
+
 %include "PyOptimizerAlg.hxx"
 
+%newobject YACS::ENGINE::RuntimeSALOME::createAnyPyObject;
+
 %extend YACS::ENGINE::RuntimeSALOME
 {
   PyObject *createContainer(const std::string& kind="")
@@ -236,4 +240,10 @@ namespace YACS
     YACS::ENGINE::Container *ret(self->createContainer(kind));
     return convertContainer2(ret,SWIG_POINTER_OWN | 0);
   }
+
+  Any* createAnyPyObject(PyObject * pyobj)
+  {
+    return convertPyObjectNeutral(self->getBuiltinCatalog()->_typeMap["pyobj"],
+                                  pyobj);
+  }
 }