X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2Fruntime_swig%2FSALOMERuntime.i;h=40a200ad244b428f66c54499ffddeadbc3dd37e8;hb=1894c52d0838df8676e770bef061fc23ca436452;hp=95103b3a29388bbe1ae3afae97fc7eb433fc58ab;hpb=0bd13bd4ef07bb64637ec2a49d8e5908c909c49b;p=modules%2Fyacs.git diff --git a/src/runtime_swig/SALOMERuntime.i b/src/runtime_swig/SALOMERuntime.i index 95103b3a2..40a200ad2 100644 --- a/src/runtime_swig/SALOMERuntime.i +++ b/src/runtime_swig/SALOMERuntime.i @@ -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 +#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); + } }