Composed node to group elementary and composed nodes. More...
#include <Bloc.hxx>


Public Member Functions | |
| Bloc (const Bloc &other, ComposedNode *father, bool editionOnly) | |
| Bloc (const std::string &name) | |
| Create a Bloc node with a given name. More... | |
| virtual | ~Bloc () |
| bool | isFinished () |
| Indicate if the bloc execution is finished. More... | |
| int | getNumberOfCFLinks () const |
| void | init (bool start=true) |
| Initialize the bloc. More... | |
| void | getReadyTasks (std::vector< Task * > &tasks) |
| Collect all nodes that are ready to execute. More... | |
| void | exUpdateState () |
| Update the bloc state. More... | |
| bool | edAddChild (Node *DISOWNnode) |
| Add a child node to the bloc. More... | |
| void | edRemoveChild (Node *node) |
| std::list< Node * > | getChildren () const |
| std::list< Node * > | edGetDirectDescendants () const |
| std::vector< std::list< Node * > > | splitIntoIndependantGraph () const |
| Node * | getChildByShortName (const std::string &name) const |
| virtual void | writeDot (std::ostream &os) const |
| Dump to the input stream a dot representation of the node. More... | |
| void | accept (Visitor *visitor) |
| template<bool direction> | |
| void | findAllPathsStartingFrom (Node *start, std::list< std::vector< Node * > > &vec, std::map< Node *, std::set< Node * > > &accelStr) const |
| template<bool direction> | |
| void | findAllNodesStartingFrom (Node *start, std::set< Node * > &result, std::map< Node *, std::set< Node * > > &accelStr, LinkInfo &info) const |
| virtual std::string | typeName () |
| int | getMaxLevelOfParallelism () const |
| void | getWeightRegardingDPL (ComplexWeight *weight) |
| void | removeRecursivelyRedundantCL () |
| void | partitionRegardingDPL (const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap) |
| void | fitToPlayGround (const PlayGround *pg) |
| void | propagePlayGround (const PlayGround *pg) |
Public Member Functions inherited from YACS::ENGINE::StaticDefinedComposedNode | |
| bool | isPlacementPredictableB4Run () const |
| bool | isMultiplicitySpecified (unsigned &value) const |
| void | forceMultiplicity (unsigned value) |
| void | selectRunnableTasks (std::vector< Task * > &tasks) |
Public Member Functions inherited from YACS::ENGINE::ComposedNode | |
| virtual | ~ComposedNode () |
| bool | isFinished () |
| void | init (bool start=true) |
| virtual void | shutdown (int level) |
| Stop all pending activities of the composed node. More... | |
| virtual void | resetState (int level) |
| Reset the state of the node and its children depending on the parameter level. More... | |
| 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 |
| 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) |
| Add a dataflow link between two data ports. More... | |
| virtual bool | edAddDFLink (OutPort *start, InPort *end) |
| Connect an OutPort to an InPort and add the necessary control link. More... | |
| bool | edAddLink (OutGate *start, InGate *end) |
| Add a controlflow link between two control ports. More... | |
| bool | edAddCFLink (Node *nodeS, Node *nodeE) |
| Add a controlflow link between two nodes. More... | |
| void | edRemoveCFLink (Node *nodeS, Node *nodeE) |
| Remove a controlflow link. More... | |
| void | edRemoveLink (OutPort *start, InPort *end) |
| Remove a dataflow link. More... | |
| void | edRemoveLink (OutGate *start, InGate *end) |
| Remove a controlflow link. More... | |
| virtual bool | isRepeatedUnpredictablySeveralTimes () const |
| virtual bool | isLoop () const |
| 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::list< ProgressWeight > | getProgressWeight () const |
| Get the progress weight for all elementary nodes. More... | |
| std::string | getInPortName (const InPort *) const |
| Get the input port name. More... | |
| std::string | getOutPortName (const OutPort *) const |
| int | getNumberOfInputPorts () const |
| int | getNumberOfOutputPorts () const |
| std::list< InputPort * > | getSetOfInputPort () const |
| std::list< OutputPort * > | getSetOfOutputPort () const |
| std::list< InputPort * > | getLocalInputPorts () const |
| redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself More... | |
| std::list< OutputPort * > | getLocalOutputPorts () const |
| redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself More... | |
| 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 |
| OutPort * | getOutPort (const std::string &name) const |
| InputPort * | getInputPort (const std::string &name) const |
| Get an input port given its name. More... | |
| OutputPort * | getOutputPort (const std::string &name) const |
| Get an output port given its name. More... | |
| InputDataStreamPort * | getInputDataStreamPort (const std::string &name) const |
| OutputDataStreamPort * | getOutputDataStreamPort (const std::string &name) const |
| std::vector< std::pair< OutPort *, InPort * > > | getSetOfInternalLinks () const |
| virtual std::vector< std::pair< OutPort *, InPort * > > | getSetOfLinksLeavingCurrentScope () const |
| void | checkConsistency (LinkInfo &info) const |
| virtual std::vector< std::pair< InPort *, OutPort * > > | getSetOfLinksComingInCurrentScope () const |
| virtual void | edUpdateState () |
| update the status of the node More... | |
| virtual void | checkBasicConsistency () const |
| virtual std::string | getErrorReport () |
| returns a string that contains an error report if the node is in error More... | |
| ComposedNode * | getRootNode () const |
| bool | isNodeAlreadyAggregated (const Node *node) const |
| Check that Node 'node' is already a direct son of this. More... | |
| 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 |
| virtual std::string | getMyQualifiedName (const Node *directSon) const |
| Node * | getChildByName (const std::string &name) const |
| void | loaded () |
| void | connected () |
| void | accept (Visitor *visitor) |
| virtual void | cleanNodes () |
| Clean the composed node in case of not clean exit. More... | |
| virtual std::string | getProgress () const |
| void | setProperty (const std::string &name, const std::string &value) override |
| std::string | getProperty (const std::string &name) override |
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 |
| void | writeDotInFile (const std::string &fileName) 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 |
| InPropertyPort * | getInPropertyPort () const |
| std::list< ComposedNode * > | getAllAscendanceOf (ComposedNode *levelToStop=0) const |
| bool | operator> (const Node &other) const |
| bool | operator< (const Node &other) const |
| std::string | getImplementation () const |
| DynParaLoop * | getClosestDPLAmongAncestors () const |
| 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 () |
Protected Member Functions | |
| Node * | simpleClone (ComposedNode *father, bool editionOnly=true) const |
| bool | areAllSubNodesFinished () const |
| bool | areAllSubNodesDone () const |
| bool | isNameAlreadyUsed (const std::string &name) const |
| void | checkNoCyclePassingThrough (Node *node) |
| std::vector< std::pair< OutGate *, InGate * > > | getSetOfInternalCFLinks () const |
| YACS::Event | updateStateOnFinishedEventFrom (Node *node) |
| YACS::Event | updateStateOnFailedEventFrom (Node *node, const Executor *execInst) |
| Notify this bloc that a node has failed. More... | |
| void | initComputation () const |
| void | performCFComputationsOnlyOneLevel (LinkInfo &info) const |
| void | performCFComputations (LinkInfo &info) const |
| void | destructCFComputations (LinkInfo &info) const |
| destroy recursively all results of initial computations. 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 |
| bool | areLinked (Node *start, Node *end, bool fw) const |
| Check if two nodes are linked. More... | |
| bool | arePossiblyRunnableAtSameTime (Node *start, Node *end) const |
| Check if two nodes can run in parallel. More... | |
| void | checkCFLinks (const std::list< OutPort * > &starts, InputPort *end, unsigned char &alreadyFed, bool direction, LinkInfo &info) const |
| Check control flow links. More... | |
| void | seekOkAndUseless1 (std::vector< Node * > &okAndUseless1, std::set< Node * > &allNodes) const |
| void | seekUseless2 (std::vector< Node * > &useless2, std::set< Node * > &allNodes) const |
Protected Member Functions inherited from YACS::ENGINE::StaticDefinedComposedNode | |
| StaticDefinedComposedNode (const std::string &name) | |
| StaticDefinedComposedNode (const StaticDefinedComposedNode &other, ComposedNode *father) | |
| 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 |
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 | checkLinkPossibility (OutPort *start, const std::list< ComposedNode * > &pointsOfViewStart, InPort *end, const std::list< ComposedNode * > &pointsOfViewEnd) |
| virtual void | buildDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) |
| virtual void | buildDelegateOf (std::pair< OutPort *, OutPort * > &port, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) |
| virtual void | getDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) |
| virtual void | getDelegateOf (std::pair< OutPort *, OutPort * > &port, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) |
| virtual void | releaseDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) |
| virtual void | releaseDelegateOf (OutPort *portDwn, OutPort *portUp, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) |
| void | checkInMyDescendance (Node *nodeToTest) const |
| Check if a node is in the descendance of this node. More... | |
| template<class PORT > | |
| std::string | getPortName (const PORT *port) const |
| void | checkNoCrossHierachyWith (Node *node) const |
| Node * | getLowestNodeDealingAll (const std::list< OutPort * > &ports) const |
| void | checkLinksCoherenceRegardingControl (const std::vector< OutPort * > &starts, InputPort *end, LinkInfo &info) const |
| 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 () |
Static Protected Member Functions | |
| static void | verdictForOkAndUseless1 (const std::map< Node *, std::list< OutPort * > > &pool, InputPort *end, const std::vector< Node * > &candidates, unsigned char &alreadyFed, bool direction, LinkInfo &info) |
| static void | verdictForCollapses (const std::map< Node *, std::list< OutPort * > > &pool, InputPort *end, const std::set< Node * > &candidates, unsigned char &alreadyFed, bool direction, LinkInfo &info) |
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) |
| Splits name globalName in 2 parts using separator. More... | |
Static Protected Member Functions inherited from YACS::ENGINE::Node | |
| static void | checkValidityOfPortName (const std::string &name) |
| static ComposedNode * | checkHavingCommonFather (Node *node1, Node *node2) |
Protected Attributes | |
| std::list< Node * > | _setOfNode |
| std::map< Node *, std::set< Node * > > * | _fwLinks |
| For internal calculations. More... | |
| std::map< Node *, std::set< Node * > > * | _bwLinks |
| For internal calculations. More... | |
Protected Attributes inherited from YACS::ENGINE::Node | |
| InGate | _inGate |
| OutGate | _outGate |
| InPropertyPort * | _inPropertyPort |
| std::string | _name |
| ComposedNode * | _father |
| YACS::StatesForNode | _state |
| int | _modified |
| std::string | _errorDetails |
| int | _numId |
| std::string | _implementation |
| std::map< std::string, std::string > | _propertyMap |
| Node * | _eventReceiver =nullptr |
Private Member Functions | |
| std::list< AbstractPoint * > | analyzeParallelism () const |
Static Private Member Functions | |
| static void | findUselessLinksIn (const std::list< std::vector< Node * > > &res, LinkInfo &info) |
| template<bool direction> | |
| static unsigned | appendIfAlreadyFound (std::list< std::vector< Node * > > &res, const std::vector< Node * > &startRes, Node *node, std::map< Node *, std::set< Node * > > &fastFinder) |
| static void | updateWithNewFind (const std::vector< Node * > &path, std::map< Node *, std::set< Node * > > &fastFinder) |
Additional Inherited Members | |
Static Public Member Functions inherited from YACS::ENGINE::ComposedNode | |
| static ComposedNode * | getLowestCommonAncestor (Node *node1, Node *node2) |
| Retrieves the lowest common ancestor of 2 nodes. More... | |
| static std::string | getLowestCommonAncestorStr (const std::string &node1, const std::string &node2) |
Static Public Member Functions inherited from YACS::ENGINE::Node | |
| static std::string | getStateName (YACS::StatesForNode state) |
| Return the name of a state. More... | |
| static void | checkValidityOfNodeName (const std::string &name) |
Public Attributes inherited from YACS::ENGINE::Node | |
| YACS::Colour | _colour |
Static Public Attributes inherited from YACS::ENGINE::ComposedNode | |
| static const char | SEP_CHAR_BTW_LEVEL [] ="." |
Static Public Attributes inherited from YACS::ENGINE::Node | |
| static std::map< int, Node * > | idMap |
Static Protected Attributes inherited from YACS::ENGINE::ComposedNode | |
| 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 |
| Bloc::Bloc | ( | const Bloc & | other, |
| ComposedNode * | father, | ||
| bool | editionOnly | ||
| ) |
Definition at line 48 of file Bloc.cxx.
References _setOfNode, YACS::ENGINE::ComposedNode::edAddCFLink(), YACS::ENGINE::ComposedNode::edAddLink(), YACS::ENGINE::ComposedNode::getChildByName(), YACS::ENGINE::ComposedNode::getChildName(), YACS::ENGINE::Node::getInPort(), YACS::ENGINE::ComposedNode::getLowestCommonAncestor(), YACS::ENGINE::Port::getNode(), YACS::ENGINE::ComposedNode::getOutPort(), YACS::ENGINE::ComposedNode::getPortName(), getSetOfInternalCFLinks(), and YACS::ENGINE::ComposedNode::getSetOfInternalLinks().
| Bloc::Bloc | ( | const std::string & | name | ) |
|
virtual |
|
virtual |
Implements YACS::ENGINE::Node.
Reimplemented in YACS::ENGINE::Proc.
Definition at line 447 of file Bloc.cxx.
References YACS::ENGINE::Visitor::visitBloc().
Referenced by fitToPlayGround(), and propagePlayGround().
|
private |
Definition at line 463 of file Bloc.cxx.
References YACS::ENGINE::SetOfPoints::getUniqueAndReleaseIt(), testCppPluginInvokation::r, YACS::ENGINE::SetOfPoints::simplify(), and splitIntoIndependantGraph().
Referenced by getMaxLevelOfParallelism(), getWeightRegardingDPL(), and partitionRegardingDPL().
|
staticprivate |
Internal method for CF computation. Given 'fastFinder' it searched 'node' to see if an already found path in 'res' go through 'node'. If true all paths are deduced and append to res and 'fastFinder' is updated for next turn.
Definition at line 135 of file Bloc.hxx.
References yacsorb.CORBAEngineTest::i, and updateWithNewFind().
|
protected |
Definition at line 288 of file Bloc.cxx.
References _setOfNode, YACS::DISABLED, and YACS::DONE.
Referenced by updateStateOnFailedEventFrom(), and updateStateOnFinishedEventFrom().
|
protected |
Definition at line 299 of file Bloc.cxx.
References _setOfNode, YACS::DISABLED, YACS::DONE, YACS::ERROR, YACS::FAILED, and YACS::INTERNALERR.
Referenced by updateStateOnFailedEventFrom(), and updateStateOnFinishedEventFrom().
Check if two nodes are linked.
'start' and 'end' must be direct son of 'this'. Typically used for data link.
| start | : start node |
| end | : end node |
| fw | indicates if it is a forward link searched (true : default value) or a backward link serach. |
Definition at line 650 of file Bloc.cxx.
Referenced by checkControlDependancy().
Check if two nodes can run in parallel.
Typically used for stream link. 'start' and 'end' must be direct son of 'this'.
| start | : start node |
| end | : end node |
Definition at line 664 of file Bloc.cxx.
Referenced by checkControlDependancy().
|
protectedvirtual |
Check control flow links.
| starts | If different of 0, must aggregate at leat 1 element. |
| end | : end port |
| alreadyFed | in/out parameter. Indicates if 'end' ports is already and surely set or fed by an another port. |
| direction | If true : forward direction else backward direction. |
| info | : collected information |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 679 of file Bloc.cxx.
References YACS::ENGINE::E_COLLAPSE_DFDS, YACS::ENGINE::ComposedNode::FED_DS_ST, YACS::ENGINE::ComposedNode::FED_ST, YACS::ENGINE::ComposedNode::FREE_ST, YACS::ENGINE::ComposedNode::isInMyDescendance(), YACS::ENGINE::LinkInfo::pushErrLink(), seekOkAndUseless1(), seekUseless2(), verdictForCollapses(), and verdictForOkAndUseless1().
Referenced by verdictForCollapses(), and verdictForOkAndUseless1().
|
protectedvirtual |
WARNING Needs call of performCFComputations before beeing called. Perform updates of containers regarding attributes of link 'start' -> 'end' and check the correct linking. The output is in info struct.
| start | : start port |
| end | : end port |
| cross | : |
| fw | out parameter being append if start -> end link is a forward link without cross type DF/DS. |
| fwCross | out parameter being append if start -> end link is a forward link with cross type DF/DS. |
| bw | out parameter being append if start -> end link is a backward link. |
| info | out parameter being informed about eventual errors. |
Implements YACS::ENGINE::ComposedNode.
Definition at line 614 of file Bloc.cxx.
References areLinked(), arePossiblyRunnableAtSameTime(), YACS::ENGINE::E_DS_LINK_UNESTABLISHABLE, YACS::ENGINE::E_UNPREDICTABLE_FED, YACS::ENGINE::Port::getNode(), YACS::ENGINE::ComposedNode::isInMyDescendance(), and YACS::ENGINE::LinkInfo::pushErrLink().
|
protectedvirtual |
Implements YACS::ENGINE::ComposedNode.
Definition at line 338 of file Bloc.cxx.
References insertNodeChildrenInSet().
|
protectedvirtual |
destroy recursively all results of initial computations.
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 594 of file Bloc.cxx.
References _bwLinks, _fwLinks, and YACS::ENGINE::ComposedNode::destructCFComputations().
Referenced by removeRecursivelyRedundantCL().
|
virtual |
Add a child node to the bloc.
| node | the node to add to the bloc |
If node is already a direct child of current bloc, do nothing. If node is a child of another bloc, throw exception. If node name already used in bloc, throw exception. Publish inputPorts in current bloc and ancestors.
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 176 of file Bloc.cxx.
References YACS::ENGINE::Node::_father, YACS::ENGINE::Node::_name, _setOfNode, YACS::ENGINE::ComposedNode::checkNoCrossHierachyWith(), YACS::ENGINE::Node::getName(), isNameAlreadyUsed(), YACS::ENGINE::ComposedNode::isNodeAlreadyAggregated(), and YACS::ENGINE::Node::modified().
Referenced by YACS::HMI::SubjectNode::registerUndoDestroy().
|
inlinevirtual |
Implements YACS::ENGINE::ComposedNode.
Definition at line 58 of file Bloc.hxx.
Referenced by YACS::HMI::GuiEditor::PutGraphInBloc().
|
virtual |
Remove 'node' from the set of direct children.
| If | 'node' is NOT the son of 'this'. |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 220 of file Bloc.cxx.
References _setOfNode, YACS::ENGINE::ComposedNode::edRemoveChild(), and YACS::ENGINE::Node::modified().
|
virtual |
Update the bloc state.
Update the '_state' attribute. Typically called by 'this->_inGate' when 'this->_inGate' is ready. Contrary to Node::exUpdateState no check done on inputs because internal linked DF inputports are not valid yet.
Reimplemented from YACS::ENGINE::Node.
Definition at line 153 of file Bloc.cxx.
References YACS::ENGINE::Node::_inGate, _setOfNode, YACS::ENGINE::Node::_state, YACS::ACTIVATED, YACS::DISABLED, YACS::DONE, YACS::ENGINE::InGate::exIsReady(), and YACS::ENGINE::Node::setState().
Referenced by YACS::ENGINE::loadState(), and main().
| void YACS::ENGINE::Bloc::findAllNodesStartingFrom | ( | Node * | start, |
| std::set< Node * > & | result, | ||
| std::map< Node *, std::set< Node * > > & | accelStr, | ||
| LinkInfo & | info | ||
| ) | const |
Definition at line 181 of file Bloc.hxx.
References findUselessLinksIn().
Referenced by YACS::ENGINE::BagPoint::expandNonSimpleCaseOn().
| void YACS::ENGINE::Bloc::findAllPathsStartingFrom | ( | Node * | start, |
| std::list< std::vector< Node * > > & | vec, | ||
| std::map< Node *, std::set< Node * > > & | accelStr | ||
| ) | const |
Method for CF computation.DFS visitor is used. if direction is true forward visiting is performed, if false backward is performed.
| start | must be a direct descendant of 'this'. |
| vec | : |
| accelStr |
Definition at line 201 of file Bloc.hxx.
References YACS::ENGINE::Node::_colour, YACS::Black, initComputation(), and updateWithNewFind().
|
staticprivate |
Internal method : After all paths have been found, useless CF links are searched
Definition at line 883 of file Bloc.cxx.
References YACS::ENGINE::LinkInfo::pushUselessCFLink().
Referenced by findAllNodesStartingFrom().
| void Bloc::fitToPlayGround | ( | const PlayGround * | pg | ) |
Definition at line 31 of file Bloc_impl.cxx.
References gui.CONNECTOR::a, accept(), YACS::ENGINE::DynParaLoop::edGetNbOfBranchesPort(), YACS::ENGINE::InputPort::edInit(), YACS::ENGINE::InlineNode::getContainer(), getMaxLevelOfParallelism(), YACS::ENGINE::PlayGround::getNumberOfCoresAvailable(), YACS::ENGINE::PlayGround::getNumberOfWorkers(), MSG, partitionRegardingDPL(), removeRecursivelyRedundantCL(), and YACS::ENGINE::Node::Visitor.
|
virtual |
Implements YACS::ENGINE::ComposedNode.
Definition at line 279 of file Bloc.cxx.
References _setOfNode, and YACS::ENGINE::ComposedNode::getName().
Referenced by YACS::HMI::GuiEditor::PutGraphInBloc(), and YACS::HMI::GuiEditor::PutGraphInNode().
|
inline |
Definition at line 57 of file Bloc.hxx.
Referenced by YACS::ENGINE::ProcCataLoader::loadCata(), YACS::HMI::CommandPutInComposedNode::localExecute(), and writeDot().
|
virtual |
Returns the max level of parallelism is this. The max of parallelism is equal to the sum of the max parallelism level for all concurrent branches in this.
Implements YACS::ENGINE::Node.
Definition at line 456 of file Bloc.cxx.
References analyzeParallelism(), and YACS::ENGINE::ForkBlocPoint::getMaxLevelOfParallelism().
Referenced by fitToPlayGround().
| int Bloc::getNumberOfCFLinks | ( | ) | const |
|
virtual |
Collect all nodes that are ready to execute.
| tasks | : vector of tasks to collect ready nodes |
Implements YACS::ENGINE::Node.
Definition at line 133 of file Bloc.cxx.
References _setOfNode, YACS::ENGINE::Node::_state, YACS::ACTIVATED, YACS::ENGINE::Node::setState(), and YACS::TOACTIVATE.
Definition at line 350 of file Bloc.cxx.
References _setOfNode.
Referenced by Bloc().
|
virtual |
Implements YACS::ENGINE::Node.
Definition at line 476 of file Bloc.cxx.
References analyzeParallelism(), and YACS::ENGINE::ForkBlocPoint::getWeightRegardingDPL().
|
virtual |
Initialize the bloc.
| start | : a boolean flag indicating the kind of initialization If start is true, it's a complete initialization with reinitialization of port values If start is false, there is no initialization of port values |
Reimplemented from YACS::ENGINE::Node.
Reimplemented in YACS::ENGINE::SalomeProc.
Definition at line 95 of file Bloc.cxx.
References _setOfNode, and YACS::ENGINE::Node::init().
Referenced by YACS::ENGINE::SalomeProc::init(), YACS::ENGINE::loadState(), and main().
|
protected |
Definition at line 701 of file Bloc.cxx.
References _setOfNode, and YACS::White.
Referenced by findAllPathsStartingFrom(), and removeRecursivelyRedundantCL().
|
virtual |
Indicate if the bloc execution is finished.
The execution bloc is finished if all its child nodes are finished with or without error or if it is disabled (not to execute)
Implements YACS::ENGINE::Scheduler.
Definition at line 107 of file Bloc.cxx.
References YACS::ENGINE::Node::_state, YACS::DISABLED, YACS::DONE, YACS::ERROR, and YACS::FAILED.
|
protectedvirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 313 of file Bloc.cxx.
References _setOfNode.
Referenced by edAddChild().
|
virtual |
Implements YACS::ENGINE::Node.
Definition at line 495 of file Bloc.cxx.
References analyzeParallelism(), and YACS::ENGINE::ForkBlocPoint::partitionRegardingDPL().
Referenced by fitToPlayGround().
|
protectedvirtual |
Updates mutable structures _fwLinks and _bwLinks with the result of computation (CPU consuming method). _fwLinks is a map with a Node* as key and a set<Node*> as value. The set gives all nodes that are forwardly connected to the key node _bwLinks is a map for backward dependencies The method is : for all CF link (n1->n2) add n2 and _fwLinks[n2] in forward dependencies of n1 and _bwLinks[n1] add n1 and _bwLinks[n1] in backward dependencies of n2 and _fwLinks[n2] For useless links If a node is already in a forward dependency when adding and the direct link already exists so it's a useless link (see the code !)
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 588 of file Bloc.cxx.
References YACS::ENGINE::ComposedNode::performCFComputations(), and performCFComputationsOnlyOneLevel().
|
protected |
Definition at line 504 of file Bloc.cxx.
References _bwLinks, _fwLinks, _setOfNode, YACS::ENGINE::OutGate::edSetInGate(), YACS::ENGINE::Node::getOutGate(), and YACS::ENGINE::LinkInfo::pushUselessCFLink().
Referenced by performCFComputations(), and removeRecursivelyRedundantCL().
| void Bloc::propagePlayGround | ( | const PlayGround * | pg | ) |
Definition at line 152 of file Bloc_impl.cxx.
References MyVisitorPropagate::_cont2, and accept().
|
virtual |
This method recursively all redundant control links in this.
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 483 of file Bloc.cxx.
References destructCFComputations(), YACS::ENGINE::ComposedNode::edRemoveCFLink(), YACS::ENGINE::LinkInfo::getInfoUselessLinks(), YACS::ENGINE::I_CF_USELESS, initComputation(), performCFComputationsOnlyOneLevel(), and YACS::ENGINE::ComposedNode::removeRecursivelyRedundantCL().
Referenced by fitToPlayGround().
|
protected |
WARNING use this method only after having called Bloc::performCFComputations method.
| okAndUseless1 | out param contains at the end, the nodes without any collapse. |
| allNodes | in/out param. At the end, all the nodes in 'okAndUseless1' are deleted from 'allNodes'. |
Definition at line 816 of file Bloc.cxx.
Referenced by checkCFLinks().
|
protected |
WARNING use this method only after having called Bloc::performCFComputations method. For params see Bloc::seekOkAndUseless1.
Definition at line 842 of file Bloc.cxx.
Referenced by checkCFLinks().
|
protectedvirtual |
Implements YACS::ENGINE::Node.
Definition at line 124 of file Bloc.cxx.
References YACS::ENGINE::ComposedNode::Bloc.
| std::vector< std::list< Node * > > Bloc::splitIntoIndependantGraph | ( | ) | const |
Definition at line 231 of file Bloc.cxx.
References YACS::ENGINE::Node::_colour, _setOfNode, YACS::ENGINE::OutGate::edSetInGate(), YACS::ENGINE::InGate::getBackLinks(), YACS::ENGINE::Node::getInGate(), YACS::ENGINE::Node::getOutGate(), YACS::Grey, and YACS::White.
Referenced by analyzeParallelism().
|
inlinevirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Reimplemented in YACS::ENGINE::SalomeProc, and YACS::ENGINE::Proc.
|
protectedvirtual |
Notify this bloc that a node has failed.
| node | : node that has emitted the event |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 408 of file Bloc.cxx.
References YACS::ABORT, areAllSubNodesDone(), areAllSubNodesFinished(), YACS::DONE, YACS::ENGINE::Node::exForwardFailed(), YACS::FAILED, YACS::FINISH, YACS::NOEVENT, and YACS::ENGINE::Node::setState().
|
protectedvirtual |
Calls the node's outgate OutGate::exNotifyDone if all nodes are not finished
Implements YACS::ENGINE::ComposedNode.
Definition at line 370 of file Bloc.cxx.
References YACS::ABORT, areAllSubNodesDone(), areAllSubNodesFinished(), DEBTRACE, YACS::DONE, testCppPluginInvokation::ex, YACS::ENGINE::Node::exForwardFailed(), YACS::ENGINE::Node::exForwardFinished(), YACS::FAILED, YACS::FINISH, YACS::ENGINE::Node::getName(), YACS::NOEVENT, and YACS::ENGINE::Node::setState().
|
staticprivate |
Internal method : Given a succeful path : updates 'fastFinder'
Definition at line 869 of file Bloc.cxx.
Referenced by appendIfAlreadyFound(), and findAllPathsStartingFrom().
|
staticprotected |
Part of final step for CF graph anylizing. This is the part of collapses nodes.
| pool | : |
| end | : |
| candidates | : |
| alreadyFed | in/out parameter. Indicates if 'end' ports is already and surely set or fed by an another port. |
| direction | |
| info | : collected information |
Definition at line 765 of file Bloc.cxx.
References checkCFLinks(), YACS::ENGINE::LinkInfo::endCollapseTransac(), YACS::ENGINE::ComposedNode::FED_ST, YACS::ENGINE::ComposedNode::FREE_ST, YACS::ENGINE::LinkInfo::pushWarnLink(), YACS::ENGINE::LinkInfo::startCollapseTransac(), YACS::ENGINE::W_BACK_COLLAPSE, YACS::ENGINE::W_BACK_COLLAPSE_AND_USELESS, YACS::ENGINE::W_BACK_COLLAPSE_EL, YACS::ENGINE::W_BACK_COLLAPSE_EL_AND_USELESS, YACS::ENGINE::W_COLLAPSE, YACS::ENGINE::W_COLLAPSE_AND_USELESS, YACS::ENGINE::W_COLLAPSE_EL, and YACS::ENGINE::W_COLLAPSE_EL_AND_USELESS.
Referenced by checkCFLinks().
|
staticprotected |
Part of final step for CF graph anylizing. This is the part of non collapse nodes.
| pool | : |
| end | : |
| candidates | : |
| alreadyFed | in/out parameter. Indicates if 'end' ports is already and surely set or fed by an another port. |
| direction | |
| info | : collected information |
Definition at line 720 of file Bloc.cxx.
References checkCFLinks(), YACS::ENGINE::ComposedNode::FED_ST, YACS::ENGINE::ComposedNode::FREE_ST, YACS::ENGINE::I_BACK, YACS::ENGINE::I_BACK_USELESS, YACS::ENGINE::I_USELESS, YACS::ENGINE::LinkInfo::pushInfoLink(), YACS::ENGINE::LinkInfo::pushWarnLink(), YACS::ENGINE::W_BACK_COLLAPSE_EL, YACS::ENGINE::W_BACK_COLLAPSE_EL_AND_USELESS, YACS::ENGINE::W_COLLAPSE_EL, and YACS::ENGINE::W_COLLAPSE_EL_AND_USELESS.
Referenced by checkCFLinks().
|
virtual |
Dump to the input stream a dot representation of the node.
| os | : the input stream |
Reimplemented from YACS::ENGINE::Node.
Reimplemented in YACS::ENGINE::Proc.
Definition at line 423 of file Bloc.cxx.
References getChildren(), YACS::ENGINE::Node::getColorState(), YACS::ENGINE::Node::getEffectiveState(), YACS::ENGINE::Node::getId(), YACS::ENGINE::Node::getOutNodes(), YACS::ENGINE::Node::getQualifiedName(), p, and yacsorb.CORBAEngineTest::state.
Referenced by YACS::ENGINE::Proc::writeDot().
For internal calculations.
Definition at line 42 of file Bloc.hxx.
Referenced by destructCFComputations(), performCFComputationsOnlyOneLevel(), and ~Bloc().
For internal calculations.
Definition at line 40 of file Bloc.hxx.
Referenced by destructCFComputations(), performCFComputationsOnlyOneLevel(), and ~Bloc().
|
protected |
Definition at line 38 of file Bloc.hxx.
Referenced by areAllSubNodesDone(), areAllSubNodesFinished(), Bloc(), edAddChild(), edRemoveChild(), exUpdateState(), getChildByShortName(), getNumberOfCFLinks(), getReadyTasks(), getSetOfInternalCFLinks(), init(), initComputation(), isNameAlreadyUsed(), performCFComputationsOnlyOneLevel(), splitIntoIndependantGraph(), and ~Bloc().