Salome HOME
Use a new container instead of the default one in py2yacs.
authorOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Thu, 23 Nov 2017 16:44:51 +0000 (17:44 +0100)
committerOvidiu Mircescu <ovidiu.mircescu@edf.fr>
Thu, 23 Nov 2017 16:59:23 +0000 (17:59 +0100)
src/py2yacs/py2yacs.cxx

index 5ee96e586958e1c83f9f72e859870fdafd9ca1df..a3ca4f0e3f1a97d1c96ddf91fcb7bd86d294afbe 100644 (file)
@@ -24,6 +24,7 @@
 #include "InlineNode.hxx"
 #include "AutoGIL.hxx"
 #include "InputPort.hxx"
+#include "Container.hxx"
 
 Py2yacsException::Py2yacsException(const std::string& what)
 : std::exception(),
@@ -380,7 +381,9 @@ YACS::ENGINE::Proc* Py2yacs::createProc(const std::string& python_function)const
     node->edAddOutputPort(*it, tc_double);
 
   node->setExecutionMode(YACS::ENGINE::InlineNode::REMOTE_STR);
-  node->setContainer(schema->containerMap["DefaultContainer"]);
+  YACS::ENGINE::Container* cont=schema->createContainer("Py2YacsContainer");
+  node->setContainer(cont);
+  cont->decrRef();
   return schema;
 }