]> SALOME platform Git repositories - modules/yacs.git/blob - src/engine/OutputPort.hxx
Salome HOME
PR: merge from BR_DATACONV_PR tag "mergeto_trunk_25oct06"
[modules/yacs.git] / src / engine / OutputPort.hxx
1 #ifndef __OUTPUTPORT_HXX__
2 #define __OUTPUTPORT_HXX__
3
4 //#include <Python.h>
5 //#include <omniORB4/CORBA.h>
6
7 #include "TypeCode.hxx"
8 #include "OutPort.hxx"
9 #include "DataFlowPort.hxx"
10 #include "ConversionException.hxx"
11
12 #include <set>
13
14 namespace YACS
15 {
16   namespace ENGINE
17   {
18     class InputPort;
19     class ElementaryNode;
20     class Runtime;
21
22     class OutputPort : public DataFlowPort, public OutPort
23     {
24       friend class ElementaryNode;  // for disconnect...
25       friend class Runtime;         // for port creation
26     public:
27       ~OutputPort();
28
29       std::string getNameOfTypeOfCurrentInstance() const;
30       std::set<InputPort *> edSetInputPort();
31       bool isLinked();
32       bool isAlreadyInSet(InputPort *inputPort) const;
33
34       virtual bool addInPort(InPort *inPort) throw(Exception);
35       bool edAddInputPort(InputPort *inputPort) throw(ConversionException);
36       virtual void removeInPort(InPort *inPort) throw(Exception);
37       void edRemoveInputPort(InputPort *inputPort) throw(Exception);
38
39       void exInit();
40
41       virtual void put(const void *data) throw(ConversionException);
42
43       static const char NAME[];
44
45     protected:
46       OutputPort(const std::string& name, Node *node, TypeCode* type);
47       void edRemoveInputPortOneWay(InputPort *inputPort);
48       std::set<InputPort *> _setOfInputPort;
49     };
50   }
51 }
52
53 #endif