Salome HOME
PR: merge from BR_DATACONV_PR tag "mergeto_trunk_25oct06"
[modules/yacs.git] / src / engine / InputPort.hxx
index 815b497de5cf43994e09fc712b9c99de97f418c2..20d550661ac3e11f7aadcd20f24c103563e4e6ba 100644 (file)
@@ -1,30 +1,61 @@
 #ifndef __INPUTPORT_HXX__
 #define __INPUTPORT_HXX__
 
+//#include <Python.h>
+//#include <omniORB4/CORBA.h>
+
+#include "TypeCode.hxx"
 #include "InPort.hxx"
 #include "DataFlowPort.hxx"
 #include "ConversionException.hxx"
 
+#include <string>
+
 namespace YACS
 {
   namespace ENGINE
   {
+
+    class Runtime;
+
     class InputPort : public DataFlowPort, public InPort
     {
-    protected:
-      bool _manuallySet;
-    public:
-      static const char NAME[];
+      friend class Runtime; // for port creation
     public:
-      InputPort(const std::string& name, Node *node, DynType type);
+      ~InputPort();
+
       std::string getNameOfTypeOfCurrentInstance() const;
-      void edInit(Data data) throw(ConversionException);
+
       void edNotifyReferenced();
+      void edInit(const void *data) throw(ConversionException);
+
       void exInit();
-      Data exGet() const;
-      void exAccept(Data data) throw(ConversionException);
-      ~InputPort();
+      bool isEmpty();
+
+      virtual void put(const void *data) throw(ConversionException);
+
+      static const char NAME[];
+
+    protected:
+      InputPort(const std::string& name, Node *node, TypeCode* type);
+      bool _empty;
+      bool _manuallySet;
+    };
+
+
+    class ProxyPort : public InputPort
+    {
+    public:
+      ProxyPort(InputPort* p)
+       : InputPort("Convertor", p->getNode(), p->type()),
+         Port( p->getNode())
+      { _port = p; }
+    protected:
+      InputPort* _port;
     };
+
+
+
   }
 }