Salome HOME
3a7c9754034b154295361602607a031315020d69
[modules/yacs.git] / src / engine / InputPort.cxx
1 #include "InputPort.hxx"
2
3 #include <sstream>
4 #include <iostream>
5
6 using namespace YACS::ENGINE;
7 using namespace std;
8
9 const char InputPort::NAME[]="InputPort";
10
11 InputPort::InputPort(const string& name, Node *node, TypeCode* type)
12   : DataFlowPort(name,node,type), InPort(node),Port(node), _manuallySet(false), _empty(true)
13 {
14 }
15
16 string InputPort::getNameOfTypeOfCurrentInstance() const
17 {
18   return NAME;
19 }
20
21 // void InputPort::edInit(Data data) throw(ConversionException)
22 // {
23 //   _data=data;
24 //   _manuallySet=true;
25 // }
26
27 void InputPort::edNotifyReferenced()
28 {
29   _manuallySet=false;
30 }
31
32 void InputPort::exInit()
33 {
34 //   if(!_manuallySet)
35 //     _data.exInit();
36 }
37
38 bool InputPort::isEmpty()
39 {
40   return _empty;
41 }
42
43 void InputPort::edInit(const void *data) throw(ConversionException)
44 {
45   _manuallySet=true;
46   put(data);
47 }
48
49 void InputPort::put(const void *data) throw(ConversionException)
50 {
51 //   _data = (void *)data;
52   cerr << _name << endl;
53   cerr << _impl << endl;
54   stringstream msg;
55   msg << "Not implemented (" << __FILE__ << ":" << __LINE__ << ")";
56   throw Exception(msg.str());
57 }
58
59
60
61 InputPort::~InputPort()
62 {
63 }