4 #include "ComposedNode.hxx"
5 #include "ElementaryNode.hxx"
13 class DFToDSForLoop : public ElementaryNode
18 Loop *_loopArtificiallyBuiltMe;
20 DFToDSForLoop(Loop *loop, const std::string& name, TypeCode* type);
21 void loopHasOneMoreRef() { _nbOfTimeUsed++; }
22 bool loopHasOneLessRef() { return --_nbOfTimeUsed==0; }
23 InputPort *getInputPort(const std::string& name) const throw(Exception);
24 OutputDataStreamPort *getOutputDataStreamPort(const std::string& name) const throw(Exception);
31 class DSToDFForLoop : public ElementaryNode
36 Loop *_loopArtificiallyBuiltMe;
38 DSToDFForLoop(Loop *loop, const std::string& name, TypeCode* type);
39 void loopHasOneMoreRef() { _nbOfTimeUsed++; }
40 bool loopHasOneLessRef() { return --_nbOfTimeUsed==0; }
41 OutputPort *getOutputPort(const std::string& name) const throw(Exception);
42 InputDataStreamPort *getInputDataStreamPort(const std::string& name) const throw(Exception);
49 class Loop : public ComposedNode
53 std::set<InputPort *> _setOfExtraInputPort;
54 std::set<DSToDFForLoop *> _inputsTraducer;
55 std::set<DFToDSForLoop *> _outputsTraducer;
57 Loop(const std::string& name);
59 void edSetNode(Node *node);
60 void edAddExtraInputPort(const std::string& inputPortName, TypeCode* type) throw(Exception);
61 void edRemoveExtraInputPort(InputPort *inputPort);
62 bool isRepeatedUnpredictablySeveralTimes() const { return true; }
63 static TypeCode* MappingDF2DS(TypeCode* type) throw(Exception);
64 static TypeCode* MappingDS2DF(TypeCode* type) throw(Exception);
66 InPort *buildDelegateOf(InPort *port, const std::set<ComposedNode *>& pointsOfView);
67 OutPort *buildDelegateOf(OutPort *port, const std::set<ComposedNode *>& pointsOfView);
68 InPort *getDelegateOf(InPort *port, const std::set<ComposedNode *>& pointsOfView) throw(Exception);
69 OutPort *getDelegateOf(OutPort *port, const std::set<ComposedNode *>& pointsOfView) throw(Exception);
70 InPort *releaseDelegateOf(InPort *port, const std::set<ComposedNode *>& pointsOfView) throw(Exception);
71 OutPort *releaseDelegateOf(OutPort *port, const std::set<ComposedNode *>& pointsOfView) throw(Exception);
72 void checkNoCyclePassingThrough(Node *node) throw(Exception);
73 static bool isNecessaryToBuildSpecificDelegateDF2DS(const std::set<ComposedNode *>& pointsOfView);