Salome HOME
merge V9_dev
[modules/yacs.git] / src / engine_swig / pilot.i
index 811ad13518d06588bf4a80e4ca0e146392ef4374..fbd2572d73221dfb66ec071146e82e29bd609bb1 100644 (file)
@@ -106,12 +106,14 @@ using namespace YACS::ENGINE;
 %template()              std::pair<YACS::ENGINE::OutPort *,YACS::ENGINE::InPort *>;
 %template()              std::pair<YACS::ENGINE::InPort *,YACS::ENGINE::OutPort *>;
 %template()              std::pair< std::string, int >;
+%template(ItPy3TC)       IteratorPy3<YACS::ENGINE::TypeCode *>;
 //%template(TCmap)         std::map<std::string, YACS::ENGINE::TypeCode *>;
 REFCOUNT_TEMPLATE(TCmap,YACS::ENGINE::TypeCode)
 %template(NODEmap)       std::map<std::string, YACS::ENGINE::Node *>;
 %template(INODEmap)      std::map<std::string, YACS::ENGINE::InlineNode *>;
 %template(SNODEmap)      std::map<std::string, YACS::ENGINE::ServiceNode *>;
 //%template(CONTAINmap)    std::map<std::string, YACS::ENGINE::Container *>;
+%template(ItPy3Cont)     IteratorPy3<YACS::ENGINE::Container * >;
 REFCOUNT_TEMPLATE(CONTAINmap,YACS::ENGINE::Container)
 %template(strvec)        std::vector<std::string>;
 %template(uivec)         std::vector<unsigned int>;
@@ -130,9 +132,11 @@ REFCOUNT_TEMPLATE(CONTAINmap,YACS::ENGINE::Container)
 %template(compomap)      std::map<std::string, YACS::ENGINE::ComponentDefinition *>;
 %template()              std::pair<std::string, std::string>;
 %template(propmap)       std::map<std::string, std::string>;
-
+%template(ItPy3Comp)     IteratorPy3<YACS::ENGINE::ComponentInstance *>;
 REFCOUNT_TEMPLATE(CompoInstmap,YACS::ENGINE::ComponentInstance)
 
+%include "exception.i"
+
 /*
  * End of Template section
  */
@@ -509,7 +513,7 @@ EXCEPTION(YACS::ENGINE::ExecutorSwig::waitPause)
     // param 2
     PyObject *ret2Py(PyList_New(ret2.size()));
     for(std::size_t i=0;i<ret2.size();i++)
-      PyList_SetItem(ret2Py,i,PyBytes_FromString(ret2[i].c_str()));
+      PyList_SetItem(ret2Py,i,PyUnicode_FromString(ret2[i].c_str()));
     PyTuple_SetItem(ret,2,ret2Py);
     return ret;
   }