47 repr.insert(s.begin(),s.end());
54 std::string what=
"InputPort4DF2DS::get : no value currently in input whith name \""; what+=
_name; what+=
"\"";
85 throw Exception(
"InputPort4DF2DS::clone : internal error");
153 throw Exception(
"DFToDSForLoop::simpleClone : Internal error");
166 for(set<OutPort *>::iterator iter=setO.begin();iter!=setO.end();iter++)
167 (*iter)->getAllRepresented(represented);
178 throw Exception(
"OutputPort4DS2DF::clone : Internal error");
205 repr.insert(s.begin(),s.end());
218 throw Exception(
"DSToDFForLoop::simpleClone : Internal error");
253 _normalFinish(normalFinish),
254 _internalError(internalError)
261 _normalFinish(false),_internalError(true)
326 throw Exception(
"Loop::initLoop : no nodes specifies to be repeated ");
339 string what =
"Loop::edSetNode: node "; what += node->
getName(); what +=
" is not orphan ! ";
387 (*iter1)->getReadyTasks(tasks);
389 (*iter2)->getReadyTasks(tasks);
405 ret.push_back(
_node);
445 string what(
"node "); what+= name ; what+=
" is not a child of loop node "; what +=
getName();
468 set<DSToDFForLoop*>::iterator iter;
471 if((*iter)->getOutputPort(
"")->isAlreadyInSet(portCasted))
477 (*iter)->getOutputPort(
"")->addInPort(portCasted);
480 (*iter)->loopHasOneMoreRef();
481 port=(*iter)->getInputDataStreamPort(
"");
486 string typeOfPortInstance=(port.first)->getNameOfTypeOfCurrentInstance();
492 OutPort *portCasted=port.first;
493 set<DFToDSForLoop*>::iterator iter;
503 pair<set<DFToDSForLoop*>::iterator,
bool> iter2=
_outputsTraducer.insert(kl);
505 portCasted->
addInPort((*iter)->getInputPort(
""));
513 port.first=(*iter)->getOutputDataStreamPort(
"");
525 set<DSToDFForLoop*>::iterator iter;
527 if((*iter)->getOutputPort(
"")->isAlreadyInSet(portCasted))
531 string what(
"Loop::getDelegateOf : Port with name "); what+=portCasted->
getName(); what+=
" not exported by loop "; what+=
_name;
535 port=(*iter)->getInputDataStreamPort(
"");
539 const std::list<ComposedNode *>& pointsOfView)
541 string typeOfPortInstance=(port.first)->getNameOfTypeOfCurrentInstance();
547 OutPort *portCasted=port.first;
548 set<DFToDSForLoop*>::iterator iter;
554 string what(
"Loop::getDelegateOf : Port with name "); what+=portCasted->
getName(); what+=
" not exported by loop "; what+=
_name;
558 port.first=(*iter)->getOutputDataStreamPort(
"");
570 set<DSToDFForLoop*>::iterator iter;
572 if((*iter)->getOutputPort(
"")->isAlreadyInSet(portCasted))
576 string what(
"Loop::releaseDelegateOf Port with name "); what+=portCasted->
getName(); what+=
" not exported by loop "; what+=
_name;
581 port=(*iter)->getInputDataStreamPort(
"");
582 if((*iter)->loopHasOneLessRef())
584 (*iter)->getOutputPort(
"")->removeInPort(portCasted,
false);
595 set<DFToDSForLoop*>::iterator iter;
597 if((*iter)->getOutputDataStreamPort(
"")==portUp)
599 if((*iter)->loopHasOneLessRef())
633 for(list<ComposedNode *>::const_iterator iter=pointsOfView.begin();iter!=pointsOfView.end() && !ret;iter++)
634 ret=(*iter)->isRepeatedUnpredictablySeveralTimes();
658 os <<
" subgraph cluster_" <<
getId() <<
" {\n" ;
666 os <<
getId() <<
"[fillcolor=\"" ;
669 os <<
"\" label=\"" <<
"Loop:" ;
681 std::vector<OutPort *>& fwCross,
689 throw Exception(
"Internal error occured - cross type link detected on decision port of a loop. Forbidden !");
695 DEBTRACE(
"Loop::checkBasicConsistency");
698 throw Exception(
"For a loop, internal node is mandatory");
: Interface for management of storage of data formated dynamically in its TypeCode....
Base class for all composed nodes.
std::list< InputPort * > getSetOfInputPort() const
void checkNoCrossHierachyWith(Node *node) const
std::string getName() const
void solveObviousOrDelegateCFLinks(const std::list< OutPort * > &starts, InputPort *end, unsigned char &alreadyFed, bool direction, LinkInfo &info) const
virtual void edRemoveChild(Node *node)
Remove a child node.
virtual void checkBasicConsistency() const
void init(bool start=true)
int getNumberOfInputPorts() const
bool edAddLink(OutPort *start, InPort *end)
Add a dataflow link between two data ports.
Node * isInMyDescendance(Node *nodeToTest) const
Returns the parent of a node that is the direct child of this node.
virtual void checkCFLinks(const std::list< OutPort * > &starts, InputPort *end, unsigned char &alreadyFed, bool direction, LinkInfo &info) const
check control flow links
DFToDSForLoop(Loop *loop, const std::string &name, TypeCode *type)
InputPort * getInputPort(const std::string &name) const
void getReadyTasks(std::vector< Task * > &tasks)
OutputDataStreamPort * getOutputDataStreamPort(const std::string &name) const
Node * simpleClone(ComposedNode *father, bool editionOnly=true) const
void getReadyTasks(std::vector< Task * > &tasks)
DSToDFForLoop(Loop *loop, const std::string &name, TypeCode *type)
Node * simpleClone(ComposedNode *father, bool editionOnly=true) const
OutputPort * getOutputPort(const std::string &name) const
InputDataStreamPort * getInputDataStreamPort(const std::string &name) const
std::string getNameOfTypeOfCurrentInstance() const
TypeCode * edGetType() const
std::string getName() const
Base class for all calculation nodes.
std::list< InputPort * > _setOfInputPort
std::list< OutputDataStreamPort * > _setOfOutputDataStreamPort
std::list< InputDataStreamPort * > _setOfInputDataStreamPort
std::list< OutputPort * > _setOfOutputPort
void edDisconnectAllLinksWithMe()
void getReadyTasks(std::vector< Task * > &tasks)
Node * simpleClone(ComposedNode *father, bool editionOnly) const
FakeNodeForLoop(Loop *loop, bool normalFinish, bool internalError=false)
virtual std::set< OutPort * > edSetOutPort() const
Returns physical backlinks NOT user backlinks.
Class that deal with list of semantics links for high level analysis.
Base class for loop node.
static TypeCode * MappingDS2DF(TypeCode *type)
int getNumberOfInputPorts() const
void init(bool start=true)
friend class DSToDFForLoop
int getMaxLevelOfParallelism() const
Node * getChildByShortName(const std::string &name) const
std::set< DSToDFForLoop * > _inputsTraducer
Node * edSetNode(Node *DISOWNnode)
virtual bool edAddChild(Node *DISOWNnode)
void partitionRegardingDPL(const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap)
std::list< Node * > edGetDirectDescendants() const
void getWeightRegardingDPL(ComplexWeight *weight)
void checkCFLinks(const std::list< OutPort * > &starts, InputPort *end, unsigned char &alreadyFed, bool direction, LinkInfo &info) const
check control flow links
void getDelegateOf(InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView)
virtual void accept(Visitor *visitor)
void writeDot(std::ostream &os) const
Dump the node state to a stream.
void checkControlDependancy(OutPort *start, InPort *end, bool cross, std::map< ComposedNode *, std::list< OutPort * >, SortHierarc > &fw, std::vector< OutPort * > &fwCross, std::map< ComposedNode *, std::list< OutPort * >, SortHierarc > &bw, LinkInfo &info) const
void edRemoveChild(Node *node)
Remove a child node.
void getReadyTasks(std::vector< Task * > &tasks)
Collect all the child nodes that are ready.
std::list< InputPort * > getSetOfInputPort() const
std::set< DFToDSForLoop * > _outputsTraducer
void buildDelegateOf(InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView)
static TypeCode * MappingDF2DS(TypeCode *type)
virtual void checkBasicConsistency() const
void checkNoCyclePassingThrough(Node *node)
virtual InputPort * getDecisionPort() const =0
Returns the port which value is used to take decision about the continuation of the loop.
void releaseDelegateOf(InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView)
virtual bool edAddDFLink(OutPort *start, InPort *end)
Connect an OutPort to an InPort and add control link if necessary.
static bool isNecessaryToBuildSpecificDelegateDF2DS(const std::list< ComposedNode * > &pointsOfView)
FakeNodeForLoop * _nodeForNullTurnOfLoops
Base class for all nodes.
virtual void exForwardFinished()
virtual Node * simpleClone(ComposedNode *father, bool editionOnly=true) const =0
virtual int getMaxLevelOfParallelism() const =0
std::string getColorState(YACS::StatesForNode state) const
Return the color associated to a state.
virtual void getReadyTasks(std::vector< Task * > &tasks)=0
virtual InputDataStreamPort * getInputDataStreamPort(const std::string &name) const =0
virtual void modified()
Sets Node in modified state and its father if it exists.
std::string getQualifiedName() const
same as Node::getName() in most cases, but differs for children of switch
virtual void getWeightRegardingDPL(ComplexWeight *weight)=0
const std::string getId() const
virtual void init(bool start=true)
ComposedNode * getFather() const
virtual void writeDot(std::ostream &os) const
Dump to the input stream a dot representation of the node.
void setState(YACS::StatesForNode theState)
Sets the given state for node.
const std::string & getName() const
virtual InputPort * getInputPort(const std::string &name) const
virtual void exForwardFailed()
virtual OutputPort * getOutputPort(const std::string &name) const =0
virtual YACS::StatesForNode getEffectiveState() const
Return the node state in the context of its father.
YACS::StatesForNode _state
virtual void partitionRegardingDPL(const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap)=0
virtual OutputDataStreamPort * getOutputDataStreamPort(const std::string &name) const =0
virtual bool isAlreadyLinkedWith(InPort *withp) const =0
virtual int removeInPort(InPort *inPort, bool forward)=0
virtual bool addInPort(InPort *inPort)=0
std::set< InPort * > edSetInPort() const
OutputPort4DS2DF(DSToDFForLoop *node, TypeCode *type)
void put(const void *data)
OutputPort * clone(Node *newHelder) const
void getAllRepresented(std::set< OutPort * > &represented) const
virtual void put(const void *data)
std::set< InPort * > edSetInPort() const
Base class for all ports.
void checkControlDependancy(OutPort *start, InPort *end, bool cross, std::map< ComposedNode *, std::list< OutPort * >, SortHierarc > &fw, std::vector< OutPort * > &fwCross, std::map< ComposedNode *, std::list< OutPort * >, SortHierarc > &bw, LinkInfo &info) const
Base class for all type objects.
virtual void visitLoop(Loop *node)=0
void YACSLIBENGINE_EXPORT NbDoneLoader(Loop *node, int val)