Control node that emulates the C switch. More...
#include <Switch.hxx>


Public Member Functions | |
| Switch (const Switch &other, ComposedNode *father, bool editionOnly) | |
| Switch (const std::string &name) | |
| ~Switch () | |
| void | exUpdateState () |
| Update the node state. More... | |
| void | init (bool start=true) |
| Node * | edSetDefaultNode (Node *DISOWNnode) |
| Node * | edReleaseDefaultNode () |
| Node * | edReleaseCase (int caseId) |
| Node * | edGetNode (int caseId) |
| Node * | edSetNode (int caseId, Node *DISOWNnode) |
| void | edChangeCase (int oldCase, int newCase) |
| Change the case of a node. More... | |
| virtual bool | edAddChild (Node *DISOWNnode) |
| int | getMaxCase () |
| void | getReadyTasks (std::vector< Task * > &tasks) |
| std::list< Node * > | edGetDirectDescendants () const |
| InputPort * | edGetConditionPort () |
| void | writeDot (std::ostream &os) const |
| Dump to the input stream a dot representation of the node. More... | |
| int | getNumberOfInputPorts () const |
| int | getMaxLevelOfParallelism () const |
| void | getWeightRegardingDPL (ComplexWeight *weight) |
| void | partitionRegardingDPL (const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap) |
| void | edRemoveChild (Node *node) |
| Remove a child node. More... | |
| 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... | |
| YACS::StatesForNode | getEffectiveState () const |
| Return the node state in the context of its father. More... | |
| YACS::StatesForNode | getEffectiveState (const Node *node) const |
| Return the effective state of a node in the context of this switch (its father) More... | |
| OutPort * | getOutPort (const std::string &name) const |
| InputPort * | getInputPort (const std::string &name) const |
| Get an input port given its name. More... | |
| Node * | getChildByShortName (const std::string &name) const |
| std::string | getMyQualifiedName (const Node *directSon) const |
| std::string | getCaseId (const Node *node) const |
| virtual void | accept (Visitor *visitor) |
| int | getRankOfNode (Node *node) const |
| virtual std::string | typeName () |
| std::list< ProgressWeight > | getProgressWeight () const |
| Get the progress weight of the graph. More... | |
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 () |
| 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 |
| 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 |
| Get the input port name. More... | |
| std::string | getOutPortName (const OutPort *) const |
| int | getNumberOfOutputPorts () const |
| std::list< OutputPort * > | getSetOfOutputPort () const |
| 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::list< InputDataStreamPort * > | getSetOfInputDataStreamPort () const |
| std::list< OutputDataStreamPort * > | getSetOfOutputDataStreamPort () const |
| 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... | |
| 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 |
| Node * | getChildByName (const std::string &name) const |
| void | loaded () |
| void | connected () |
| 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 |
| 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 () |
Static Public Attributes | |
| static const char | DEFAULT_NODE_NAME [] ="default" |
| static const char | SELECTOR_INPUTPORT_NAME [] ="select" |
| static const int | ID_FOR_DEFAULT_NODE =-1973012217 |
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 |
Protected Member Functions | |
| YACS::Event | updateStateOnFinishedEventFrom (Node *node) |
| Node * | simpleClone (ComposedNode *father, bool editionOnly=true) const |
| std::set< InPort * > | getAllInPortsComingFromOutsideOfCurrentScope () const |
| List all input ports that are linked to out of scope ports. More... | |
| void | checkLinkPossibility (OutPort *start, const std::list< ComposedNode * > &pointsOfViewStart, InPort *end, const std::list< ComposedNode * > &pointsOfViewEnd) |
| 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) |
| void | releaseDelegateOf (OutPort *portDwn, OutPort *portUp, InPort *finalTarget, 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 * > > &fw, std::vector< OutPort * > &fwCross, std::map< ComposedNode *, std::list< OutPort * > > &bw, LinkInfo &info) const |
| void | checkNoCyclePassingThrough (Node *node) |
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 YACS::Event | updateStateOnFailedEventFrom (Node *node, const Executor *execInst) |
| Method used to notify the node that a child node has failed. More... | |
| virtual void | buildDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) |
| virtual void | getDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) |
| virtual void | releaseDelegateOf (InPort *&port, OutPort *initialStart, 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 |
| 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 |
| 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 | |
| AnyInputPort | _condition |
| std::map< int, Node * > | _mapOfNode |
| FakeNodeForSwitch * | _undispatchableNotificationNode |
| std::map< InPort *, CollectorSwOutPort * > | _outPortsCollector |
| std::vector< CollectorSwOutPort * > | _alreadyExistingCollectors |
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 | |
| int | getNbOfCases () const |
Static Private Member Functions | |
| static std::string | getRepresentationOfCase (int i) |
Friends | |
| class | FakeNodeForSwitch |
| class | CollectorSwOutPort |
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 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) |
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 |
Control node that emulates the C switch.
Definition at line 84 of file Switch.hxx.
| Switch::Switch | ( | const Switch & | other, |
| ComposedNode * | father, | ||
| bool | editionOnly | ||
| ) |
Definition at line 285 of file Switch.cxx.
References _alreadyExistingCollectors, _mapOfNode, _outPortsCollector, and CollectorSwOutPort.
| Switch::Switch | ( | const std::string & | name | ) |
Definition at line 298 of file Switch.cxx.
| Switch::~Switch | ( | ) |
Definition at line 302 of file Switch.cxx.
References _alreadyExistingCollectors, _mapOfNode, _outPortsCollector, and _undispatchableNotificationNode.
|
virtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 838 of file Switch.cxx.
References YACS::ENGINE::Visitor::visitSwitch().
|
protectedvirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 701 of file Switch.cxx.
References _outPortsCollector, YACS::ENGINE::CollectorSwOutPort::addPotentialProducerForMaster(), CollectorSwOutPort, and YACS::ENGINE::DataPort::edSetType().
|
protectedvirtual |
check control flow links
| starts | If different of 0, must aggregate at leat 1 element. |
| end | : |
| 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 | : informations collectedduring the check |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 661 of file Switch.cxx.
References _outPortsCollector, YACS::ENGINE::ComposedNode::checkCFLinks(), and YACS::ENGINE::ComposedNode::FED_ST.
|
protected |
Definition at line 681 of file Switch.cxx.
|
protectedvirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 695 of file Switch.cxx.
|
protectedvirtual |
Implements YACS::ENGINE::ComposedNode.
Definition at line 690 of file Switch.cxx.
|
virtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 633 of file Switch.cxx.
References DEBTRACE, edSetNode(), and getMaxCase().
| void Switch::edChangeCase | ( | int | oldCase, |
| int | newCase | ||
| ) |
Change the case of a node.
| oldCase | : the case value to change |
| newCase | : the new value to set raise an exception if the old case does not exist or if the new case already exists |
Definition at line 575 of file Switch.cxx.
References _mapOfNode, and YACS::ENGINE::Node::modified().
Referenced by YACS::HMI::CommandSetSwitchCase::localExecute(), and YACS::HMI::CommandSetSwitchCase::localReverse().
|
inline |
Definition at line 115 of file Switch.hxx.
Referenced by YACS::HMI::SubjectSwitch::getValue(), YACS::HMI::CommandSetSwitchSelect::localExecute(), YACS::HMI::CommandSetSwitchSelect::localReverse(), YACS::ENGINE::nodeParser::onEnd(), YACS::switchtypeParser::select(), YACS::ENGINE::VisitorSaveSchema::visitSwitch(), and YACS::ENGINE::VisitorSaveState::visitSwitch().
|
virtual |
Implements YACS::ENGINE::ComposedNode.
Definition at line 393 of file Switch.cxx.
References _mapOfNode.
Referenced by getProgressWeight().
| Node * Switch::edGetNode | ( | int | caseId | ) |
Definition at line 527 of file Switch.cxx.
References _mapOfNode.
Referenced by YACS::HMI::CommandSetSwitchCase::localExecute(), YACS::HMI::CommandSetSwitchCase::localReverse(), YACS::HMI::SceneComposedNodeItem::update(), and YACS::HMI::SchemaComposedNodeItem::update().
| Node * Switch::edReleaseCase | ( | int | caseId | ) |
Definition at line 509 of file Switch.cxx.
References _mapOfNode, YACS::ENGINE::ComposedNode::edRemoveChild(), getRepresentationOfCase(), and YACS::ENGINE::Node::modified().
Referenced by edReleaseDefaultNode(), and edRemoveChild().
| Node * Switch::edReleaseDefaultNode | ( | ) |
Definition at line 504 of file Switch.cxx.
References edReleaseCase(), and ID_FOR_DEFAULT_NODE.
|
virtual |
Remove a child node.
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 432 of file Switch.cxx.
References _mapOfNode, YACS::ENGINE::Node::_name, edReleaseCase(), and YACS::ENGINE::Node::getName().
Definition at line 499 of file Switch.cxx.
References edSetNode(), and ID_FOR_DEFAULT_NODE.
Referenced by YACS::switchtypeParser::default_().
| caseId | : the case ID chosen to place 'node' |
| node | : the node for the specified 'caseId' |
Definition at line 541 of file Switch.cxx.
References YACS::ENGINE::Node::_father, _mapOfNode, YACS::ENGINE::ComposedNode::checkNoCrossHierachyWith(), and YACS::ENGINE::Node::modified().
Referenced by YACS::switchtypeParser::case_(), edAddChild(), and edSetDefaultNode().
|
virtual |
Update the node state.
Called by InGate::exNotifyFromPrecursor
Reimplemented from YACS::ENGINE::Node.
Definition at line 319 of file Switch.cxx.
References _condition, YACS::ENGINE::Node::_inGate, _mapOfNode, YACS::ENGINE::Node::_state, _undispatchableNotificationNode, YACS::ACTIVATED, DEBTRACE, YACS::DISABLED, YACS::ENGINE::InGate::exIsReady(), FakeNodeForSwitch, YACS::ENGINE::ComposedNode::getAllOutPortsLeavingCurrentScope(), YACS::ENGINE::AnyInputPort::getIntValue(), ID_FOR_DEFAULT_NODE, YACS::ENGINE::AnyInputPort::isEmpty(), and YACS::ENGINE::Node::setState().
|
protectedvirtual |
List all input ports that are linked to out of scope ports.
List all input ports of 'this' so that, for each it exists at least 1 link coming from outside to it.
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 648 of file Switch.cxx.
References _condition, YACS::ENGINE::InPort::edSetOutPort(), YACS::ENGINE::ComposedNode::getAllInPortsComingFromOutsideOfCurrentScope(), and YACS::ENGINE::ComposedNode::isInMyDescendance().
| std::string Switch::getCaseId | ( | const Node * | node | ) | const |
Definition at line 819 of file Switch.cxx.
References _mapOfNode, gui.CONNECTOR::a, DEFAULT_NODE_NAME, YACS::ENGINE::ComposedNode::getName(), YACS::ENGINE::Node::getName(), and ID_FOR_DEFAULT_NODE.
Referenced by getMyQualifiedName().
|
virtual |
Implements YACS::ENGINE::ComposedNode.
Definition at line 477 of file Switch.cxx.
References _mapOfNode, DEFAULT_NODE_NAME, YACS::ENGINE::ComposedNode::getName(), and ID_FOR_DEFAULT_NODE.
|
protectedvirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 718 of file Switch.cxx.
References _outPortsCollector, YACS::ENGINE::ComposedNode::getName(), and YACS::ENGINE::DataPort::getName().
|
virtual |
Return the node state in the context of its father.
The node state is stored in a private attribute _state. This state is relative to its father state : a node with a TOACTIVATE state with a father node in a READY state is not to activate. Its effective state is only READY. This method returns the effective state of the node taking into account that of its father.
Reimplemented from YACS::ENGINE::Node.
Definition at line 790 of file Switch.cxx.
References YACS::ENGINE::Node::getEffectiveState().
Referenced by getProgressWeight().
|
virtual |
Return the effective state of a node in the context of this switch (its father)
| node | the node which effective state is queried |
Reimplemented from YACS::ENGINE::Node.
Definition at line 778 of file Switch.cxx.
References YACS::DISABLED, YACS::ENGINE::Node::getEffectiveState(), YACS::ENGINE::Node::getState(), YACS::READY, and YACS::TOACTIVATE.
|
virtual |
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::ComposedNode.
Definition at line 470 of file Switch.cxx.
References _condition, YACS::ENGINE::ComposedNode::getInputPort(), and SELECTOR_INPUTPORT_NAME.
|
virtual |
redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 453 of file Switch.cxx.
References _condition, and YACS::ENGINE::ComposedNode::getLocalInputPorts().
| int Switch::getMaxCase | ( | ) |
|
virtual |
|
virtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 812 of file Switch.cxx.
References getCaseId(), and YACS::ENGINE::Node::getName().
|
private |
Definition at line 747 of file Switch.cxx.
References _mapOfNode.
|
virtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 402 of file Switch.cxx.
References YACS::ENGINE::ComposedNode::getNumberOfInputPorts().
|
virtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 459 of file Switch.cxx.
References _alreadyExistingCollectors, _outPortsCollector, and YACS::ENGINE::ComposedNode::getOutPort().
Referenced by YACS::ENGINE::CollectorSwOutPort::CollectorSwOutPort().
|
virtual |
Get the progress weight of the graph.
Only elementary nodes have weight. If the switch node is not done, we add the weight of all his descendants, otherwise only the weight of the used case count.
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 610 of file Switch.cxx.
References YACS::DONE, edGetDirectDescendants(), getEffectiveState(), and YACS::ENGINE::Node::getState().
| int Switch::getRankOfNode | ( | Node * | node | ) | const |
Definition at line 752 of file Switch.cxx.
References _mapOfNode, and YACS::ENGINE::ComposedNode::isInMyDescendance().
Referenced by YACS::ENGINE::VisitorSaveSchema::beginCase(), YACS::HMI::SubjectSwitch::completeChildrenSubjectList(), YACS::ENGINE::VisitorSaveSchema::endCase(), YACS::HMI::SceneNodeItem::getHeaderLabel(), YACS::HMI::SubjectSwitch::houseKeepingAfterCutPaste(), YACS::HMI::CommandSetSwitchCase::localExecute(), YACS::HMI::CommandSetSwitchCase::localReverse(), YACS::HMI::SubjectSwitch::setCase(), YACS::HMI::SchemaComposedNodeItem::setCaseValue(), and YACS::HMI::SchemaNodeItem::setCaseValue().
|
virtual |
Implements YACS::ENGINE::Node.
Definition at line 367 of file Switch.cxx.
References _condition, _mapOfNode, YACS::ENGINE::Node::_state, _undispatchableNotificationNode, YACS::ACTIVATED, YACS::ENGINE::AnyInputPort::getIntValue(), YACS::ENGINE::ElementaryNode::getReadyTasks(), ID_FOR_DEFAULT_NODE, YACS::ENGINE::Node::setState(), and YACS::TOACTIVATE.
|
staticprivate |
Definition at line 761 of file Switch.cxx.
References DEFAULT_NODE_NAME, yacsorb.CORBAEngineTest::i, and ID_FOR_DEFAULT_NODE.
Referenced by YACS::ENGINE::CollectorSwOutPort::addPotentialProducerForMaster(), edReleaseCase(), and YACS::ENGINE::CollectorSwOutPort::getHumanReprOfIncompleteCases().
|
virtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 445 of file Switch.cxx.
References _condition, and YACS::ENGINE::ComposedNode::getSetOfInputPort().
|
virtual |
Implements YACS::ENGINE::Node.
Definition at line 415 of file Switch.cxx.
References _mapOfNode, YACS::ENGINE::ComplexWeight::max(), and YACS::ENGINE::ComplexWeight::setToZero().
|
virtual |
initialisation of all input and output ports and gates, for execution
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 350 of file Switch.cxx.
References _mapOfNode, DEBTRACE, yacsorb.CORBAEngineTest::i, and YACS::ENGINE::ComposedNode::init().
|
virtual |
|
protectedvirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 732 of file Switch.cxx.
References _outPortsCollector, YACS::ENGINE::OutPort::getAllRepresented(), and YACS::ENGINE::CollectorSwOutPort::removePotentialProducerForMaster().
|
protectedvirtual |
Implements YACS::ENGINE::Node.
Definition at line 314 of file Switch.cxx.
References YACS::ENGINE::Node::Switch.
|
inlinevirtual |
Reimplemented from YACS::ENGINE::ComposedNode.
Definition at line 133 of file Switch.hxx.
|
protectedvirtual |
Implements YACS::ENGINE::ComposedNode.
Definition at line 642 of file Switch.cxx.
References YACS::DONE, YACS::FINISH, and YACS::ENGINE::Node::setState().
|
virtual |
Dump to the input stream a dot representation of the node.
| os | : the input stream |
Reimplemented from YACS::ENGINE::Node.
Definition at line 795 of file Switch.cxx.
References _mapOfNode, YACS::ENGINE::Node::getColorState(), YACS::ENGINE::Node::getEffectiveState(), YACS::ENGINE::Node::getId(), YACS::ENGINE::Node::getQualifiedName(), gui.Appli::n, and yacsorb.CORBAEngineTest::state.
|
friend |
Definition at line 87 of file Switch.hxx.
Referenced by buildDelegateOf(), and Switch().
|
friend |
Definition at line 86 of file Switch.hxx.
Referenced by exUpdateState().
|
mutableprotected |
Definition at line 97 of file Switch.hxx.
Referenced by getOutPort(), Switch(), and ~Switch().
|
protected |
Definition at line 93 of file Switch.hxx.
Referenced by exUpdateState(), getAllInPortsComingFromOutsideOfCurrentScope(), getInputPort(), getLocalInputPorts(), getReadyTasks(), and getSetOfInputPort().
|
protected |
Definition at line 94 of file Switch.hxx.
Referenced by edChangeCase(), edGetDirectDescendants(), edGetNode(), edReleaseCase(), edRemoveChild(), edSetNode(), exUpdateState(), getCaseId(), getChildByShortName(), getMaxCase(), getMaxLevelOfParallelism(), getNbOfCases(), getRankOfNode(), getReadyTasks(), getWeightRegardingDPL(), init(), partitionRegardingDPL(), Switch(), writeDot(), and ~Switch().
|
protected |
Definition at line 96 of file Switch.hxx.
Referenced by buildDelegateOf(), checkCFLinks(), getDelegateOf(), getOutPort(), releaseDelegateOf(), Switch(), and ~Switch().
|
protected |
Definition at line 95 of file Switch.hxx.
Referenced by exUpdateState(), getReadyTasks(), and ~Switch().
|
static |
Definition at line 89 of file Switch.hxx.
Referenced by getCaseId(), getChildByShortName(), and getRepresentationOfCase().
|
static |
Definition at line 91 of file Switch.hxx.
Referenced by YACS::ENGINE::VisitorSaveSchema::beginCase(), edReleaseDefaultNode(), edSetDefaultNode(), YACS::ENGINE::VisitorSaveSchema::endCase(), exUpdateState(), getCaseId(), getChildByShortName(), getReadyTasks(), getRepresentationOfCase(), and YACS::HMI::CaseSwitchEditor::GetStrValue().
|
static |
Definition at line 90 of file Switch.hxx.
Referenced by getInputPort().