Salome HOME
Merge Python 3 porting.
[modules/yacs.git] / src / runtime / RuntimeSALOME.hxx
index d9ba31c2360d0b410c163edce99cb604223a62db..b777a36a33ce72d88190a41330c989ea61b56334 100644 (file)
 
 #include <Python.h>
 #include <omniORB4/CORBA.h>
+#include <omniORBpy.h>
 #include "Runtime.hxx"
 
 #include<string>
 #include<set>
-
-//--- from omniORBpy.h (not present on Debian Sarge packages)
-struct omniORBpyAPI
-{
-      PyObject* (*cxxObjRefToPyObjRef)(const CORBA::Object_ptr cxx_obj,
-                                       CORBA::Boolean hold_lock);
-      // Convert a C++ object reference to a Python object reference.
-      // If <hold_lock> is true, caller holds the Python interpreter lock.
-
-      CORBA::Object_ptr (*pyObjRefToCxxObjRef)(PyObject* py_obj,
-                                               CORBA::Boolean hold_lock);
-      // Convert a Python object reference to a C++ object reference.
-      // Raises BAD_PARAM if the Python object is not an object reference.
-      // If <hold_lock> is true, caller holds the Python interpreter lock.
-
-      PyObject* (*handleCxxSystemException)(const CORBA::SystemException& ex);
-      // Sets the Python exception state to reflect the given C++ system
-      // exception. Always returns NULL. The caller must hold the Python
-      // interpreter lock.
-};
-//--- end of from omniORBpy.h (not present on Debian Sarge packages)
       
 namespace YACS
 {
@@ -98,7 +78,7 @@ namespace YACS
 
       virtual void init(long flags, int argc, char* argv[]);
       virtual void fini();
-
+      virtual std::vector< std::pair<std::string,int> > getCatalogOfComputeNodes() const;
       virtual InputPort* createInputPort(const std::string& name,
                                          const std::string& impl,
                                          Node * node,
@@ -124,7 +104,9 @@ namespace YACS
       virtual ServiceInlineNode *createSInlineNode(const std::string& kind, const std::string& name);
       virtual ComponentInstance* createComponentInstance(const std::string& name,
                                                          const std::string& kind="");
+#ifndef SWIG
       virtual Container *createContainer(const std::string& kind="");
+#endif
       virtual WhileLoop* createWhileLoop(const std::string& name);
       virtual ForLoop* createForLoop(const std::string& name);
       virtual OptimizerLoop* createOptimizerLoop(const std::string& name,const std::string& algLib,
@@ -245,10 +227,10 @@ namespace YACS
 
       virtual ~RuntimeSALOME(); 
 
-      CORBA::ORB_ptr getOrb();
-      PyObject * getPyOrb();
-      PyObject * getBuiltins();
-      DynamicAny::DynAnyFactory_ptr getDynFactory();
+      CORBA::ORB_ptr getOrb() const;
+      PyObject * getPyOrb() const;
+      PyObject * getBuiltins() const;
+      DynamicAny::DynAnyFactory_ptr getDynFactory() const;
       omniORBpyAPI* getApi();
       PyObject * get_omnipy();