Salome HOME
20d550661ac3e11f7aadcd20f24c103563e4e6ba
[modules/yacs.git] / src / engine / InputPort.hxx
1 #ifndef __INPUTPORT_HXX__
2 #define __INPUTPORT_HXX__
3
4 //#include <Python.h>
5 //#include <omniORB4/CORBA.h>
6
7 #include "TypeCode.hxx"
8 #include "InPort.hxx"
9 #include "DataFlowPort.hxx"
10 #include "ConversionException.hxx"
11
12 #include <string>
13
14 namespace YACS
15 {
16   namespace ENGINE
17   {
18
19     class Runtime;
20
21     class InputPort : public DataFlowPort, public InPort
22     {
23       friend class Runtime; // for port creation
24     public:
25       ~InputPort();
26
27       std::string getNameOfTypeOfCurrentInstance() const;
28
29       void edNotifyReferenced();
30       void edInit(const void *data) throw(ConversionException);
31
32       void exInit();
33       bool isEmpty();
34
35       virtual void put(const void *data) throw(ConversionException);
36
37       static const char NAME[];
38
39     protected:
40       InputPort(const std::string& name, Node *node, TypeCode* type);
41       bool _empty;
42       bool _manuallySet;
43     };
44
45
46     class ProxyPort : public InputPort
47     {
48     public:
49       ProxyPort(InputPort* p)
50         : InputPort("Convertor", p->getNode(), p->type()),
51           Port( p->getNode())
52       { _port = p; }
53     protected:
54       InputPort* _port;
55     };
56
57
58
59   }
60 }
61
62 #endif