]> SALOME platform Git repositories - modules/yacs.git/blob - src/engine/ElementaryNode.hxx
Salome HOME
PR: merge from BR_DATACONV_PR tag "mergeto_trunk_25oct06"
[modules/yacs.git] / src / engine / ElementaryNode.hxx
1 #ifndef __ELEMENTARYNODE_HXX__
2 #define __ELEMENTARYNODE_HXX__
3
4 #include "TypeCode.hxx"
5 #include "Node.hxx"
6 #include "Task.hxx"
7 #include "define.hxx"
8 //#include "Data.hxx"
9 #include <string>
10
11 namespace YACS
12 {
13   namespace ENGINE
14   {
15     class Port;
16     class InputPort;
17     class OutputPort;
18     class ComposedNode;
19     class InputDataStreamPort;
20     class OutputDataStreamPort;
21
22     class ElementaryNode : public Node, public Task
23     {
24       friend class ComposedNode;
25     protected:
26       ElementaryNode(const std::string& name);
27       ~ElementaryNode();
28     public:
29       void getReadyTasks(std::vector<Task *>& tasks);
30       void edRemovePort(Port *port) throw(Exception);
31       std::set<ElementaryNode *> getRecursiveConstituents();
32       virtual InputPort *edAddInputPort(const std::string& inputPortName, TypeCode* type) throw(Exception);
33       virtual OutputPort *edAddOutputPort(const std::string& outputPortName, TypeCode* type) throw(Exception);
34       virtual InputDataStreamPort *edAddInputDataStreamPort(const std::string& inputPortDSName, TypeCode* type) throw(Exception);
35       virtual OutputDataStreamPort *edAddOutputDataStreamPort(const std::string& outputPortDSName, TypeCode* type) throw(Exception);
36       virtual const std::string getInputPortName(const InputPort *) throw (Exception);
37       virtual const std::string getOutputPortName(const OutputPort *) throw (Exception);
38       //run part
39       void begin();
40       bool isReady();
41       void finished();
42     protected:
43       void disconnectAllLinksConnectedTo(Node *node);
44     };
45   }
46 }
47
48 #endif