Loop node for parametric calculation. More...
#include <ForEachLoop.hxx>
Public Member Functions | |
ForEachLoop (const std::string &name, TypeCode *typeOfDataSplitted) | |
ForEachLoop (const ForEachLoop &other, ComposedNode *father, bool editionOnly) | |
~ForEachLoop () | |
void | init (bool start=true) |
void | exUpdateState () |
Update the node state. More... | |
void | exUpdateProgress () |
void | getReadyTasks (std::vector< Task * > &tasks) |
int | getNumberOfInputPorts () const |
void | checkNoCyclePassingThrough (Node *node) throw (Exception) |
void | selectRunnableTasks (std::vector< Task * > &tasks) |
unsigned | getExecCurrentId () const |
std::list< InputPort * > | getSetOfInputPort () const |
std::list< InputPort * > | getLocalInputPorts () const |
redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself More... | |
InputPort * | edGetSeqOfSamplesPort () |
InputPort * | getInputPort (const std::string &name) const throw (Exception) |
Get an input port given its name. More... | |
OutPort * | getOutPort (const std::string &name) const throw (Exception) |
OutputPort * | getOutputPort (const std::string &name) const throw (Exception) |
Get an output port given its name. More... | |
Node * | getChildByShortName (const std::string &name) const throw (Exception) |
std::list< OutputPort * > | getLocalOutputPorts () const |
redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself More... | |
void | accept (Visitor *visitor) |
void | writeDot (std::ostream &os) const |
Dump the node state to a stream. More... | |
virtual std::string | typeName () |
virtual void | resetState (int level) |
Reset the state of the node and its children depending on the parameter level. More... | |
std::string | getProgress () const |
std::list< ProgressWeight > | getProgressWeight () const |
Get the progress weight for all elementary nodes. More... | |
int | getCurrentIndex () const |
int | getNbOfElementsToBeProcessed () const |
ForEachLoopPassedData * | getProcessedData () const |
void | setProcessedData (ForEachLoopPassedData *processedData) |
std::vector< unsigned int > | getPassedResults (Executor *execut, std::vector< SequenceAny * > &outputs, std::vector< std::string > &nameOfOutputs) const |
void | assignPassedResults (const std::vector< unsigned int > &passedIds, const std::vector< SequenceAny * > &passedOutputs, const std::vector< std::string > &nameOfOutputs) |
const TypeCode * | getOutputPortType (const std::string &portName) const |
Public Member Functions inherited from YACS::ENGINE::DynParaLoop | |
Node * | edRemoveNode () |
Node * | edRemoveInitNode () |
Node * | edRemoveFinalizeNode () |
Node * | edSetNode (Node *DISOWNnode) |
Node * | edSetInitNode (Node *DISOWNnode) |
Node * | edSetFinalizeNode (Node *DISOWNnode) |
virtual bool | edAddDFLink (OutPort *start, InPort *end) throw (Exception) |
Connect an OutPort to an InPort and add control link if necessary. More... | |
InputPort * | edGetNbOfBranchesPort () |
int | getNumberOfOutputPorts () const |
unsigned | getNumberOfEltsConsumed () const |
int | getBranchIDOfNode (Node *node) const |
std::list< OutputPort * > | getSetOfOutputPort () const |
OutputPort * | edGetSamplePort () |
bool | isPlacementPredictableB4Run () const |
For the moment false is returned : impovement about it coming soon. More... | |
void | edRemoveChild (Node *node) throw (Exception) |
Remove a child node. More... | |
virtual bool | edAddChild (Node *DISOWNnode) throw (Exception) |
std::list< Node * > | edGetDirectDescendants () const |
unsigned | getNumberOfBranchesCreatedDyn () const throw (Exception) |
Node * | getChildByNameExec (const std::string &name, unsigned id) const throw (Exception) |
std::vector< Node * > | getNodes () const |
bool | isMultiplicitySpecified (unsigned &value) const |
void | forceMultiplicity (unsigned value) |
virtual void | checkBasicConsistency () const throw (Exception) |
virtual std::string | getErrorReport () |
returns a string that contains an error report if the node is in error More... | |
Node * | getInitNode () |
Node * | getExecNode () |
Node * | getFinalizeNode () |
int | getMaxLevelOfParallelism () const |
Public Member Functions inherited from YACS::ENGINE::ComposedNode | |
virtual | ~ComposedNode () |
bool | isFinished () |
std::string | getName () const |
std::string | getTaskName (Task *task) const |
DeploymentTree | getDeploymentTree () const |
Essentially for test. Use checkDeploymentTree instead to be sure that returned DeploymentTree is consistent. More... | |
DeploymentTree | checkDeploymentTree (bool deep) const throw (Exception) |
Perform check of deployment consistency of the current graph. More... | |
std::vector< Task * > | getNextTasks (bool &isMore) |
void | notifyFrom (const Task *sender, YACS::Event event, const Executor *execInst) |
Notify the node a task has emitted an event. More... | |
bool | edAddLink (OutPort *start, InPort *end) throw (Exception) |
Add a dataflow link between two data ports. More... | |
bool | edAddLink (OutGate *start, InGate *end) throw (Exception) |
Add a controlflow link between two control ports. More... | |
bool | edAddCFLink (Node *nodeS, Node *nodeE) throw (Exception) |
Add a controlflow link between two nodes. More... | |
void | edRemoveCFLink (Node *nodeS, Node *nodeE) throw (Exception) |
Remove a controlflow link. More... | |
void | edRemoveLink (OutPort *start, InPort *end) throw (Exception) |
Remove a dataflow link. More... | |
void | edRemoveLink (OutGate *start, InGate *end) throw (Exception) |
Remove a controlflow link. More... | |
virtual bool | isRepeatedUnpredictablySeveralTimes () const |
virtual void | removeRecursivelyRedundantCL () |
std::list< ElementaryNode * > | getRecursiveConstituents () const |
std::list< Node * > | getAllRecursiveNodes () |
Get all children nodes elementary and composed including this node. More... | |
virtual std::list< Node * > | getAllRecursiveConstituents () |
Idem getAllRecursiveNodes, but this node is NOT included. More... | |
std::string | getInPortName (const InPort *) const throw (Exception) |
Get the input port name. More... | |
std::string | getOutPortName (const OutPort *) const throw (Exception) |
std::set< OutPort * > | getAllOutPortsLeavingCurrentScope () const |
List all output ports of children nodes that are linked to out of scope input ports. More... | |
std::set< InPort * > | getAllInPortsComingFromOutsideOfCurrentScope () const |
List all input ports that are linked to out of scope ports. More... | |
std::list< InputDataStreamPort * > | getSetOfInputDataStreamPort () const |
std::list< OutputDataStreamPort * > | getSetOfOutputDataStreamPort () const |
InputDataStreamPort * | getInputDataStreamPort (const std::string &name) const throw (Exception) |
OutputDataStreamPort * | getOutputDataStreamPort (const std::string &name) const throw (Exception) |
std::vector< std::pair < OutPort *, InPort * > > | getSetOfInternalLinks () const |
virtual std::vector< std::pair < OutPort *, InPort * > > | getSetOfLinksLeavingCurrentScope () const |
void | checkConsistency (LinkInfo &info) const throw (Exception) |
virtual std::vector< std::pair < InPort *, OutPort * > > | getSetOfLinksComingInCurrentScope () const |
virtual void | edUpdateState () |
update the status of the node More... | |
ComposedNode * | getRootNode () const throw (Exception) |
bool | isNodeAlreadyAggregated (const Node *node) const |
Check that Node 'node' is already a direct son of this. More... | |
virtual bool | isNameAlreadyUsed (const std::string &name) const |
Node * | isInMyDescendance (Node *nodeToTest) const |
Returns the parent of a node that is the direct child of this node. More... | |
std::string | getChildName (const Node *node) const throw (Exception) |
virtual std::string | getMyQualifiedName (const Node *directSon) const |
Node * | getChildByName (const std::string &name) const throw (Exception) |
void | loaded () |
void | connected () |
virtual void | cleanNodes () |
Clean the composed node in case of not clean exit. More... | |
Public Member Functions inherited from YACS::ENGINE::Node | |
virtual | ~Node () |
Node * | clone (ComposedNode *father, bool editionOnly=true) const |
This method MUST NEVER BE VIRTUAL More... | |
Node * | cloneWithoutCompAndContDeepCpy (ComposedNode *father, bool editionOnly=true) const |
This method MUST NEVER BE VIRTUAL More... | |
void | setState (YACS::StatesForNode theState) |
Sets the given state for node. More... | |
virtual YACS::StatesForNode | getState () const |
virtual YACS::StatesForNode | getEffectiveState () const |
Return the node state in the context of its father. More... | |
virtual YACS::StatesForNode | getEffectiveState (const Node *) const |
Return the effective state of a node in the context of this one (its father) More... | |
std::string | getColorState (YACS::StatesForNode state) const |
Return the color associated to a state. More... | |
InGate * | getInGate () |
OutGate * | getOutGate () |
const std::string & | getName () const |
void | setName (const std::string &name) |
Change the name of the node. More... | |
ComposedNode * | getFather () const |
const std::string | getId () const |
bool | exIsControlReady () const |
std::list< Node * > | getOutNodes () const |
virtual void | exFailedState () |
Notify this node that its execution has failed. More... | |
virtual void | exDisabledState () |
Notify this node that it has been disabled. More... | |
std::list< InPort * > | getSetOfInPort () const |
std::list< OutPort * > | getSetOfOutPort () const |
virtual std::set< InputPort * > | edGetSetOfUnitializedInputPort () const |
Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency. More... | |
virtual bool | edAreAllInputPortInitialized () const |
Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency. More... | |
InPort * | getInPort (const std::string &name) const throw (Exception) |
InPropertyPort * | getInPropertyPort () const throw (Exception) |
std::list< ComposedNode * > | getAllAscendanceOf (ComposedNode *levelToStop=0) const |
bool | operator> (const Node &other) const |
bool | operator< (const Node &other) const |
std::string | getImplementation () const |
virtual void | setProperty (const std::string &name, const std::string &value) |
virtual std::string | getProperty (const std::string &name) |
std::map< std::string, std::string > | getProperties () |
std::map< std::string, std::string > | getPropertyMap () |
virtual void | setProperties (std::map< std::string, std::string > properties) |
virtual Proc * | getProc () |
virtual const Proc * | getProc () const |
std::string | getQualifiedName () const |
same as Node::getName() in most cases, but differs for children of switch More... | |
int | getNumId () |
return node instance identifiant, unique for each node instance More... | |
std::vector< std::pair < std::string, int > > | getDPLScopeInfo (ComposedNode *gfn) |
virtual void | applyDPLScope (ComposedNode *gfn) |
virtual void | sendEvent (const std::string &event) |
emit notification to all observers registered with the dispatcher More... | |
virtual void | sendEvent2 (const std::string &event, void *something) |
emit notification to all observers registered with the dispatcher More... | |
virtual std::string | getErrorDetails () const |
virtual void | setErrorDetails (const std::string &error) |
virtual void | modified () |
Sets Node in modified state and its father if it exists. More... | |
virtual int | isModified () |
virtual int | isValid () |
indicates if the node is valid (returns 1) or not (returns 0) More... | |
virtual std::string | getContainerLog () |
returns a string that contains the name of the container log file if it exists More... | |
virtual void | ensureLoading () |
Put this node into TOLOAD state when possible. More... | |
virtual void | getCoupledNodes (std::set< Task * > &coupledNodes) |
Public Member Functions inherited from YACS::ENGINE::Scheduler | |
virtual | ~Scheduler () |
Static Public Member Functions | |
static int | getFEDeltaBetween (OutPort *start, InPort *end) |
static void | InterceptorizeNameOfPort (std::string &portName) |
Static Public Attributes | |
static const char | NAME_OF_SPLITTERNODE [] ="splitter" |
static const char | INTERCEPTOR_STR [] ="_interceptor" |
Protected Member Functions | |
Node * | simpleClone (ComposedNode *father, bool editionOnly=true) const |
void | checkLinkPossibility (OutPort *start, const std::list< ComposedNode * > &pointsOfViewStart, InPort *end, const std::list< ComposedNode * > &pointsOfViewEnd) throw (Exception) |
YACS::Event | updateStateOnFinishedEventFrom (Node *node) |
Method used to notify the node that a child node has finished. More... | |
YACS::Event | updateStateForInitNodeOnFinishedEventFrom (Node *node, unsigned int id) |
YACS::Event | updateStateForWorkNodeOnFinishedEventFrom (Node *node, unsigned int id, bool isNormalFinish) |
YACS::Event | updateStateForFinalizeNodeOnFinishedEventFrom (Node *node, unsigned int id) |
YACS::Event | updateStateOnFailedEventFrom (Node *node, const Executor *execInst) |
Method used to notify the node that a child node has failed. More... | |
void | buildDelegateOf (std::pair< OutPort *, OutPort * > &port, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) |
void | getDelegateOf (std::pair< OutPort *, OutPort * > &port, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) throw (Exception) |
void | releaseDelegateOf (OutPort *portDwn, OutPort *portUp, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) throw (Exception) |
void | cleanDynGraph () |
void | pushAllSequenceValues () |
void | createOutputOutOfScopeInterceptors (int branchNb) |
void | prepareSequenceValues (int sizeOfSamples) |
OutPort * | getDynOutPortByAbsName (int branchNb, const std::string &name) |
void | storeOutValsInSeqForOutOfScopeUse (int rank, int branchNb) |
Protected Member Functions inherited from YACS::ENGINE::DynParaLoop | |
DynParaLoop (const std::string &name, TypeCode *typeOfDataSplitted) | |
virtual | ~DynParaLoop () |
DynParaLoop (const DynParaLoop &other, ComposedNode *father, bool editionOnly) | |
void | buildDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) |
void | checkCFLinks (const std::list< OutPort * > &starts, InputPort *end, unsigned char &alreadyFed, bool direction, LinkInfo &info) const |
check control flow links More... | |
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 | cleanDynGraph () |
void | prepareInputsFromOutOfScope (int branchNb) |
void | putValueOnBranch (Any *val, unsigned branchId, bool first) |
TypeOfNode | getIdentityOfNotifyerNode (const Node *node, unsigned &id) |
InputPort * | getDynInputPortByAbsName (int branchNb, const std::string &name, bool initNodeAdmitted) |
virtual void | forwardExecStateToOriginalBody (Node *execNode) |
std::vector< Node * > | cloneAndPlaceNodesCoherently (const std::vector< Node * > &origNodes) |
Clone nodes and make their placement consistent with the placement of the original ones. More... | |
Node * | checkConsistencyAndSetNode (Node *&nodeToReplace, Node *DISOWNnode) |
This method is used to factorize methods edSetNode, edSetInitNode and edSetFinalizeNode. More... | |
Node * | removeNode (Node *&nodeToRemove) |
This method is used to factorize methods edRemoveNode, edRemoveInitNode and edRemoveFinalizeNode. More... | |
virtual void | shutdown (int level) |
Stop all pending activities of the composed node. More... | |
Protected Member Functions inherited from YACS::ENGINE::ComposedNode | |
ComposedNode (const std::string &name) | |
ComposedNode (const ComposedNode &other, ComposedNode *father) | |
void | performDuplicationOfPlacement (const Node &other) |
performs a duplication of placement using clone method of containers and components. clone behaviour is driven by attachOnCloning attribute. More... | |
void | performShallowDuplicationOfPlacement (const Node &other) |
performs a also duplication of placement but here containers and components are not copied at all whatever the value of attachedOnCloning. More... | |
void | edDisconnectAllLinksWithMe () |
YACS::Event | updateStateFrom (Node *node, YACS::Event event, const Executor *execInst) |
Update node state on receiving event from a node. More... | |
virtual YACS::Event | updateStateOnStartEventFrom (Node *node) |
Method used to notify the node that a child node has started. More... | |
virtual void | getDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) throw (Exception) |
virtual void | releaseDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) throw (Exception) |
void | checkInMyDescendance (Node *nodeToTest) const throw (Exception) |
Check if a node is in the descendance of this node. More... | |
template<class PORT > | |
std::string | getPortName (const PORT *port) const throw (Exception) |
void | checkNoCrossHierachyWith (Node *node) const throw (Exception) |
virtual void | performCFComputations (LinkInfo &info) const |
perform recursively all CF computations. More... | |
virtual void | destructCFComputations (LinkInfo &info) const |
destroy recursively all results of initial computations. More... | |
Node * | getLowestNodeDealingAll (const std::list< OutPort * > &ports) const |
void | checkLinksCoherenceRegardingControl (const std::vector< OutPort * > &starts, InputPort *end, LinkInfo &info) const throw (Exception) |
void | solveObviousOrDelegateCFLinks (const std::list< OutPort * > &starts, InputPort *end, unsigned char &alreadyFed, bool direction, LinkInfo &info) const |
Protected Member Functions inherited from YACS::ENGINE::Node | |
Node (const std::string &name) | |
Node (const Node &other, ComposedNode *father) | |
virtual void | exForwardFailed () |
virtual void | exForwardFinished () |
Protected Attributes | |
int | _currentIndex |
SplitterNode | _splitterNode |
FakeNodeForForEachLoop * | _nodeForSpecialCases |
std::vector< AnySplitOutputPort * > | _outGoingPorts |
std::vector < InterceptorInputPort * > | _intecptrsForOutGoingPorts |
ports linked to node outside the current scope More... | |
unsigned | _execCurrentId |
ports created for TypeCodes correctness More... | |
std::vector< SequenceAny * > | _execVals |
std::vector< std::vector < AnyInputPort * > > | _execOutGoingPorts |
ForEachLoopPassedData * | _passedData |
Protected Attributes inherited from YACS::ENGINE::DynParaLoop | |
Node * | _node |
Node * | _initNode |
Node * | _finalizeNode |
unsigned | _nbOfEltConsumed |
std::vector< int > | _execIds |
AnyInputPort | _nbOfBranches |
AnyOutputPort | _splittedPort |
std::vector< Node * > | _execNodes |
std::vector< Node * > | _execInitNodes |
std::vector< Node * > | _execFinalizeNodes |
int | _initializingCounter |
int | _unfinishedCounter |
int | _failedCounter |
Static Protected Attributes | |
static const int | NOT_RUNNING_BRANCH_ID =-1 |
Static Protected Attributes inherited from YACS::ENGINE::DynParaLoop | |
static const char | NAME_OF_SPLITTED_SEQ_OUT [] = "evalSamples" |
static const char | OLD_NAME_OF_SPLITTED_SEQ_OUT [] = "SmplPrt" |
static const char | NAME_OF_NUMBER_OF_BRANCHES [] ="nbBranches" |
Static Protected Attributes inherited from YACS::ENGINE::ComposedNode | |
static const char | SEP_CHAR_BTW_LEVEL [] ="." |
static const unsigned char | FED_ST = 2 |
static const unsigned char | FREE_ST = 0 |
static const unsigned char | FED_DS_ST = 1 |
Static Protected Attributes inherited from YACS::ENGINE::Node | |
static const char | SEP_CHAR_IN_PORT [] ="." |
static int | _total = 0 |
Private Member Functions | |
int | getFinishedId () |
Friends | |
class | SplitterNode |
class | FakeNodeForForEachLoop |
Additional Inherited Members | |
Public Attributes inherited from YACS::ENGINE::Node | |
YACS::Colour | _colour |
Protected Types inherited from YACS::ENGINE::DynParaLoop | |
enum | TypeOfNode { INIT_NODE = 5, WORK_NODE = 6, FINALIZE_NODE = 7 } |
Static Protected Member Functions inherited from YACS::ENGINE::ComposedNode | |
static bool | splitNamesBySep (const std::string &globalName, const char separator[], std::string &firstPart, std::string &lastPart, bool priority) throw (Exception) |
Splits name globalName in 2 parts using separator. More... | |
Loop node for parametric calculation.
Definition at line 153 of file ForEachLoop.hxx.
ForEachLoop::ForEachLoop | ( | const std::string & | name, |
TypeCode * | typeOfDataSplitted | ||
) |
ForEachLoop::ForEachLoop | ( | const ForEachLoop & | other, |
ComposedNode * | father, | ||
bool | editionOnly | ||
) |
Definition at line 470 of file ForEachLoop.cxx.
References _intecptrsForOutGoingPorts, _outGoingPorts, YACS::ENGINE::AnySplitOutputPort::addRepr(), getOutPort(), YACS::ENGINE::ComposedNode::getOutPortName(), CORBAEngineTest::i, and YACS::ENGINE::InterceptorInputPort::setRepr().
ForEachLoop::~ForEachLoop | ( | ) |
Definition at line 492 of file ForEachLoop.cxx.
References _intecptrsForOutGoingPorts, _outGoingPorts, _passedData, and cleanDynGraph().
|
virtual |
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 1085 of file ForEachLoop.cxx.
References YACS::ENGINE::Visitor::visitForEachLoop().
void ForEachLoop::assignPassedResults | ( | const std::vector< unsigned int > & | passedIds, |
const std::vector< SequenceAny * > & | passedOutputs, | ||
const std::vector< std::string > & | nameOfOutputs | ||
) |
This method is typically useful for post-mortem relaunch to avoid to recompute already passed cases. This method takes in input exactly the parameters retrieved by getPassedResults method.
Definition at line 1201 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::_failedCounter, and _passedData.
Referenced by YACS::ENGINE::nodeParser::onEnd().
|
protectedvirtual |
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 905 of file ForEachLoop.cxx.
References _intecptrsForOutGoingPorts, _outGoingPorts, YACS::ENGINE::AnySplitOutputPort::addRepr(), YACS::ENGINE::DynParaLoop::buildDelegateOf(), YACS::ENGINE::DataPort::edGetType(), getFEDeltaBetween(), YACS::ENGINE::ComposedNode::getPortName(), CORBAEngineTest::i, InterceptorizeNameOfPort(), YACS::ENGINE::OutputPort::NAME, YACS::ENGINE::TypeCode::sequenceTc(), YACS::ENGINE::InterceptorInputPort::setRepr(), and YACS::ENGINE::TypeCode::subContentType().
|
protectedvirtual |
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 1066 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::checkLinkPossibility().
Implements YACS::ENGINE::ComposedNode.
Definition at line 665 of file ForEachLoop.cxx.
|
protected |
Definition at line 1002 of file ForEachLoop.cxx.
References _execOutGoingPorts, _execVals, and YACS::ENGINE::DynParaLoop::cleanDynGraph().
Referenced by init(), resetState(), and ~ForEachLoop().
|
protected |
Definition at line 1049 of file ForEachLoop.cxx.
References _execOutGoingPorts, _outGoingPorts, DEBTRACE, getDynOutPortByAbsName(), YACS::ENGINE::ComposedNode::getOutPortName(), and CORBAEngineTest::i.
Referenced by exUpdateState().
|
inline |
Definition at line 189 of file ForEachLoop.hxx.
Referenced by YACS::HMI::EditionForEachLoop::onModifyCollection().
void ForEachLoop::exUpdateProgress | ( | ) |
Definition at line 632 of file ForEachLoop.cxx.
References YACS::ENGINE::Node::sendEvent().
Referenced by init(), updateStateForFinalizeNodeOnFinishedEventFrom(), and updateStateForWorkNodeOnFinishedEventFrom().
|
virtual |
Update the node state.
Called by InGate::exNotifyFromPrecursor
Reimplemented from YACS::ENGINE::Node.
Definition at line 514 of file ForEachLoop.cxx.
References _execCurrentId, YACS::ENGINE::DynParaLoop::_execFinalizeNodes, YACS::ENGINE::DynParaLoop::_execIds, YACS::ENGINE::DynParaLoop::_execInitNodes, YACS::ENGINE::DynParaLoop::_execNodes, _execOutGoingPorts, _execVals, YACS::ENGINE::DynParaLoop::_finalizeNode, YACS::ENGINE::Node::_inGate, YACS::ENGINE::DynParaLoop::_initializingCounter, YACS::ENGINE::DynParaLoop::_initNode, YACS::ENGINE::DynParaLoop::_nbOfBranches, YACS::ENGINE::DynParaLoop::_nbOfEltConsumed, YACS::ENGINE::DynParaLoop::_node, _nodeForSpecialCases, _passedData, _splitterNode, YACS::ENGINE::Node::_state, YACS::ACTIVATED, YACS::ENGINE::ForEachLoopPassedData::assignAlreadyDone(), YACS::ENGINE::ForEachLoopPassedData::checkCompatibilyWithNb(), YACS::ENGINE::ForEachLoopPassedData::checkLevel2(), YACS::ENGINE::DynParaLoop::cloneAndPlaceNodesCoherently(), createOutputOutOfScopeInterceptors(), DEBTRACE, YACS::DISABLED, YACS::DONE, YACS::ERROR, YACS::ENGINE::Node::exForwardFailed(), YACS::ENGINE::InGate::exIsReady(), FakeNodeForForEachLoop, YACS::ENGINE::DynParaLoop::forwardExecStateToOriginalBody(), YACS::ENGINE::ComposedNode::getAllOutPortsLeavingCurrentScope(), YACS::ENGINE::AnyInputPort::getIntValue(), YACS::ENGINE::SplitterNode::getNumberOfElements(), YACS::ENGINE::ForEachLoopPassedData::getNumberOfEltsAlreadyDone(), CORBAEngineTest::i, YACS::ENGINE::DynParaLoop::prepareInputsFromOutOfScope(), prepareSequenceValues(), YACS::ENGINE::SplitterNode::putSplittedValueOnRankTo(), YACS::ENGINE::Node::setState(), YACS::ENGINE::ForEachLoopPassedData::toAbsId(), and YACS::Exception::what().
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 716 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::getChildByShortName().
Referenced by YACS::looptypeParser< T >::foreach(), YACS::casetypeParser::foreach(), and YACS::bloctypeParser< T >::foreach().
|
inline |
|
protectedvirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 949 of file ForEachLoop.cxx.
References YACS::ENGINE::OutputPort::NAME.
|
protected |
Definition at line 993 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::_execNodes, YACS::ENGINE::ComposedNode::getChildByName(), YACS::ENGINE::Node::SEP_CHAR_IN_PORT, and YACS::ENGINE::ComposedNode::splitNamesBySep().
Referenced by createOutputOutOfScopeInterceptors().
|
inline |
Definition at line 186 of file ForEachLoop.hxx.
Definition at line 1208 of file ForEachLoop.cxx.
References YACS::ENGINE::Node::getFather(), YACS::ENGINE::ComposedNode::getLowestCommonAncestor(), YACS::ENGINE::Port::getNode(), and PMMLBasicsTestLauncher::ret.
Referenced by buildDelegateOf().
|
private |
Definition at line 1025 of file ForEachLoop.cxx.
References _passedData, _splitterNode, YACS::ENGINE::SplitterNode::getNumberOfElements(), and YACS::ENGINE::ForEachLoopPassedData::getNumberOfElementsToDo().
Referenced by updateStateForWorkNodeOnFinishedEventFrom().
Get an input port given its name.
Contrary to YACS::ENGINE::ComposedNode::getOutputPort, this method is NOT recursive and so the leaf of type ElementaryNode aggregating this InputPort is directly invoked.
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 688 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::getInputPort(), and YACS::ENGINE::SplitterNode::NAME_OF_SEQUENCE_INPUT.
Referenced by YACS::ENGINE::portParser::onEnd().
|
virtual |
redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 681 of file ForEachLoop.cxx.
References YACS::ENGINE::SplitterNode::_dataPortToDispatch, _splitterNode, YACS::ENGINE::DynParaLoop::getLocalInputPorts(), and PMMLBasicsTestLauncher::ret.
Referenced by YACS::ENGINE::VisitorSalomeSaveState::visitForEachLoop().
|
virtual |
redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 1078 of file ForEachLoop.cxx.
References getOutputPort(), YACS::ENGINE::DynParaLoop::NAME_OF_SPLITTED_SEQ_OUT, and PMMLBasicsTestLauncher::ret.
int ForEachLoop::getNbOfElementsToBeProcessed | ( | ) | const |
Definition at line 1156 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::_finalizeNode, YACS::ENGINE::DynParaLoop::_initNode, YACS::ENGINE::DynParaLoop::_nbOfBranches, _splitterNode, YACS::ENGINE::AnyInputPort::getIntValue(), and YACS::ENGINE::SplitterNode::getNumberOfElements().
Referenced by getProgress(), and getProgressWeight().
|
virtual |
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 660 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::getNumberOfInputPorts().
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 706 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::getOutPort().
Referenced by ForEachLoop().
|
virtual |
Get an output port given its name.
Contrary to YACS::ENGINE::ComposedNode::getInputPort, this method is recursive and go down hierarchy step by step to complete its work.
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 696 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::getOutputPort().
Referenced by getLocalOutputPorts().
const YACS::ENGINE::TypeCode * ForEachLoop::getOutputPortType | ( | const std::string & | portName | ) | const |
portName | : "interceptorized" name of port. |
Definition at line 1258 of file ForEachLoop.cxx.
References _outGoingPorts, YACS::ENGINE::TypeCode::contentType(), DEBTRACE, YACS::ENGINE::ComposedNode::getPortName(), and PMMLBasicsTestLauncher::ret.
Referenced by YACS::ENGINE::nodeParser::onEnd().
std::vector< unsigned int > ForEachLoop::getPassedResults | ( | Executor * | execut, |
std::vector< SequenceAny * > & | outputs, | ||
std::vector< std::string > & | nameOfOutputs | ||
) | const |
This method allows to retrieve the state of this during execution or after. This method works even if this is NOT complete, or during execution or after a failure in this. The typical usage of this method is to retrieve the results of items that passed successfully to avoid to lose all of them if only one fails. This method has one input execut and 3 outputs.
[in] | execut | - The single input is for threadsafety reasons because this method can be called safely during the execution of this. |
[out] | outputs | - For each output ports in this linked with nodes sharing the same father than this the passed results are stored. All of the items in outputs have the same size. |
[out] | nameOfOutputs | - The array with same size than outputs, that tells for each item in outputs the output port it refers to. |
this->edGetSeqOfSamplesPort()
that run successfully. The length of this returned array will be the length of all SequenceAny objects contained in outputs.Definition at line 1178 of file ForEachLoop.cxx.
References _execOutGoingPorts, _execVals, YACS::ENGINE::Executor::getTheMutexForSchedulerUpdate(), and CORBAEngineTest::i.
ForEachLoopPassedData * ForEachLoop::getProcessedData | ( | ) | const |
This method is used to obtain the values already processed by the ForEachLoop. A new ForEachLoopPassedData object is returned. You have to delete it.
Definition at line 1230 of file ForEachLoop.cxx.
References _execOutGoingPorts, _execVals, and CORBAEngineTest::i.
Referenced by YACS::ENGINE::VisitorSalomeSaveState::visitForEachLoop().
|
virtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 1121 of file ForEachLoop.cxx.
References _currentIndex, and getNbOfElementsToBeProcessed().
|
virtual |
Get the progress weight for all elementary nodes.
Only elementary nodes have weight. For each node in the loop, the weight done is multiplied by the number of elements done and the weight total by the number total of elements
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 1137 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::edGetDirectDescendants(), getCurrentIndex(), getNbOfElementsToBeProcessed(), and PMMLBasicsTestLauncher::ret.
|
virtual |
Implements YACS::ENGINE::Node.
Definition at line 638 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::_execFinalizeNodes, YACS::ENGINE::DynParaLoop::_execInitNodes, YACS::ENGINE::DynParaLoop::_execNodes, YACS::ENGINE::DynParaLoop::_node, _nodeForSpecialCases, YACS::ENGINE::Node::_state, YACS::ACTIVATED, YACS::ENGINE::ElementaryNode::getReadyTasks(), YACS::ENGINE::Node::setState(), and YACS::TOACTIVATE.
|
virtual |
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 674 of file ForEachLoop.cxx.
References YACS::ENGINE::SplitterNode::_dataPortToDispatch, _splitterNode, YACS::ENGINE::DynParaLoop::getSetOfInputPort(), and PMMLBasicsTestLauncher::ret.
|
virtual |
initialisation of all input and output ports and gates, for execution
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 502 of file ForEachLoop.cxx.
References _currentIndex, _execCurrentId, _passedData, _splitterNode, cleanDynGraph(), exUpdateProgress(), YACS::ENGINE::DynParaLoop::init(), YACS::ENGINE::SplitterNode::init(), and YACS::ENGINE::ForEachLoopPassedData::init().
|
static |
Definition at line 899 of file ForEachLoop.cxx.
References INTERCEPTOR_STR.
Referenced by buildDelegateOf().
|
protected |
Definition at line 1033 of file ForEachLoop.cxx.
References _execVals, _outGoingPorts, CORBAEngineTest::i, and YACS::ENGINE::SequenceAny::New().
Referenced by exUpdateState().
|
protected |
Definition at line 1041 of file ForEachLoop.cxx.
References _execVals, _outGoingPorts, and CORBAEngineTest::i.
Referenced by YACS::ENGINE::FakeNodeForForEachLoop::execute(), and updateStateForWorkNodeOnFinishedEventFrom().
|
protectedvirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 970 of file ForEachLoop.cxx.
References YACS::ENGINE::OutputPort::NAME, and p.
|
virtual |
Reset the state of the node and its children depending on the parameter level.
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 1112 of file ForEachLoop.cxx.
References _execCurrentId, cleanDynGraph(), and YACS::ENGINE::ComposedNode::resetState().
|
virtual |
void ForEachLoop::setProcessedData | ( | ForEachLoopPassedData * | processedData | ) |
Definition at line 1248 of file ForEachLoop.cxx.
References _passedData.
|
protectedvirtual |
Implements YACS::ENGINE::Node.
Definition at line 487 of file ForEachLoop.cxx.
References ForEachLoop().
|
protected |
Definition at line 1014 of file ForEachLoop.cxx.
References _execOutGoingPorts, _execVals, and CORBAEngineTest::i.
Referenced by updateStateForWorkNodeOnFinishedEventFrom().
|
inlinevirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 197 of file ForEachLoop.hxx.
|
protected |
Definition at line 868 of file ForEachLoop.cxx.
References _currentIndex, YACS::ENGINE::DynParaLoop::_finalizeNode, YACS::ENGINE::DynParaLoop::_unfinishedCounter, DEBTRACE, YACS::DONE, exUpdateProgress(), YACS::FINISH, YACS::NOEVENT, and YACS::ENGINE::Node::setState().
Referenced by updateStateOnFinishedEventFrom().
|
protected |
Definition at line 749 of file ForEachLoop.cxx.
References _currentIndex, YACS::ENGINE::DynParaLoop::_execNodes, YACS::ENGINE::DynParaLoop::_initializingCounter, YACS::ENGINE::DynParaLoop::_initNode, YACS::ENGINE::DynParaLoop::_nbOfEltConsumed, YACS::DONE, YACS::NOEVENT, and YACS::ENGINE::Node::setState().
Referenced by updateStateOnFinishedEventFrom().
|
protected |
[in] | isNormalFinish | - if true |
Definition at line 763 of file ForEachLoop.cxx.
References _currentIndex, _execCurrentId, YACS::ENGINE::DynParaLoop::_execFinalizeNodes, YACS::ENGINE::DynParaLoop::_execIds, YACS::ENGINE::DynParaLoop::_failedCounter, YACS::ENGINE::DynParaLoop::_finalizeNode, YACS::ENGINE::DynParaLoop::_nbOfEltConsumed, YACS::ENGINE::DynParaLoop::_node, _passedData, _splitterNode, YACS::ENGINE::Node::_state, YACS::ENGINE::DynParaLoop::_unfinishedCounter, YACS::ABORT, YACS::ACTIVATED, DEBTRACE, YACS::DONE, YACS::ERROR, YACS::ENGINE::Node::exForwardFailed(), exUpdateProgress(), YACS::ENGINE::Node::exUpdateState(), YACS::FAILED, YACS::FINISH, YACS::ENGINE::DynParaLoop::forwardExecStateToOriginalBody(), YACS::ENGINE::ComposedNode::getAllRecursiveConstituents(), getFinishedId(), CORBAEngineTest::i, YACS::ENGINE::Node::init(), YACS::ENGINE::ComposedNode::isFinished(), YACS::NOEVENT, NOT_RUNNING_BRANCH_ID, pushAllSequenceValues(), YACS::ENGINE::SplitterNode::putSplittedValueOnRankTo(), YACS::ENGINE::Node::sendEvent2(), YACS::ENGINE::Node::setState(), storeOutValsInSeqForOutOfScopeUse(), YACS::ENGINE::ForEachLoopPassedData::toAbsId(), YACS::Exception::what(), and YASSERT.
Referenced by updateStateOnFailedEventFrom(), and updateStateOnFinishedEventFrom().
|
protectedvirtual |
Method used to notify the node that a child node has failed.
Update the current state and return the change state
node | : the child node that has failed |
Reimplemented from YACS::ENGINE::DynParaLoop.
Definition at line 885 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::_failedCounter, YACS::ENGINE::DynParaLoop::getIdentityOfNotifyerNode(), YACS::ENGINE::Executor::getKeepGoingProperty(), updateStateForWorkNodeOnFinishedEventFrom(), YACS::ENGINE::DynParaLoop::updateStateOnFailedEventFrom(), and YACS::ENGINE::DynParaLoop::WORK_NODE.
|
protectedvirtual |
Method used to notify the node that a child node has finished.
Update the current state and return the change state
node | : the child node that has finished |
Implements YACS::ENGINE::ComposedNode.
Definition at line 731 of file ForEachLoop.cxx.
References DEBTRACE, YACS::ENGINE::DynParaLoop::FINALIZE_NODE, YACS::ENGINE::DynParaLoop::getIdentityOfNotifyerNode(), YACS::ENGINE::Node::getName(), YACS::ENGINE::Node::getState(), YACS::ENGINE::DynParaLoop::INIT_NODE, YACS::NOEVENT, updateStateForFinalizeNodeOnFinishedEventFrom(), updateStateForInitNodeOnFinishedEventFrom(), updateStateForWorkNodeOnFinishedEventFrom(), YACS::ENGINE::DynParaLoop::WORK_NODE, and YASSERT.
|
virtual |
Dump the node state to a stream.
os | : the output stream |
Reimplemented from YACS::ENGINE::Node.
Definition at line 1094 of file ForEachLoop.cxx.
References YACS::ENGINE::DynParaLoop::_node, YACS::ENGINE::Node::getColorState(), YACS::ENGINE::Node::getEffectiveState(), YACS::ENGINE::Node::getId(), YACS::ENGINE::ComposedNode::getName(), CORBAEngineTest::state, and YACS::ENGINE::Node::writeDot().
|
friend |
Definition at line 156 of file ForEachLoop.hxx.
Referenced by exUpdateState().
|
friend |
Definition at line 155 of file ForEachLoop.hxx.
|
protected |
Definition at line 163 of file ForEachLoop.hxx.
Referenced by getProgress(), init(), updateStateForFinalizeNodeOnFinishedEventFrom(), updateStateForInitNodeOnFinishedEventFrom(), and updateStateForWorkNodeOnFinishedEventFrom().
|
protected |
ports created for TypeCodes correctness
Definition at line 169 of file ForEachLoop.hxx.
Referenced by exUpdateState(), init(), resetState(), and updateStateForWorkNodeOnFinishedEventFrom().
|
protected |
Definition at line 171 of file ForEachLoop.hxx.
Referenced by cleanDynGraph(), createOutputOutOfScopeInterceptors(), exUpdateState(), getPassedResults(), getProcessedData(), and storeOutValsInSeqForOutOfScopeUse().
|
protected |
Definition at line 170 of file ForEachLoop.hxx.
Referenced by cleanDynGraph(), exUpdateState(), getPassedResults(), getProcessedData(), prepareSequenceValues(), pushAllSequenceValues(), and storeOutValsInSeqForOutOfScopeUse().
|
protected |
ports linked to node outside the current scope
Definition at line 167 of file ForEachLoop.hxx.
Referenced by buildDelegateOf(), ForEachLoop(), and ~ForEachLoop().
|
protected |
Definition at line 165 of file ForEachLoop.hxx.
Referenced by exUpdateState(), and getReadyTasks().
|
protected |
Definition at line 166 of file ForEachLoop.hxx.
Referenced by buildDelegateOf(), createOutputOutOfScopeInterceptors(), ForEachLoop(), getOutputPortType(), prepareSequenceValues(), pushAllSequenceValues(), and ~ForEachLoop().
|
protected |
Definition at line 172 of file ForEachLoop.hxx.
Referenced by assignPassedResults(), exUpdateState(), getFinishedId(), init(), setProcessedData(), updateStateForWorkNodeOnFinishedEventFrom(), and ~ForEachLoop().
|
protected |
Definition at line 164 of file ForEachLoop.hxx.
Referenced by exUpdateState(), getFinishedId(), getLocalInputPorts(), getNbOfElementsToBeProcessed(), getSetOfInputPort(), init(), and updateStateForWorkNodeOnFinishedEventFrom().
|
static |
Definition at line 234 of file ForEachLoop.hxx.
Referenced by InterceptorizeNameOfPort().
|
static |
Definition at line 159 of file ForEachLoop.hxx.
Referenced by YACS::ENGINE::VisitorSaveSchema::writeSimpleDataLinks().
|
staticprotected |
Definition at line 161 of file ForEachLoop.hxx.
Referenced by updateStateForWorkNodeOnFinishedEventFrom().