Version: 8.3.0
YACS::ENGINE::ComposedNode Class Referenceabstract

Base class for all composed nodes. More...

#include <ComposedNode.hxx>

Inheritance diagram for YACS::ENGINE::ComposedNode:
Collaboration diagram for YACS::ENGINE::ComposedNode:

Classes

struct  SortHierarc
 

Public Member Functions

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 throw (Exception)
 Perform check of deployment consistency of the current graph. More...
 
std::vector< Task * > getNextTasks (bool &isMore)
 
virtual bool isPlacementPredictableB4Run () const =0
 
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...
 
virtual bool edAddDFLink (OutPort *start, InPort *end) throw (Exception)
 Connect an OutPort to an InPort and add the necessary control link. More...
 
virtual bool edAddChild (Node *DISOWNnode) throw (Exception)
 
virtual void edRemoveChild (Node *node) throw (Exception)
 Remove a child node. 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 std::list< Node * > edGetDirectDescendants () const =0
 
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::list< ProgressWeightgetProgressWeight () const
 Get the progress weight for all elementary nodes. More...
 
std::string getInPortName (const InPort *) const throw (Exception)
 Get the input port name. More...
 
std::string getOutPortName (const OutPort *) const throw (Exception)
 
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
 
OutPortgetOutPort (const std::string &name) const throw (Exception)
 
InputPortgetInputPort (const std::string &name) const throw (Exception)
 Get an input port given its name. More...
 
OutputPortgetOutputPort (const std::string &name) const throw (Exception)
 Get an output port given its name. More...
 
InputDataStreamPortgetInputDataStreamPort (const std::string &name) const throw (Exception)
 
OutputDataStreamPortgetOutputDataStreamPort (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 std::string typeName ()
 
virtual void edUpdateState ()
 update the status of the node More...
 
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...
 
ComposedNodegetRootNode () 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
 
NodeisInMyDescendance (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
 
NodegetChildByName (const std::string &name) const throw (Exception)
 
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
 
- Public Member Functions inherited from YACS::ENGINE::Node
virtual ~Node ()
 
Nodeclone (ComposedNode *father, bool editionOnly=true) const
 This method MUST NEVER BE VIRTUAL More...
 
NodecloneWithoutCompAndContDeepCpy (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...
 
InGategetInGate ()
 
OutGategetOutGate ()
 
const std::string & getName () const
 
void setName (const std::string &name)
 Change the name of the node. More...
 
ComposedNodegetFather () const
 
const std::string getId () const
 
bool exIsControlReady () const
 
std::list< Node * > getOutNodes () const
 
virtual void writeDot (std::ostream &os) const
 Dump to the input stream a dot representation of the node. More...
 
virtual void exUpdateState ()
 Update the node state. More...
 
virtual void exFailedState ()
 Notify this node that its execution has failed. More...
 
virtual void exDisabledState ()
 Notify this node that it has been disabled. More...
 
virtual void getReadyTasks (std::vector< Task * > &tasks)=0
 
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...
 
InPortgetInPort (const std::string &name) const throw (Exception)
 
InPropertyPortgetInPropertyPort () 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 ProcgetProc ()
 
virtual const ProcgetProc () const
 
virtual int getMaxLevelOfParallelism () const =0
 
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 void exUpdateState ()=0
 
virtual void selectRunnableTasks (std::vector< Task * > &tasks)=0
 
virtual bool isMultiplicitySpecified (unsigned &value) const =0
 
virtual void forceMultiplicity (unsigned value)=0
 
virtual ~Scheduler ()
 

Static Public Member Functions

static ComposedNodegetLowestCommonAncestor (Node *node1, Node *node2) throw (Exception)
 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...
 

Protected Member Functions

 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 ()
 
virtual NodegetChildByShortName (const std::string &name) const =0 throw (Exception)
 
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 updateStateOnFinishedEventFrom (Node *node)=0
 
virtual YACS::Event updateStateOnFailedEventFrom (Node *node, const Executor *execInst)
 Method used to notify the node that a child node has failed. More...
 
virtual void checkLinkPossibility (OutPort *start, const std::list< ComposedNode * > &pointsOfViewStart, InPort *end, const std::list< ComposedNode * > &pointsOfViewEnd) throw (Exception)
 
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) throw (Exception)
 
virtual void getDelegateOf (std::pair< OutPort *, OutPort * > &port, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) throw (Exception)
 
virtual void releaseDelegateOf (InPort *&port, OutPort *initialStart, const std::list< ComposedNode * > &pointsOfView) throw (Exception)
 
virtual void releaseDelegateOf (OutPort *portDwn, OutPort *portUp, InPort *finalTarget, const std::list< ComposedNode * > &pointsOfView) throw (Exception)
 
virtual void checkNoCyclePassingThrough (Node *node)=0 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...
 
NodegetLowestNodeDealingAll (const std::list< OutPort * > &ports) const
 
void checkLinksCoherenceRegardingControl (const std::vector< OutPort * > &starts, InputPort *end, LinkInfo &info) const throw (Exception)
 
virtual 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 =0
 
void solveObviousOrDelegateCFLinks (const std::list< OutPort * > &starts, InputPort *end, unsigned char &alreadyFed, bool direction, LinkInfo &info) const
 
virtual void checkCFLinks (const std::list< OutPort * > &starts, InputPort *end, unsigned char &alreadyFed, bool direction, LinkInfo &info) const
 check control flow links More...
 
- Protected Member Functions inherited from YACS::ENGINE::Node
 Node (const std::string &name)
 
 Node (const Node &other, ComposedNode *father)
 
virtual NodesimpleClone (ComposedNode *father, bool editionOnly=true) const =0
 
virtual void exForwardFailed ()
 
virtual void exForwardFinished ()
 

Static Protected Member Functions

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...
 
- Static Protected Member Functions inherited from YACS::ENGINE::Node
static void checkValidityOfPortName (const std::string &name) throw (Exception)
 
static ComposedNodecheckHavingCommonFather (Node *node1, Node *node2) throw (Exception)
 

Static Protected Attributes

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
 

Friends

class Bloc
 
class Loop
 
class OutPort
 
class ElementaryNode
 

Additional Inherited Members

- Public Attributes inherited from YACS::ENGINE::Node
YACS::Colour _colour
 
- Static Public Attributes inherited from YACS::ENGINE::Node
static std::map< int, Node * > idMap
 
- 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
 

Detailed Description

Base class for all composed nodes.

This is an abstract class that must be specialized.

Definition at line 42 of file ComposedNode.hxx.

Constructor & Destructor Documentation

ComposedNode::ComposedNode ( const std::string &  name)
protected

Definition at line 54 of file ComposedNode.cxx.

54  :Node(name)
55 {
56 }
ComposedNode::ComposedNode ( const ComposedNode other,
ComposedNode father 
)
protected

Definition at line 58 of file ComposedNode.cxx.

58  :Node(other,father)
59 {
60 }
ComposedNode::~ComposedNode ( )
virtual

Definition at line 62 of file ComposedNode.cxx.

63 {
64 }

Member Function Documentation

void ComposedNode::accept ( Visitor visitor)
virtual

Implements YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Loop, YACS::ENGINE::Switch, YACS::ENGINE::DynParaLoop, YACS::ENGINE::OptimizerLoop, YACS::ENGINE::Proc, YACS::ENGINE::ForLoop, and YACS::ENGINE::WhileLoop.

Definition at line 1491 of file ComposedNode.cxx.

References edGetDirectDescendants().

Referenced by YACS::ENGINE::Executor::saveState().

1492 {
1493  list<Node *> constituents=edGetDirectDescendants();
1494  for(list<Node *>::iterator iter=constituents.begin(); iter!=constituents.end(); iter++)
1495  {
1496  (*iter)->accept(visitor);
1497  }
1498 }
void ComposedNode::buildDelegateOf ( InPort *&  port,
OutPort initialStart,
const std::list< ComposedNode * > &  pointsOfView 
)
protectedvirtual

Reimplemented in YACS::ENGINE::Loop, YACS::ENGINE::OptimizerLoop, and YACS::ENGINE::DynParaLoop.

Definition at line 1460 of file ComposedNode.cxx.

Referenced by edAddLink().

1461 {
1462 }
void ComposedNode::buildDelegateOf ( std::pair< OutPort *, OutPort * > &  port,
InPort finalTarget,
const std::list< ComposedNode * > &  pointsOfView 
)
protectedvirtual
void ComposedNode::checkBasicConsistency ( ) const throw (Exception)
virtual

Reimplemented in YACS::ENGINE::Loop, YACS::ENGINE::DynParaLoop, and YACS::ENGINE::OptimizerLoop.

Definition at line 1588 of file ComposedNode.cxx.

References DEBTRACE, and getLocalInputPorts().

Referenced by YACS::ENGINE::DynParaLoop::checkBasicConsistency(), YACS::ENGINE::Loop::checkBasicConsistency(), and edUpdateState().

1589 {
1590  DEBTRACE("ComposedNode::checkBasicConsistency");
1591  std::list<InputPort *>::const_iterator iter;
1592  std::list<InputPort *> inports=getLocalInputPorts();
1593  for(iter=inports.begin();iter!=inports.end();iter++)
1594  (*iter)->checkBasicConsistency();
1595 }
void ComposedNode::checkCFLinks ( const std::list< OutPort * > &  starts,
InputPort end,
unsigned char &  alreadyFed,
bool  direction,
LinkInfo info 
) const
protectedvirtual

check control flow links

Parameters
startsIf different of 0, must aggregate at leat 1 element.
end:
alreadyFedin/out parameter. Indicates if 'end' ports is already and surely set or fed by an another port.
directionIf true : forward direction else backward direction.
info: informations collectedduring the check

Reimplemented in YACS::ENGINE::Loop, YACS::ENGINE::Switch, YACS::ENGINE::OptimizerLoop, YACS::ENGINE::DynParaLoop, YACS::ENGINE::Bloc, and YACS::ENGINE::ForLoop.

Definition at line 803 of file ComposedNode.cxx.

References FED_ST, YACS::ENGINE::Port::getNode(), YACS::ENGINE::I_BACK, isInMyDescendance(), YACS::ENGINE::LinkInfo::pushInfoLink(), YACS::ENGINE::LinkInfo::pushWarnLink(), solveObviousOrDelegateCFLinks(), and YACS::ENGINE::W_BACK_COLLAPSE_EL.

Referenced by YACS::ENGINE::Switch::checkCFLinks(), and YACS::ENGINE::Loop::checkCFLinks().

804 {
805  static const char what[]="ComposedNode::checkCFLinks : Internal error occured - uncorrect hierarchy detected !";
806  Node *nodeEnd=isInMyDescendance(end->getNode());
807  if(!nodeEnd)
808  return solveObviousOrDelegateCFLinks(starts,end,alreadyFed,direction,info);
809  //This case is typically dedicated when direct son is ElementaryNode and self link is defined on this.
810  if(!dynamic_cast<ElementaryNode *>(nodeEnd))
811  throw Exception(what);
812 
813  list< OutPort *>::const_iterator iter=starts.begin();
814  Node *nodeStart=(*iter)->getNode();
815  iter++;
816  if(nodeEnd!=nodeStart)
817  throw Exception(what);
818 
819  for(;iter!=starts.end();iter++)
820  if((*iter)->getNode()!=nodeStart)
821  throw Exception(what);
822  //Ok at this step we are sure that we have back links on the same elementary node.
823  if(starts.size()>1)
824  for(iter=starts.begin();iter!=starts.end();iter++)
825  info.pushWarnLink(*iter,end,W_BACK_COLLAPSE_EL);
826  else//here no need to look at 'alreadyFed' var because it is waranteed to be equal to FREE_ST by construction.
827  info.pushInfoLink(*(starts.begin()),end,I_BACK);
828  alreadyFed=FED_ST;
829 }
void ComposedNode::checkConsistency ( LinkInfo info) const throw (Exception)

Definition at line 611 of file ComposedNode.cxx.

References YACS::ENGINE::E_NEVER_SET_INPUTPORT, and YACS::Exception::what().

Referenced by main(), YACS::HMI::GenericGui::onRunLoadedSchema(), and YACS::HMI::EditionProc::synchronize().

612 {
613  info.clearAll();
614  info.setPointOfView((ComposedNode *)this);
615  performCFComputations(info);
616  list<InputPort *> setOfInToTest=getSetOfInputPort();
617  for(list<InputPort *>::iterator iter1=setOfInToTest.begin();iter1!=setOfInToTest.end();iter1++)
618  {
619  vector<OutPort *> candidateForAdvCheck;
620  set<OutPort *> outPorts=(*iter1)->edSetOutPort();
621  //Filtering among outPorts, which of them, are candidates to fill *iter1 at the current scope.
622  for(set<OutPort *>::iterator iter2=outPorts.begin();iter2!=outPorts.end();iter2++)
623  {
624  (*iter2)->checkConsistency(info);
625  ComposedNode *manager=getLowestCommonAncestor((*iter2)->getNode(),(*iter1)->getNode());
626  if(isInMyDescendance(manager))
627  candidateForAdvCheck.push_back(*iter2);
628  }
629  if(!candidateForAdvCheck.empty())
630  //End of filtering. Now regarding CF constraints for the current InPutPort.
631  try
632  {
633  checkLinksCoherenceRegardingControl(candidateForAdvCheck,*iter1,info);
634  }
635  catch(YACS::Exception& ex)
636  {
637  std::string what=ex.what();
638  what += "\nfor input port: ";
639  what += (*iter1)->getNode()->getName();
640  what += ".";
641  what += (*iter1)->getName();
642 
644  throw YACS::Exception(what);
645  }
646  else
647  //No backlinks
648  if(!(*iter1)->canBeNull() && !(*iter1)->edIsManuallyInitialized())
649  info.pushErrLink(0,*iter1,E_NEVER_SET_INPUTPORT);
650  }
652 }
virtual void YACS::ENGINE::ComposedNode::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
protectedpure virtual
DeploymentTree ComposedNode::checkDeploymentTree ( bool  deep) const throw (Exception)

Perform check of deployment consistency of the current graph.

Parameters
deepif true a deep check is perfomed. Typically has to be called by an executor before any attempt to launch an execution.

Definition at line 189 of file ComposedNode.cxx.

References YACS::ENGINE::DeploymentTree::appendTask(), YACS::ENGINE::DeploymentTree::DEPLOYABLE_BUT_NOT_SPECIFIED, YACS::ENGINE::DeploymentTree::DUP_TASK_NOT_COMPATIBLE_WITH_EXISTING_TREE, and PMMLBasicsTestLauncher::ret.

190 {
192  list< ElementaryNode * > tasks=getRecursiveConstituents();
193  for(list< ElementaryNode * >::iterator iter=tasks.begin();iter!=tasks.end();iter++)
194  {
195  switch(ret.appendTask(*iter,(*iter)->getDynClonerIfExists(this)))
196  {
198  {
199  string what("ComposedNode::checkDeploymentTree : ServiceNode with name \""); what+=(*iter)->getName();
200  what+="\" coexists in a component with an another Task which context is incompatible with it.";
201  throw Exception(what);
202  }
204  {
205  if(deep)
206  {
207  string what("ComposedNode::checkDeploymentTree : ServiceNode with name \""); what+=(*iter)->getName();
208  what+="\" is deployable but no component is specified on it.";
209  throw Exception(what);
210  }
211  }
212  }
213  }
214  return ret;
215 }
void ComposedNode::checkInMyDescendance ( Node nodeToTest) const throw (Exception)
protected

Check if a node is in the descendance of this node.

Note
Check that 'nodeToTest' is in descendance of 'this' OR equal to 'this'
Exceptions
Exception: If 'nodeToTest' is NOT in descendance of 'this' AND not equal to 'this'
Parameters
nodeToTest: the node to check

Definition at line 1013 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_father.

1014 {
1015  const char whatC[]=" is not the descendance of node ";
1016  if(nodeToTest==0)
1017  {
1018  string what("node "); what+= nodeToTest->getName(); what+=" ";
1019  what+=whatC; what+=_name;
1020  throw Exception(what);
1021  }
1022  if((ComposedNode *)nodeToTest==this)
1023  return;
1024  ComposedNode *iter=nodeToTest->_father;
1025  while(iter!=0 && iter!=this)
1026  iter=iter->_father;
1027  if(iter==0)
1028  {
1029  string what("node "); what+= nodeToTest->getName(); what+=" ";
1030  what+=whatC; what+=_name;
1031  throw Exception(what);
1032  }
1033 }
void ComposedNode::checkLinkPossibility ( OutPort start,
const std::list< ComposedNode * > &  pointsOfViewStart,
InPort end,
const std::list< ComposedNode * > &  pointsOfViewEnd 
) throw (Exception)
protectedvirtual

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Switch, YACS::ENGINE::OptimizerLoop, YACS::ENGINE::DynParaLoop, and YACS::ENGINE::WhileLoop.

Definition at line 1443 of file ComposedNode.cxx.

Referenced by YACS::ENGINE::DynParaLoop::checkLinkPossibility(), and edAddLink().

1445 {
1446  if((dynamic_cast<DataFlowPort *>(start) || dynamic_cast<DataFlowPort *>(end))
1447  && (dynamic_cast<DataStreamPort *>(start) || dynamic_cast<DataStreamPort *>(end)))
1448  {//cross protocol required : deeper check needed
1449  bool isOK=false;
1450  list<ComposedNode *>::const_iterator iter;
1451  for(iter=pointsOfViewStart.begin();iter!=pointsOfViewStart.end() && !isOK;iter++)
1452  isOK=(*iter)->isRepeatedUnpredictablySeveralTimes();
1453  for(iter=pointsOfViewEnd.begin();iter!=pointsOfViewEnd.end() && !isOK;iter++)
1454  isOK=(*iter)->isRepeatedUnpredictablySeveralTimes();
1455  if(!isOK)
1456  throw Exception("ComposedNode::checkLinkPossibility : Request for cross protocol link impossible.");
1457  }
1458 }
void ComposedNode::checkLinksCoherenceRegardingControl ( const std::vector< OutPort * > &  starts,
InputPort end,
LinkInfo info 
) const throw (Exception)
protected

call it only for 'starts' to 'end' links DEALED by 'this'.

Definition at line 713 of file ComposedNode.cxx.

References checkControlDependancy(), YACS::ENGINE::E_COLLAPSE_DS, and YACS::ENGINE::E_ONLY_BACKWARD_DEFINED.

714 {
715  map < ComposedNode *, list<OutPort *>, SortHierarc > outputs;//forward link classical
716  vector<OutPort *> outputsCross;//forward link cross
717  map < ComposedNode *, list<OutPort *>, SortHierarc > outputsBw;//backward
718  vector<OutPort *>::const_iterator iter1;
719  //vector<DataPort *> history=((*iter1).second)[0]->calculateHistoryOfLinkWith(end);
720  //DataPort *cross=DataPort::isCrossingType(history);
721  for(iter1=starts.begin();iter1!=starts.end();iter1++)
722  {
723  ComposedNode *manager=getLowestCommonAncestor((*iter1)->getNode(),end->getNode());
724  manager->checkControlDependancy((*iter1), end, false, outputs, outputsCross, outputsBw, info);
725  }
726  //Ok now let's regarding outputs all combinations : (outputs.size())*(outputs.size()-1)/2
727  unsigned char isAlreadyFed=FREE_ST;
728  //Dealing excusively with DS. Level is useless here because simultaneity is required for DS.
729  if(outputsCross.size()>0)
730  {
731  isAlreadyFed=FED_DS_ST;
732  if(outputsCross.size()>1)
733  for(vector< OutPort *>::const_iterator iter1=outputsCross.begin();iter1!=(outputsCross.end()-2);iter1++)
734  info.pushErrLink(*iter1,end,E_COLLAPSE_DS);
735  }
736  map < ComposedNode *, list<OutPort *>, SortHierarc >::iterator iter3=outputs.begin();
737  for(;iter3!=outputs.end();iter3++)
738  ((*iter3).first)->checkCFLinks((*iter3).second,end,isAlreadyFed,true,info);
739  if(isAlreadyFed==FREE_ST)
740  if(!end->edIsManuallyInitialized())
742  isAlreadyFed=FREE_ST;
743  //
744  map < ComposedNode *, list<OutPort *>, SortHierarc >::reverse_iterator iter5=outputsBw.rbegin();
745  for(;iter5!=outputsBw.rend();iter5++)
746  ((*iter5).first)->checkCFLinks((*iter5).second,end,isAlreadyFed,false,info);
747 }
void ComposedNode::checkNoCrossHierachyWith ( Node node) const throw (Exception)
protected

This method check that G1 <- G2 <- G3 <- G1 does not happened. Typically called by methods that set a hierarchy (Bloc::edAddChild, Loop::edSetNode, ...).

Definition at line 658 of file ComposedNode.cxx.

Referenced by YACS::ENGINE::DynParaLoop::checkConsistencyAndSetNode(), and YACS::ENGINE::Loop::edSetNode().

659 {
660  ComposedNode *nodeC=dynamic_cast<ComposedNode *>(node);
661  if(!nodeC)
662  return ;
663  list<ComposedNode *> ascendants=getAllAscendanceOf();
664  if(find(ascendants.begin(),ascendants.end(),nodeC)!=ascendants.end())
665  {
666  const char what[]="ComposedNode::checkNoCrossHierachyWith : ComposedNode with name \"";
667  string stream(what); stream+=node->getName(); stream+="\" is already in hierarchy ascendance of node with name \"";
668  stream+=_name; stream+="\" ; So it can't be now in its descendance !";
669  throw Exception(stream);
670  }
671 }
virtual void YACS::ENGINE::ComposedNode::checkNoCyclePassingThrough ( Node node) throw (Exception)
protectedpure virtual
void ComposedNode::cleanNodes ( )
virtual

Clean the composed node in case of not clean exit.

This method should be called on a control-c or sigterm

Reimplemented from YACS::ENGINE::Node.

Definition at line 1614 of file ComposedNode.cxx.

References DEBTRACE, and edGetDirectDescendants().

Referenced by Handler().

1615 {
1616  DEBTRACE("ComposedNode::cleanNodes");
1617  list<Node *> nodes=edGetDirectDescendants();
1618  for(list<Node *>::iterator iter=nodes.begin();iter!=nodes.end();iter++)
1619  (*iter)->cleanNodes();
1620 }
void ComposedNode::connected ( )

Definition at line 1487 of file ComposedNode.cxx.

1488 {
1489 }
void ComposedNode::destructCFComputations ( LinkInfo info) const
protectedvirtual

destroy recursively all results of initial computations.

Reimplemented in YACS::ENGINE::Bloc.

Definition at line 683 of file ComposedNode.cxx.

References edGetDirectDescendants().

Referenced by YACS::ENGINE::Bloc::destructCFComputations().

684 {
685  list<Node *> nodes=edGetDirectDescendants();
686  for(list<Node *>::iterator iter=nodes.begin();iter!=nodes.end();iter++)
687  if(dynamic_cast<ComposedNode *>(*iter))
688  ((ComposedNode *)(*iter))->destructCFComputations(info);
689 }
bool ComposedNode::edAddCFLink ( Node nodeS,
Node nodeE 
) throw (Exception)

Add a controlflow link between two nodes.

Add a controlflow link between two nodes by calling edAddLink on their control ports

Definition at line 417 of file ComposedNode.cxx.

Referenced by YACS::ENGINE::Bloc::Bloc(), YACS::HMI::CommandAddControlLink::localExecute(), and YACS::HMI::SubjectNode::restoreLinks().

418 {
419  return edAddLink(nodeS->getOutGate(),nodeE->getInGate());
420 }
bool ComposedNode::edAddDFLink ( OutPort start,
InPort end 
) throw (Exception)
virtual

Connect an OutPort to an InPort and add the necessary control link.

Connect the ports with a data link (edAddLink) and add a control flow link between the children of the lowest common ancestor node.

Parameters
start: the OutPort to connect
end: the InPort to connect
Returns
true if a new link has been created, false otherwise.

Reimplemented in YACS::ENGINE::Loop, and YACS::ENGINE::DynParaLoop.

Definition at line 329 of file ComposedNode.cxx.

References DEBTRACE, YACS::ENGINE::Node::getFather(), YACS::ENGINE::Node::getName(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::ElementaryNode::getReadyTasks(), YACS::HMI::CommandAddLink::localExecute(), and YACS::HMI::SubjectNode::restoreLinks().

330 {
331  Node* n1=start->getNode();
332  Node* n2=end->getNode();
333  DEBTRACE( n1->getName() << ":" << n2->getName())
334  ComposedNode* father=getLowestCommonAncestor(n1,n2);
335  DEBTRACE( "ComposedNode::edAddDFLink: this="<<this->getName()
336  << " father=" << father->getName() )
337  DEBTRACE( "ComposedNode::edAddDFLink: OutPort=" << start->getName()
338  << " InPort=" << end->getName() )
339  if (father != this)
340  {
341  bool ret = father->edAddDFLink(start,end); // special treatement for loop
342  return ret;
343  }
344  if(n2 == father)
345  throw Exception("Back link authorized only in special context (loop for example)");
346 
347  bool ret= edAddLink(start,end);
348  if(n1 != father)
349  {
350  //add a control link only if nodes are not in the same descendance
351  //if n1 == father (n2 is after n1) : the control link is not needed
352  //if n2 == father (n1 is after n2) : it's a back link authorized only in loop context
353  while(n1->getFather() != father)
354  n1=n1->getFather();
355  while(n2->getFather() != father)
356  n2=n2->getFather();
357  try
358  {
359  edAddCFLink(n1,n2);
360  }
361  catch (Exception& ex)
362  {
363  // --- remove DF link already created in case of cycle dtection
364  DEBTRACE("Cycle detected, remove CF link");
365  if(start->isAlreadyLinkedWith(end))
366  edRemoveLink(start, end);
367  throw ex;
368  }
369  }
370  return ret;
371 }
bool ComposedNode::edAddLink ( OutPort start,
InPort end 
) throw (Exception)

Add a dataflow link between two data ports.

Precondition : 'start' AND 'end' are in/outputPort contained in a node in descendance of 'this'.

Exceptions
Exception: if incompatibility between input and output (type), or 'start'/'end' is/are NOT in/outputPort contained in a node in descendance of 'this', or a multiple link to an input not supporting it.
Returns
true if a new link has been created, false otherwise.

Definition at line 273 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_father, buildDelegateOf(), checkLinkPossibility(), DEBTRACE, YACS::ENGINE::Node::getAllAscendanceOf(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::Bloc::Bloc(), YACS::ENGINE::Loop::buildDelegateOf(), YACS::ENGINE::DynParaLoop::cloneAndPlaceNodesCoherently(), YACS::ENGINE::DynParaLoop::DynParaLoop(), edAddLink(), YACS::ENGINE::ForLoop::ForLoop(), YACS::ENGINE::ElementaryNode::getReadyTasks(), YACS::HMI::CommandAddLink::localExecute(), YACS::ENGINE::OptimizerLoop::OptimizerLoop(), YACS::HMI::SubjectNode::restoreLinks(), and YACS::ENGINE::WhileLoop::WhileLoop().

274 {
275  DEBTRACE("ComposedNode::edAddLink");
276  set<OutPort *> represented;
277 
278  start->getAllRepresented(represented);
279  if(represented.size()!=1)
280  {
281  bool ret=false;
282  for(set<OutPort *>::iterator iter=represented.begin();iter!=represented.end();iter++)
283  ret|=edAddLink(*iter,end);
284  return ret;
285  }
286  if(start->isAlreadyLinkedWith(end))
287  return false;
288  ComposedNode* lwstCmnAnctr=getLowestCommonAncestor(start->getNode(),end->getNode());
289  list<ComposedNode *> allAscendanceOfNodeStart=start->getNode()->getAllAscendanceOf(lwstCmnAnctr);
290  list<ComposedNode *> allAscendanceOfNodeEnd=end->getNode()->getAllAscendanceOf(lwstCmnAnctr);
291  checkInMyDescendance(lwstCmnAnctr);
292  lwstCmnAnctr->checkLinkPossibility(start,allAscendanceOfNodeStart,end,allAscendanceOfNodeEnd);
293  ComposedNode *iterS;
294  if(dynamic_cast<ComposedNode *>(start->getNode()))
295  iterS=(ComposedNode *)start->getNode();
296  else
297  iterS=start->getNode()->_father;
298  pair<OutPort *, OutPort *> pO(start,start);
299  while(iterS!=lwstCmnAnctr)
300  {
301  iterS->buildDelegateOf(pO, end, allAscendanceOfNodeEnd);
302  iterS=iterS->_father;
303  }
304  if(dynamic_cast<ComposedNode *>(end->getNode()))
305  iterS=(ComposedNode *)end->getNode();
306  else
307  iterS=end->getNode()->_father;
308 
309  InPort *currentPortI=end;
310  while(iterS!=lwstCmnAnctr)
311  {
312  iterS->buildDelegateOf(currentPortI, start, allAscendanceOfNodeStart);
313  iterS=iterS->_father;
314  }
315  bool ret=(pO.first)->addInPort(currentPortI);
316  end->edNotifyReferencedBy(pO.second);
317  return ret;
318 }
bool ComposedNode::edAddLink ( OutGate start,
InGate end 
) throw (Exception)

Add a controlflow link between two control ports.

Note
Precondition : 'start' AND 'end' are in/outGate contained in a node in DIRECT descendance of 'this'.
Exceptions
Exception: If a cycle has been detected, or incompatibility between input and output, or 'start'/'end' is/are NOT in/outputPort contained in a node in descendance of 'this', or a mutilple link to an input not supporting it.
Returns
true if a new link has been created, false otherwise.

Definition at line 383 of file ComposedNode.cxx.

References DEBTRACE, edAddLink(), and PMMLBasicsTestLauncher::ret.

384 {
385  Node* n1=start->getNode();
386  Node* n2=end->getNode();
387  if(n1==n2)
388  throw Exception("ComposedNode::edAddLink: can not add a control link to a node with itself",1);
389  ComposedNode* father=checkHavingCommonFather(start->getNode(),end->getNode());
390  if(father==0)
391  throw Exception("ComposedNode::edAddLink: Trying to add CF link on orphan nodes.");
392  if(father!=this)
393  {
394  checkInMyDescendance(father);
395  return father->edAddLink(start,end);
396  }
397  bool ret=start->edAddInGate(end);
398  if(ret)
399  try
400  {
402  }
403  catch (Exception& ex)
404  {
405  // --- remove created CF link in case of cycle detection
406  DEBTRACE("Cycle detected, remove CF link");
407  edRemoveCFLink(start->getNode(), end->getNode());
408  throw ex;
409  }
410  return ret;
411 }
void ComposedNode::edDisconnectAllLinksWithMe ( )
protectedvirtual

Called typically by ComposedNode to correctly update DF/CF/DS links

Reimplemented from YACS::ENGINE::Node.

Definition at line 899 of file ComposedNode.cxx.

References DEBTRACE, YACS::ENGINE::Node::edDisconnectAllLinksWithMe(), getSetOfLinksComingInCurrentScope(), and getSetOfLinksLeavingCurrentScope().

900 {
901  //CF
902  DEBTRACE("-");
904  //Leaving part
905  DEBTRACE("--");
906  vector< pair<OutPort *, InPort *> > linksToDestroy=getSetOfLinksLeavingCurrentScope();
907  vector< pair<OutPort *, InPort *> >::iterator iter;
908  for(iter=linksToDestroy.begin();iter!=linksToDestroy.end();iter++)
909  {
910  DEBTRACE("---");
911  (*iter).first->removeInPort((*iter).second,true);
912  }
913  //Arriving part
914  vector< pair<InPort *, OutPort *> > linksToDestroy2=getSetOfLinksComingInCurrentScope();
915  vector< pair<InPort *, OutPort *> >::iterator iter2;
916  for(iter2=linksToDestroy2.begin();iter2!=linksToDestroy2.end();iter2++)
917  {
918  DEBTRACE("----");
919  (*iter2).second->removeInPort((*iter2).first,true);
920  }
921 }
void ComposedNode::edRemoveCFLink ( Node nodeS,
Node nodeE 
) throw (Exception)

Remove a controlflow link.

Definition at line 423 of file ComposedNode.cxx.

Referenced by YACS::ENGINE::Bloc::removeRecursivelyRedundantCL(), and YACS::HMI::SubjectControlLink::~SubjectControlLink().

424 {
425  edRemoveLink(nodeS->getOutGate(),nodeE->getInGate());
426 }
void ComposedNode::edRemoveChild ( Node node) throw (Exception)
virtual
void ComposedNode::edRemoveLink ( OutPort start,
InPort end 
) throw (Exception)

Remove a dataflow link.

Precondition : 'start' AND 'end' are in/outputPort contained in a node in descendance of 'this'.

Exceptions
Exception: If the specified link does not exist. The content of Exception is different in accordance with the link from 'start' to 'end' implies DF/DS gateway.

Definition at line 437 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_father, getDelegateOf(), getName(), and releaseDelegateOf().

Referenced by YACS::ENGINE::InPort::edRemoveAllLinksLinkedWithMe(), and YACS::HMI::SubjectLink::localclean().

438 {
439  if(!start->isAlreadyLinkedWith(end))
440  throw Exception("ComposedNode::edRemoveLink : unexisting link");
441  ComposedNode* lwstCmnAnctr=getLowestCommonAncestor(start->getNode(),end->getNode());
442  checkInMyDescendance(lwstCmnAnctr);
443  list<ComposedNode *> allAscendanceOfNodeStart=start->getNode()->getAllAscendanceOf(lwstCmnAnctr);
444  list<ComposedNode *> allAscendanceOfNodeEnd=end->getNode()->getAllAscendanceOf(lwstCmnAnctr);
445 
446  // --- Part of test if the link from 'start' to 'end' really exist particulary all eventually intermediate ports created
447 
448  ComposedNode *iterS=start->getNode()->_father;
449  pair<OutPort *,OutPort *> currentPortO(start,start);
450  vector<pair< ComposedNode * , pair < OutPort* , OutPort *> > > needsToDestroyO;
451 
452  Node *nodeOTemp=start->getNode();
453  if(*nodeOTemp<*lwstCmnAnctr)
454  {
455  iterS=nodeOTemp->_father;
456  while(iterS!=lwstCmnAnctr)
457  {
458  if (!iterS)
459  {
460  stringstream what;
461  what << "ComposedNode::edRemoveLink: "
462  << start->getNode()->getName() << "." <<start->getName() << "->"
463  << end->getNode()->getName() << "." << end->getName();
464  throw Exception(what.str());
465  }
466  OutPort *tmp=currentPortO.first;
467  iterS->getDelegateOf(currentPortO, end, allAscendanceOfNodeEnd);
468  needsToDestroyO.push_back(pair< ComposedNode * , pair < OutPort* , OutPort *> >(iterS,pair<OutPort* , OutPort *> (tmp,currentPortO.first)));
469  iterS=iterS->_father;
470  }
471  }
472  Node *nodeTemp=end->getNode();
473  InPort * currentPortI=end;
474  if(*nodeTemp<*lwstCmnAnctr)
475  {
476  iterS=nodeTemp->_father;
477  while(iterS!=lwstCmnAnctr)
478  {
479  if (!iterS)
480  {
481  stringstream what;
482  what << "ComposedNode::edRemoveLink: "
483  << start->getNode()->getName() << "." <<start->getName() << "->"
484  << end->getNode()->getName() << "." << end->getName();
485  throw Exception(what.str());
486  }
487  iterS->getDelegateOf(currentPortI, start, allAscendanceOfNodeStart);
488  iterS=iterS->_father;
489  }
490  }
491  // --- End of test for evt intermediate ports created
492 
493  (currentPortO.first)->removeInPort(currentPortI,false);
494  set<OutPort *> repr;
495  (currentPortO.second)->getAllRepresented(repr);
496  if(repr.size()==1)
497  end->edNotifyDereferencedBy(currentPortO.second);
498 
499  // --- Performing deletion of intermediate ports
500 
501  iterS=start->getNode()->_father;
502  vector<pair< ComposedNode * , pair < OutPort* , OutPort *> > >::reverse_iterator iter;
503  for(iter=needsToDestroyO.rbegin();iter!=needsToDestroyO.rend();iter++)
504  (*iter).first->releaseDelegateOf(((*iter).second).first, ((*iter).second).second, end,allAscendanceOfNodeEnd);
505  nodeTemp=end->getNode();
506  if(*nodeTemp<*lwstCmnAnctr)
507  {
508  iterS=end->getNode()->_father;
509  currentPortI=end;
510  while(iterS!=lwstCmnAnctr)
511  {
512  iterS->releaseDelegateOf(currentPortI, start, allAscendanceOfNodeStart);
513  iterS=iterS->_father;
514  }
515  }
516 }
void ComposedNode::edRemoveLink ( OutGate start,
InGate end 
) throw (Exception)

Remove a controlflow link.

Definition at line 519 of file ComposedNode.cxx.

520 {
521  ComposedNode* father=checkHavingCommonFather(start->getNode(),end->getNode());
522  if(father!=this)
523  throw Exception("edRemoveLink : nodes not in direct descendance of this");
524  start->edRemoveInGate(end);
525 }
void ComposedNode::edUpdateState ( )
virtual

update the status of the node

Only useful when editing a schema Do nothing in base Node : to implement in derived classes

Reimplemented from YACS::ENGINE::Node.

Definition at line 1517 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_errorDetails, YACS::ENGINE::Node::_modified, YACS::ENGINE::Node::_state, checkBasicConsistency(), DEBTRACE, edGetDirectDescendants(), YACS::INVALID, YACS::READY, YACS::ENGINE::Node::setState(), CORBAEngineTest::state, and YACS::Exception::what().

Referenced by YACS::ENGINE::Proc::modified(), and YACS::ENGINE::Proc::setEdition().

1518 {
1519  DEBTRACE("ComposedNode::edUpdateState(): " << _state << " " << _modified);
1521 
1522  try
1523  {
1525  _errorDetails="";
1526  }
1527  catch(Exception& e)
1528  {
1529  state=YACS::INVALID;
1530  _errorDetails=e.what();
1531  }
1532  DEBTRACE("ComposedNode::edUpdateState: " << _errorDetails);
1533 
1534  //update children if needed
1535  list<Node *> constituents=edGetDirectDescendants();
1536  for(list<Node *>::iterator iter=constituents.begin(); iter!=constituents.end(); iter++)
1537  {
1538  if(!(*iter)->isValid())
1539  state=YACS::INVALID;
1540  }
1541  if(state != _state)
1542  setState(state);
1543  _modified=0;
1544 }
std::set< InPort * > ComposedNode::getAllInPortsComingFromOutsideOfCurrentScope ( ) const
virtual

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.

Implements YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::Switch.

Definition at line 881 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getSetOfInPort(), isInMyDescendance(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::Switch::getAllInPortsComingFromOutsideOfCurrentScope(), getSetOfLinksComingInCurrentScope(), and YACS::ENGINE::DynParaLoop::prepareInputsFromOutOfScope().

882 {
883  set<InPort *> ret;
884  list<InPort *> temp=getSetOfInPort();
885  for(list<InPort *>::iterator iter2=temp.begin();iter2!=temp.end();iter2++)
886  {
887  set<OutPort *> temp2=(*iter2)->edSetOutPort();
888  for(set<OutPort *>::iterator iter3=temp2.begin();iter3!=temp2.end();iter3++)
889  if(*iter3)
890  if(!isInMyDescendance((*iter3)->getNode()))
891  {
892  ret.insert(*iter2);
893  break;
894  }
895  }
896  return ret;
897 }
std::set< OutPort * > ComposedNode::getAllOutPortsLeavingCurrentScope ( ) const
virtual

List all output ports of children nodes that are linked to out of scope input ports.

Note
List all output ports of nodes sons of 'this' that are linked to input ports of nodes not in descendance of 'this'. This method contrary to getAllInPortsComingFromOutsideOfCurrentScope is NOT virtual because for the moment all daughter classes have no more hidden YACS::ENGINE::OutPort.

Implements YACS::ENGINE::Node.

Definition at line 857 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getSetOfOutPort(), isInMyDescendance(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::ForLoop::exUpdateState(), YACS::ENGINE::WhileLoop::exUpdateState(), YACS::ENGINE::OptimizerLoop::exUpdateState(), YACS::ENGINE::Switch::exUpdateState(), YACS::ENGINE::ForEachLoop::exUpdateState(), getSetOfLinksLeavingCurrentScope(), and YACS::ENGINE::OptimizerLoop::initInterceptors().

858 {
859  set<OutPort *> ret;
860  list<OutPort *> temp=getSetOfOutPort();
861  for(list<OutPort *>::iterator iter2=temp.begin();iter2!=temp.end();iter2++)
862  {
863  set<InPort *> temp2=(*iter2)->edSetInPort();
864  for(set<InPort *>::iterator iter3=temp2.begin();iter3!=temp2.end();iter3++)
865  if(!isInMyDescendance((*iter3)->getNode()))
866  {
867  ret.insert(*iter2);
868  break;
869  }
870  }
871  return ret;
872 }
list< Node * > ComposedNode::getAllRecursiveConstituents ( )
virtual

Idem getAllRecursiveNodes, but this node is NOT included.

Definition at line 1130 of file ComposedNode.cxx.

References edGetDirectDescendants(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::OptimizerLoop::finalize(), YACS::ENGINE::DynParaLoop::forwardExecStateToOriginalBody(), YACS::ENGINE::Proc::getIds(), YACS::ENGINE::Proc::getNumIds(), and YACS::ENGINE::ForEachLoop::updateStateForWorkNodeOnFinishedEventFrom().

1131 {
1132  list<Node *> ret;
1133  list<Node *> setOfNode=edGetDirectDescendants();
1134  for(list<Node *>::const_iterator iter=setOfNode.begin();iter!=setOfNode.end();iter++)
1135  {
1136  if ( dynamic_cast<ComposedNode*> (*iter) )
1137  {
1138  list<Node *> myCurrentSet=((ComposedNode*)(*iter))->getAllRecursiveConstituents();
1139  ret.insert(ret.end(),myCurrentSet.begin(),myCurrentSet.end());
1140  ret.push_back(*iter);
1141  }
1142  else
1143  {
1144  list<ElementaryNode *> myCurrentSet=(*iter)->getRecursiveConstituents();
1145  ret.insert(ret.end(),myCurrentSet.begin(),myCurrentSet.end());
1146  }
1147  }
1148  return ret;
1149 }
list< Node * > ComposedNode::getAllRecursiveNodes ( )

Get all children nodes elementary and composed including this node.

Definition at line 1152 of file ComposedNode.cxx.

References edGetDirectDescendants(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::HMI::SubjectNode::registerUndoDestroy().

1153 {
1154  list<Node *> ret;
1155  list<Node *> setOfNode=edGetDirectDescendants();
1156  for(list<Node *>::iterator iter=setOfNode.begin();iter!=setOfNode.end();iter++)
1157  {
1158  if ( dynamic_cast<ElementaryNode*> (*iter) )
1159  {
1160  list<ElementaryNode *> myCurrentSet=(*iter)->getRecursiveConstituents();
1161  ret.insert(ret.end(),myCurrentSet.begin(),myCurrentSet.end());
1162  }
1163  else
1164  {
1165  list<Node *> myCurrentSet=((ComposedNode*)(*iter))->getAllRecursiveNodes();
1166  ret.insert(ret.end(),myCurrentSet.begin(),myCurrentSet.end());
1167  }
1168  }
1169  ret.push_back(this);
1170  return ret;
1171 }
Node * ComposedNode::getChildByName ( const std::string &  name) const throw (Exception)
virtual

Implements YACS::ENGINE::Node.

Definition at line 995 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getChildByName(), and splitNamesBySep().

Referenced by YACS::ENGINE::Bloc::Bloc(), YACS::ENGINE::DynParaLoop::cloneAndPlaceNodesCoherently(), DefineCustomObservers(), YACS::ENGINE::DynParaLoop::forwardExecStateToOriginalBody(), YACS::ENGINE::DynParaLoop::getDynInputPortByAbsName(), YACS::ENGINE::ForEachLoop::getDynOutPortByAbsName(), YACS::HMI::SceneBlocItem::getNodesInfo(), YACS::HMI::YACSGuiLoader::getPrsData(), YACS::HMI::CommandAddNodeFromCatalog::localExecute(), YACS::HMI::CommandReparentNode::localExecute(), YACS::HMI::CommandPutInComposedNode::localExecute(), YACS::HMI::CommandCopyNode::localExecute(), YACS::HMI::CommandRenameNode::localExecute(), YACS::HMI::CommandRenameInDataPort::localExecute(), YACS::HMI::CommandRenameOutDataPort::localExecute(), YACS::HMI::CommandAddInputPortFromCatalog::localExecute(), YACS::HMI::CommandAddOutputPortFromCatalog::localExecute(), YACS::HMI::CommandAddIDSPortFromCatalog::localExecute(), YACS::HMI::CommandAddODSPortFromCatalog::localExecute(), YACS::HMI::CommandOrderInputPorts::localExecute(), YACS::HMI::CommandOrderOutputPorts::localExecute(), YACS::HMI::CommandSetInPortValue::localExecute(), YACS::HMI::CommandSetOutPortValue::localExecute(), YACS::HMI::CommandSetSwitchSelect::localExecute(), YACS::HMI::CommandSetSwitchCase::localExecute(), YACS::HMI::CommandSetForLoopSteps::localExecute(), YACS::HMI::CommandSetWhileCondition::localExecute(), YACS::HMI::CommandSetForEachBranch::localExecute(), YACS::HMI::CommandSetAlgo::localExecute(), YACS::HMI::CommandAddLink::localExecute(), YACS::HMI::CommandAddControlLink::localExecute(), YACS::HMI::CommandSetNodeProperties::localExecute(), YACS::HMI::CommandSetDSPortProperties::localExecute(), YACS::HMI::CommandSetLinkProperties::localExecute(), YACS::HMI::CommandSetFuncNodeFunctionName::localExecute(), YACS::HMI::CommandSetInlineNodeScript::localExecute(), YACS::HMI::CommandSetExecutionMode::localExecute(), YACS::HMI::CommandSetContainer::localExecute(), YACS::HMI::CommandAssociateServiceToComponent::localExecute(), YACS::HMI::CommandAddComponentFromCatalog::localExecute(), YACS::HMI::CommandDestroy::localExecute(), YACS::HMI::CommandAddNodeFromCatalog::localReverse(), YACS::HMI::CommandReparentNode::localReverse(), YACS::HMI::CommandPutInComposedNode::localReverse(), YACS::HMI::CommandCopyNode::localReverse(), YACS::HMI::CommandRenameNode::localReverse(), YACS::HMI::CommandRenameInDataPort::localReverse(), YACS::HMI::CommandRenameOutDataPort::localReverse(), YACS::HMI::CommandAddInputPortFromCatalog::localReverse(), YACS::HMI::CommandAddOutputPortFromCatalog::localReverse(), YACS::HMI::CommandAddIDSPortFromCatalog::localReverse(), YACS::HMI::CommandAddODSPortFromCatalog::localReverse(), YACS::HMI::CommandOrderInputPorts::localReverse(), YACS::HMI::CommandOrderOutputPorts::localReverse(), YACS::HMI::CommandSetInPortValue::localReverse(), YACS::HMI::CommandSetOutPortValue::localReverse(), YACS::HMI::CommandSetSwitchSelect::localReverse(), YACS::HMI::CommandSetSwitchCase::localReverse(), YACS::HMI::CommandSetForLoopSteps::localReverse(), YACS::HMI::CommandSetWhileCondition::localReverse(), YACS::HMI::CommandSetForEachBranch::localReverse(), YACS::HMI::CommandSetAlgo::localReverse(), YACS::HMI::CommandAddLink::localReverse(), YACS::HMI::CommandAddControlLink::localReverse(), YACS::HMI::CommandSetNodeProperties::localReverse(), YACS::HMI::CommandSetDSPortProperties::localReverse(), YACS::HMI::CommandSetLinkProperties::localReverse(), YACS::HMI::CommandSetFuncNodeFunctionName::localReverse(), YACS::HMI::CommandSetInlineNodeScript::localReverse(), YACS::HMI::CommandSetExecutionMode::localReverse(), YACS::HMI::CommandSetContainer::localReverse(), YACS::HMI::CommandAssociateServiceToComponent::localReverse(), YACS::HMI::CommandAddComponentFromCatalog::localReverse(), performDuplicationOfPlacement(), performShallowDuplicationOfPlacement(), YACS::HMI::GuiObserver_i::setConversion(), and YACS::ENGINE::Node::setName().

996 {
997  string potentiallyDirectSonName, remainsPath;
998  bool forwardNeeded=ComposedNode::splitNamesBySep(name, SEP_CHAR_BTW_LEVEL,
999  potentiallyDirectSonName,remainsPath,false);
1000  Node *child=getChildByShortName(potentiallyDirectSonName);
1001  if(!forwardNeeded)
1002  return child;
1003  else
1004  return child->getChildByName(remainsPath);
1005 }
virtual Node* YACS::ENGINE::ComposedNode::getChildByShortName ( const std::string &  name) const throw (Exception)
protectedpure virtual
string ComposedNode::getChildName ( const Node node) const throw (Exception)

Definition at line 964 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_father, and YACS::ENGINE::Node::getQualifiedName().

Referenced by YACS::HMI::SubjectElementaryNode::addIDSPort(), YACS::HMI::SubjectElementaryNode::addInputPort(), YACS::HMI::SubjectElementaryNode::addODSPort(), YACS::HMI::SubjectElementaryNode::addOutputPort(), YACS::HMI::SceneBlocItem::arrangeCanvasNodes(), YACS::HMI::SubjectServiceNode::associateToComponent(), YACS::ENGINE::Bloc::Bloc(), YACS::HMI::SubjectNode::copy(), YACS::HMI::SubjectComposedNode::createNode(), YACS::HMI::Subject::destroy(), YACS::HMI::EditionNode::EditionNode(), YACS::ENGINE::DynParaLoop::forwardExecStateToOriginalBody(), YACS::ENGINE::Node::getDPLScopeInfo(), YACS::ENGINE::Node::getId(), YACS::ENGINE::Proc::getIds(), YACS::ENGINE::LinkInfo::getInfoRepr(), YACS::HMI::SceneBlocItem::getNodesInfo(), getTaskName(), YACS::HMI::CommandReparentNode::localExecute(), YACS::HMI::CommandPutInComposedNode::localExecute(), YACS::HMI::CommandRenameNode::localExecute(), YACS::HMI::CommandSetSwitchCase::localExecute(), YACS::HMI::CommandPutInComposedNode::localReverse(), YACS::HMI::SubjectElementaryNode::OrderDataPorts(), performDuplicationOfPlacement(), performShallowDuplicationOfPlacement(), YACS::HMI::SubjectNode::putInComposedNode(), YACS::HMI::SubjectDataPort::registerUndoDestroy(), YACS::HMI::SubjectInputDataStreamPort::registerUndoDestroy(), YACS::HMI::SubjectOutputDataStreamPort::registerUndoDestroy(), YACS::HMI::SubjectNode::registerUndoDestroy(), YACS::HMI::SubjectLink::registerUndoDestroy(), YACS::HMI::SubjectControlLink::registerUndoDestroy(), YACS::HMI::SubjectNode::reparent(), YACS::HMI::SubjectOptimizerLoop::setAlgorithm(), YACS::HMI::SubjectSwitch::setCase(), YACS::HMI::SubjectServiceNode::setComponentFromCatalog(), YACS::HMI::SubjectWhileLoop::setCondition(), YACS::HMI::SubjectInlineNode::setContainer(), YACS::HMI::SubjectInlineNode::setExecutionMode(), YACS::HMI::SubjectPyFuncNode::setFunctionName(), YACS::HMI::GuiExecutor::setInPortValue(), YACS::HMI::SubjectDataPort::setName(), YACS::HMI::SubjectNode::setName(), YACS::HMI::SubjectDynParaLoop::setNbBranches(), YACS::HMI::SubjectForLoop::setNbSteps(), YACS::HMI::SubjectInputDataStreamPort::setProperties(), YACS::HMI::SubjectOutputDataStreamPort::setProperties(), YACS::HMI::SubjectNode::setProperties(), YACS::HMI::SubjectLink::setProperties(), YACS::HMI::SubjectInlineNode::setScript(), YACS::HMI::SubjectSwitch::setSelect(), YACS::HMI::SubjectInputPort::setValue(), YACS::HMI::SubjectOutputPort::setValue(), YACS::HMI::SubjectControlLink::SubjectControlLink(), YACS::HMI::SubjectLink::SubjectLink(), YACS::HMI::SchemaNodeItem::toggleState(), YACS::HMI::SubjectDataPort::tryCreateLink(), YACS::HMI::SchemaComponentItem::update(), YACS::HMI::EditionNode::update(), YACS::ENGINE::VisitorSaveState::visitBloc(), YACS::ENGINE::VisitorSaveSchema::visitBloc(), YACS::ENGINE::VisitorSaveSchema::visitDynParaLoop(), YACS::ENGINE::VisitorSaveState::visitElementaryNode(), YACS::ENGINE::VisitorSaveSchema::visitElementaryNode(), YACS::ENGINE::VisitorSalomeSaveState::visitForEachLoop(), YACS::ENGINE::VisitorSaveState::visitForEachLoop(), YACS::ENGINE::VisitorSaveSchema::visitForEachLoop(), YACS::ENGINE::VisitorSaveState::visitForLoop(), YACS::ENGINE::VisitorSaveSchema::visitForLoop(), YACS::ENGINE::VisitorSaveSchema::visitInlineFuncNode(), YACS::ENGINE::VisitorSaveSchema::visitInlineNode(), YACS::ENGINE::VisitorSaveState::visitLoop(), YACS::ENGINE::VisitorSaveSchema::visitLoop(), YACS::ENGINE::VisitorSaveState::visitOptimizerLoop(), YACS::ENGINE::VisitorSaveSchema::visitOptimizerLoop(), YACS::ENGINE::VisitorSaveSalomeSchema::visitOutNode(), YACS::ENGINE::VisitorSaveSchema::visitOutNode(), YACS::ENGINE::VisitorSaveSalomeSchema::visitPresetNode(), YACS::ENGINE::VisitorSaveSchema::visitPresetNode(), YACS::ENGINE::VisitorSaveState::visitProc(), YACS::ENGINE::VisitorSaveSchema::visitServerNode(), YACS::ENGINE::VisitorSaveSchema::visitServiceInlineNode(), YACS::ENGINE::VisitorSaveSchema::visitServiceNode(), YACS::ENGINE::VisitorSaveSalomeSchema::visitStudyInNode(), YACS::ENGINE::VisitorSaveSchema::visitStudyInNode(), YACS::ENGINE::VisitorSaveSalomeSchema::visitStudyOutNode(), YACS::ENGINE::VisitorSaveSchema::visitStudyOutNode(), YACS::ENGINE::VisitorSaveState::visitSwitch(), YACS::ENGINE::VisitorSaveSchema::visitSwitch(), YACS::ENGINE::VisitorSaveState::visitWhileLoop(), YACS::ENGINE::VisitorSaveSchema::visitWhileLoop(), YACS::ENGINE::VisitorSaveSchema::writeControls(), YACS::ENGINE::VisitorSaveSchema::writeParametersNode(), YACS::HMI::VisitorSaveGuiSchema::writePresentation(), YACS::ENGINE::VisitorSaveSchema::writeSimpleDataLinks(), and YACS::ENGINE::VisitorSaveSchema::writeSimpleStreamLinks().

965 {
966  string nodeName=node->getQualifiedName();
967  if (!isNodeAlreadyAggregated(node))
968  {
969  if (node->getName() == "thisIsAFakeNode")
970  {
971  string child = node->getName()+".thisIsAFakeNode";
972  return child;
973  }
974  else
975  {
976  string what("node "); what+= node->getName() ; what+=" is not a child of node "; what += getName();
977  throw Exception(what);
978  }
979  }
980 
981  const Node *father = node->_father;
982  while (father != this)
983  {
984  nodeName = father->getQualifiedName() + SEP_CHAR_BTW_LEVEL + nodeName;
985  father = father->_father;
986  }
987  return nodeName;
988 }
void ComposedNode::getDelegateOf ( InPort *&  port,
OutPort initialStart,
const std::list< ComposedNode * > &  pointsOfView 
) throw (Exception)
protectedvirtual

Reimplemented in YACS::ENGINE::Loop.

Definition at line 1468 of file ComposedNode.cxx.

Referenced by YACS::ENGINE::OutPort::calculateHistoryOfLinkWith(), and edRemoveLink().

1469 {
1470 }
void ComposedNode::getDelegateOf ( std::pair< OutPort *, OutPort * > &  port,
InPort finalTarget,
const std::list< ComposedNode * > &  pointsOfView 
) throw (Exception)
protectedvirtual

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Loop, and YACS::ENGINE::Switch.

Definition at line 1472 of file ComposedNode.cxx.

1473 {
1474 }
DeploymentTree ComposedNode::getDeploymentTree ( ) const
virtual

Essentially for test. Use checkDeploymentTree instead to be sure that returned DeploymentTree is consistent.

Implements YACS::ENGINE::Scheduler.

Definition at line 176 of file ComposedNode.cxx.

References YACS::ENGINE::DeploymentTree::appendTask(), getRecursiveConstituents(), and PMMLBasicsTestLauncher::ret.

Referenced by performDuplicationOfPlacement(), performShallowDuplicationOfPlacement(), and YACS::ENGINE::Proc::updateContainersAndComponents().

177 {
179  list< ElementaryNode * > tasks=getRecursiveConstituents();
180  for(list< ElementaryNode * >::iterator iter=tasks.begin();iter!=tasks.end();iter++)
181  ret.appendTask(*iter,(*iter)->getDynClonerIfExists(this));
182  return ret;
183 }
std::string ComposedNode::getErrorReport ( )
virtual

returns a string that contains an error report if the node is in error

Reimplemented from YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::DynParaLoop.

Definition at line 1546 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_errorDetails, YACS::ENGINE::Node::_state, DEBTRACE, edGetDirectDescendants(), YACS::ERROR, YACS::FAILED, YACS::ENGINE::Node::getEffectiveState(), getName(), and YACS::INVALID.

Referenced by main(), and YACS::HMI::EditionProc::synchronize().

1547 {
1548  DEBTRACE("ComposedNode::getErrorReport: " << getName() << " " << _state);
1549  YACS::StatesForNode effectiveState=getEffectiveState();
1550 
1551  if(effectiveState != YACS::INVALID && effectiveState != YACS::ERROR && effectiveState != YACS::FAILED)
1552  return "";
1553 
1554  std::string report="<error node= " + getName();
1555  switch(effectiveState)
1556  {
1557  case YACS::INVALID:
1558  report=report+" state= INVALID";
1559  break;
1560  case YACS::ERROR:
1561  report=report+" state= ERROR";
1562  break;
1563  case YACS::FAILED:
1564  report=report+" state= FAILED";
1565  break;
1566  default:
1567  break;
1568  }
1569  report=report + ">\n" ;
1570  if(_errorDetails != "")
1571  report=report+_errorDetails+"\n";
1572 
1573  list<Node *> constituents=edGetDirectDescendants();
1574  for(list<Node *>::iterator iter=constituents.begin(); iter!=constituents.end(); iter++)
1575  {
1576  std::string rep=(*iter)->getErrorReport();
1577  if(rep != "")
1578  {
1579  report=report+rep+"\n";
1580  }
1581  }
1582  report=report+"</error>";
1583  return report;
1584 }
string ComposedNode::getInPortName ( const InPort inPort) const throw (Exception)
virtual

Get the input port name.

get the input port name used by the current node, recursively built with children names.

Implements YACS::ENGINE::Node.

Definition at line 1196 of file ComposedNode.cxx.

Referenced by YACS::ENGINE::CollectorSwOutPort::CollectorSwOutPort(), YACS::ENGINE::LinkInfo::getErrRepr(), YACS::ENGINE::LinkInfo::getInfoRepr(), YACS::ENGINE::LinkInfo::getWarnRepr(), and YACS::ENGINE::DynParaLoop::prepareInputsFromOutOfScope().

1197 {
1198  return getPortName<InPort>(inPort);
1199 }
InputDataStreamPort * ComposedNode::getInputDataStreamPort ( const std::string &  name) const throw (Exception)
virtual

Implements YACS::ENGINE::Node.

Definition at line 1333 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getInputDataStreamPort(), and YACS::ENGINE::Node::SEP_CHAR_IN_PORT.

1334 {
1335  string portName, nodeName;
1336  if(splitNamesBySep(name,Node::SEP_CHAR_IN_PORT,nodeName,portName,true))
1337  {
1338  Node *child = getChildByName(nodeName);
1339  return child->getInputDataStreamPort(portName);
1340  }
1341  else
1342  {
1343  string what("ComposedNode::getInputDataStreamPort : the port with name "); what+=name; what+=" does not exist on the current level";
1344  throw Exception(what);
1345  }
1346 }
InputPort * ComposedNode::getInputPort ( const std::string &  name) const throw (Exception)
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::Node.

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Switch, YACS::ENGINE::OptimizerLoop, YACS::ENGINE::DynParaLoop, YACS::ENGINE::WhileLoop, and YACS::ENGINE::ForLoop.

Definition at line 1293 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getInputPort(), and YACS::ENGINE::Node::SEP_CHAR_IN_PORT.

Referenced by YACS::ENGINE::ForLoop::getInputPort(), YACS::ENGINE::WhileLoop::getInputPort(), YACS::ENGINE::DynParaLoop::getInputPort(), and YACS::ENGINE::Switch::getInputPort().

1294 {
1295  try {
1296  return Node::getInputPort(name);
1297  }
1298  catch(Exception& e) {}
1299 
1300  string portName, nodeName;
1301  if(splitNamesBySep(name,Node::SEP_CHAR_IN_PORT,nodeName,portName,true))
1302  {
1303  Node *child = getChildByName(nodeName);
1304  return child->getInputPort(portName);
1305  }
1306  else
1307  {
1308  string what("ComposedNode::getInputPort : the port with name "); what+=name; what+=" does not exist on the current level";
1309  throw Exception(what);
1310  }
1311 }
std::list< InputPort * > ComposedNode::getLocalInputPorts ( ) const
virtual

redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself

Implements YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Switch, YACS::ENGINE::DynParaLoop, YACS::ENGINE::OptimizerLoop, YACS::ENGINE::ForLoop, and YACS::ENGINE::WhileLoop.

Definition at line 1501 of file ComposedNode.cxx.

Referenced by checkBasicConsistency(), YACS::ENGINE::DynParaLoop::getLocalInputPorts(), YACS::ENGINE::Switch::getLocalInputPorts(), and YACS::HMI::SubjectComposedNode::loadChildren().

1502 {
1503  std::list<InputPort *> lip; return lip; // empty list
1504 }
std::list< OutputPort * > ComposedNode::getLocalOutputPorts ( ) const
virtual

redefined on derived class of ComposedNode. by default a ComposedNode has no port by itself

Implements YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::OptimizerLoop, YACS::ENGINE::DynParaLoop, and YACS::ENGINE::ForLoop.

Definition at line 1507 of file ComposedNode.cxx.

Referenced by YACS::ENGINE::DynParaLoop::getLocalOutputPorts(), and YACS::HMI::SubjectComposedNode::loadChildren().

1508 {
1509  std::list<OutputPort *> lop; return lop; // empty list
1510 }
ComposedNode * ComposedNode::getLowestCommonAncestor ( Node node1,
Node node2 
) throw (Exception)
static

Retrieves the lowest common ancestor of 2 nodes.

Note
Retrieves the lowest common ancestor of 'node1' AND 'node2'. If 'node1' or 'node2' are both or indiscriminately instances of ComposedNode and that 'node1' is in descendance of 'node2' (resp. 'node2' in descendance of 'node1') 'node2' is returned (resp. 'node1').
Exceptions
Exception: if 'node1' and 'node2' do not share the same genealogy.
Returns
The lowest common ancestor if it exists.

Definition at line 1046 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_father.

Referenced by YACS::ENGINE::Bloc::Bloc(), YACS::ENGINE::OutPort::calculateHistoryOfLinkWith(), and YACS::ENGINE::ForEachLoop::getFEDeltaBetween().

1047 {
1048  const char what[]="The two nodes do not share the same genealogy";
1049  if(node1==0 || node2==0)
1050  throw Exception(what);
1051  ComposedNode *temp;
1052  if(dynamic_cast<ComposedNode *>(node1))
1053  temp=(ComposedNode *)node1;//->_father;
1054  else
1055  temp=(ComposedNode *)node1->_father;
1056  set<ComposedNode *> s;
1057  while(temp)
1058  {
1059  s.insert(temp);
1060  temp=temp->_father;
1061  }
1062  //
1063  if(dynamic_cast<ComposedNode *>(node2))
1064  temp=(ComposedNode *)node2;//->_father;
1065  else
1066  temp=(ComposedNode *)node2->_father;
1067  set<ComposedNode *>::iterator iter=s.find(temp);
1068  while(temp && iter==s.end())
1069  {
1070  iter=s.find(temp);
1071  temp=temp->_father;
1072  }
1073  if(iter==s.end())
1074  throw Exception(what);
1075  return *iter;
1076 }
std::string ComposedNode::getLowestCommonAncestorStr ( const std::string &  node1,
const std::string &  node2 
)
static

Same as getLowestCommonAncestor method except that absolute string representation is considered here instead of instances.

Definition at line 1081 of file ComposedNode.cxx.

References PMMLBasicsTestLauncher::ret, and SEP_CHAR_BTW_LEVEL.

1082 {
1083  std::string ret;
1084  std::size_t it1_b(0),it1_e(0),it2_b(0),it2_e(0);
1085  while(it1_b!=std::string::npos && it2_b!=std::string::npos)
1086  {
1087  it1_e=node1.find(SEP_CHAR_BTW_LEVEL,it1_b);
1088  it2_e=node2.find(SEP_CHAR_BTW_LEVEL,it2_b);
1089  if(it1_e!=it2_e && it1_e!=std::string::npos && it2_e!=std::string::npos)
1090  break;
1091  std::string elt1(node1.substr(it1_b,it1_e-it1_b)),elt2(node2.substr(it2_b,it2_e-it2_b));
1092  if(elt1!=elt2)
1093  break;
1094  if(!ret.empty())
1095  ret+=SEP_CHAR_BTW_LEVEL;
1096  ret+=elt1;
1097  it1_b=node1.find_first_not_of(SEP_CHAR_BTW_LEVEL,it1_e);
1098  it2_b=node2.find_first_not_of(SEP_CHAR_BTW_LEVEL,it2_e);
1099  }
1100  return ret;
1101 }
Node * ComposedNode::getLowestNodeDealingAll ( const std::list< OutPort * > &  ports) const
protected

Returns the lowest Node (Elementary or Composed) (is sense of hierachy level ( operator< ) ) containing all 'ports'. Typically use in consistency computation. Precondition : 'ports' must contain at least one element. All elements of 'ports' should be in descendance of 'this'.

Definition at line 696 of file ComposedNode.cxx.

References PMMLBasicsTestLauncher::ret.

Referenced by solveObviousOrDelegateCFLinks().

697 {
698  list< OutPort *>::const_iterator iter=ports.begin();
699  Node *ret=(*iter)->getNode();
700  iter++;
701  for(;iter!=ports.end();iter++)
702  {
703  Node *tmp=(*iter)->getNode();
704  if(*tmp>*ret)
705  ret=tmp;
706  }
707  return ret;
708 }
std::string ComposedNode::getMyQualifiedName ( const Node directSon) const
virtual

Reimplemented in YACS::ENGINE::Switch.

Definition at line 990 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getName().

Referenced by YACS::ENGINE::Node::getQualifiedName().

991 {
992  return directSon->getName();
993 }
std::string ComposedNode::getName ( ) const
virtual

Implements YACS::ENGINE::Scheduler.

Definition at line 165 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getName().

Referenced by YACS::HMI::SceneBlocItem::arrangeChildNodes(), YACS::looptypeParser< T >::bloc(), YACS::casetypeParser::bloc(), YACS::bloctypeParser< T >::bloc(), YACS::ENGINE::OptimizerLoop::checkTypeCode(), YACS::ENGINE::DynParaLoop::cloneAndPlaceNodesCoherently(), YACS::ENGINE::CollectorSwOutPort::CollectorSwOutPort(), YACS::HMI::SubjectNode::copy(), YACS::HMI::Subject::destroy(), YACS::ENGINE::DFToDSForLoop::DFToDSForLoop(), YACS::ENGINE::DSToDFForLoop::DSToDFForLoop(), edRemoveLink(), YACS::ENGINE::ForLoop::exUpdateState(), YACS::looptypeParser< T >::foreach(), YACS::casetypeParser::foreach(), YACS::bloctypeParser< T >::foreach(), YACS::looptypeParser< T >::forloop(), YACS::casetypeParser::forloop(), YACS::bloctypeParser< T >::forloop(), YACS::ENGINE::DynParaLoop::getErrorReport(), getErrorReport(), YACS::ENGINE::Node::getId(), YACS::ENGINE::ProcCataLoader::loadCata(), YACS::HMI::CommandReparentNode::localExecute(), YACS::HMI::CommandPutInComposedNode::localExecute(), YACS::HMI::CommandCopyNode::localExecute(), YACS::HMI::CommandRenameNode::localExecute(), YACS::HMI::CommandRenameInDataPort::localExecute(), YACS::HMI::CommandRenameOutDataPort::localExecute(), YACS::HMI::CommandAddLink::localExecute(), YACS::HMI::CommandAddControlLink::localExecute(), YACS::HMI::CommandAssociateServiceToComponent::localExecute(), YACS::HMI::CommandReparentNode::localReverse(), YACS::HMI::CommandPutInComposedNode::localReverse(), YACS::HMI::CommandCopyNode::localReverse(), YACS::HMI::CommandRenameNode::localReverse(), YACS::HMI::CommandRenameInDataPort::localReverse(), YACS::HMI::CommandRenameOutDataPort::localReverse(), YACS::HMI::CommandAssociateServiceToComponent::localReverse(), YACS::looptypeParser< T >::optimizer(), YACS::casetypeParser::optimizer(), YACS::bloctypeParser< T >::optimizer(), YACS::roottypeParser::proc(), YACS::HMI::SubjectNode::registerUndoDestroy(), YACS::HMI::SubjectNode::reparent(), YACS::ENGINE::Node::setName(), YACS::switchtypeParser::state(), YACS::HMI::SubjectControlLink::SubjectControlLink(), YACS::HMI::SubjectLink::SubjectLink(), YACS::looptypeParser< T >::switch_(), YACS::casetypeParser::switch_(), YACS::bloctypeParser< T >::switch_(), YACS::ENGINE::VisitorSaveState::visitBloc(), YACS::ENGINE::VisitorSaveSchema::visitBloc(), YACS::ENGINE::VisitorSalomeSaveState::visitForEachLoop(), YACS::ENGINE::VisitorSaveState::visitForEachLoop(), YACS::ENGINE::VisitorSaveSchema::visitForEachLoop(), YACS::ENGINE::VisitorSaveState::visitForLoop(), YACS::ENGINE::VisitorSaveSchema::visitForLoop(), YACS::ENGINE::VisitorSaveState::visitLoop(), YACS::ENGINE::VisitorSaveState::visitOptimizerLoop(), YACS::ENGINE::VisitorSaveSchema::visitOptimizerLoop(), YACS::ENGINE::VisitorSaveState::visitProc(), YACS::ENGINE::VisitorSaveSchema::visitProc(), YACS::ENGINE::VisitorSaveState::visitSwitch(), YACS::ENGINE::VisitorSaveSchema::visitSwitch(), YACS::ENGINE::VisitorSaveState::visitWhileLoop(), YACS::ENGINE::VisitorSaveSchema::visitWhileLoop(), YACS::looptypeParser< T >::while_(), YACS::casetypeParser::while_(), YACS::bloctypeParser< T >::while_(), YACS::ENGINE::ForEachLoop::writeDot(), and YACS::ENGINE::VisitorSaveSchema::writeSimpleDataLinks().

166 {
167  return Node::getName();
168 }
std::vector< Task * > ComposedNode::getNextTasks ( bool &  isMore)
virtual

Implements YACS::ENGINE::Scheduler.

Definition at line 217 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getReadyTasks(), and PMMLBasicsTestLauncher::ret.

218 {
219  vector<Task *> ret;
220  isMore=false;
221  getReadyTasks(ret);
222  isMore=!ret.empty();
223  return ret;
224 }
int ComposedNode::getNumberOfInputPorts ( ) const
virtual

Implements YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Loop, YACS::ENGINE::Switch, YACS::ENGINE::OptimizerLoop, and YACS::ENGINE::DynParaLoop.

Definition at line 1206 of file ComposedNode.cxx.

References edGetDirectDescendants(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::DynParaLoop::getNumberOfInputPorts(), YACS::ENGINE::Switch::getNumberOfInputPorts(), and YACS::ENGINE::Loop::getNumberOfInputPorts().

1207 {
1208  list<Node *> constituents=edGetDirectDescendants();
1209  int ret=0;
1210  for(list<Node *>::iterator iter=constituents.begin();iter!=constituents.end();iter++)
1211  ret+=(*iter)->getNumberOfInputPorts();
1212  return ret;
1213 }
int ComposedNode::getNumberOfOutputPorts ( ) const
virtual

Implements YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::OptimizerLoop, and YACS::ENGINE::DynParaLoop.

Definition at line 1215 of file ComposedNode.cxx.

References edGetDirectDescendants(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::DynParaLoop::getNumberOfOutputPorts().

1216 {
1217  list<Node *> constituents=edGetDirectDescendants();
1218  int ret=0;
1219  for(list<Node *>::iterator iter=constituents.begin();iter!=constituents.end();iter++)
1220  ret+=(*iter)->getNumberOfOutputPorts();
1221  return ret;
1222 }
OutPort * ComposedNode::getOutPort ( const std::string &  name) const throw (Exception)
virtual
Note
: Contrary to getOutputPort method, this method returns the output port at highest level, possible. That is to say in some ComposedNode, like ForEachLoop or Switch, an outport inside 'this' is seen differently than the true outport.

Reimplemented from YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Switch, YACS::ENGINE::OptimizerLoop, YACS::ENGINE::DynParaLoop, and YACS::ENGINE::ForLoop.

Definition at line 1272 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getOutPort(), and YACS::ENGINE::Node::SEP_CHAR_IN_PORT.

Referenced by YACS::ENGINE::Bloc::Bloc(), YACS::ENGINE::ForLoop::getOutPort(), YACS::ENGINE::DynParaLoop::getOutPort(), YACS::ENGINE::Switch::getOutPort(), and YACS::ENGINE::WhileLoop::WhileLoop().

1273 {
1274  string portName, nodeName;
1275  if(splitNamesBySep(name,Node::SEP_CHAR_IN_PORT,nodeName,portName,false))
1276  {
1277  Node *child = getChildByShortName(nodeName);
1278  return child->getOutPort(portName);
1279  }
1280  else
1281  {
1282  string what("ComposedNode::getOutPort : the port with name "); what+=name; what+=" does not exist on the current level";
1283  throw Exception(what);
1284  }
1285 }
string ComposedNode::getOutPortName ( const OutPort outPort) const throw (Exception)
virtual
OutputDataStreamPort * ComposedNode::getOutputDataStreamPort ( const std::string &  name) const throw (Exception)
virtual

Implements YACS::ENGINE::Node.

Definition at line 1348 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getOutputDataStreamPort(), and YACS::ENGINE::Node::SEP_CHAR_IN_PORT.

1349 {
1350  string portName, nodeName;
1351  if(splitNamesBySep(name,Node::SEP_CHAR_IN_PORT,nodeName,portName,true))
1352  {
1353  Node *child = getChildByName(nodeName);
1354  return child->getOutputDataStreamPort(portName);
1355  }
1356  else
1357  {
1358  string what("ComposedNode::getOutputDataStreamPort : the port with name "); what+=name; what+=" does not exist on the current level";
1359  throw Exception(what);
1360  }
1361 }
OutputPort * ComposedNode::getOutputPort ( const std::string &  name) const throw (Exception)
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.

Implements YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::OptimizerLoop, YACS::ENGINE::DynParaLoop, and YACS::ENGINE::ForLoop.

Definition at line 1318 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getOutputPort(), and YACS::ENGINE::Node::SEP_CHAR_IN_PORT.

Referenced by YACS::ENGINE::ForLoop::getOutputPort(), and YACS::ENGINE::DynParaLoop::getOutputPort().

1319 {
1320  string portName, nodeName;
1321  if(splitNamesBySep(name,Node::SEP_CHAR_IN_PORT,nodeName,portName,false))
1322  {
1323  Node *child = getChildByShortName(nodeName);
1324  return child->getOutputPort(portName);
1325  }
1326  else
1327  {
1328  string what("ComposedNode::getOutputPort : the port with name "); what+=name; what+=" does not exist on the current level";
1329  throw Exception(what);
1330  }
1331 }
template<class PORT >
std::string YACS::ENGINE::ComposedNode::getPortName ( const PORT *  port) const throw (Exception)
protected

Definition at line 177 of file ComposedNode.hxx.

References YACS::ENGINE::Node::_father, YACS::ENGINE::Node::getName(), YACS::ENGINE::Node::getQualifiedName(), and YACS::ENGINE::Node::SEP_CHAR_IN_PORT.

Referenced by YACS::ENGINE::Bloc::Bloc(), YACS::ENGINE::ForEachLoop::buildDelegateOf(), YACS::ENGINE::DynParaLoop::DynParaLoop(), YACS::ENGINE::ForLoop::ForLoop(), YACS::ENGINE::ForEachLoop::getOutputPortType(), YACS::ENGINE::OptimizerLoop::OptimizerLoop(), YACS::ENGINE::DynParaLoop::putValueOnBranch(), and YACS::ENGINE::WhileLoop::WhileLoop().

178  {
179  Node *node = port->getNode();
180  std::string portName = port->getName();
181  checkInMyDescendance(node);
182  Node *father = node;
183  while (father != this)
184  {
185  portName = father->getQualifiedName() + Node::SEP_CHAR_IN_PORT + portName;
186  father = father->_father;
187  }
188  return portName;
189  }
virtual std::string YACS::ENGINE::ComposedNode::getProgress ( ) const
inlinevirtual

Reimplemented in YACS::ENGINE::ForEachLoop, and YACS::ENGINE::ForLoop.

Definition at line 125 of file ComposedNode.hxx.

125 { return "0"; }
list< ProgressWeight > ComposedNode::getProgressWeight ( ) const
virtual

Get the progress weight for all elementary nodes.

Only elementary nodes have weight. A simple composed node only sum up weight of all his descendants (working is different for loop or switch nodes)

Implements YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Switch, and YACS::ENGINE::ForLoop.

Definition at line 1179 of file ComposedNode.cxx.

References edGetDirectDescendants(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::Proc::getGlobalProgressPercent().

1180 {
1181  list<ProgressWeight> ret;
1182  list<Node *> setOfNode=edGetDirectDescendants();
1183  for(list<Node *>::const_iterator iter=setOfNode.begin();iter!=setOfNode.end();iter++)
1184  {
1185  list<ProgressWeight> myCurrentSet=((ComposedNode*)(*iter))->getProgressWeight();
1186  ret.insert(ret.end(),myCurrentSet.begin(),myCurrentSet.end());
1187  }
1188  return ret;
1189 }
list< ElementaryNode * > ComposedNode::getRecursiveConstituents ( ) const
virtual

Implements YACS::ENGINE::Node.

Definition at line 1117 of file ComposedNode.cxx.

References edGetDirectDescendants(), and PMMLBasicsTestLauncher::ret.

Referenced by getDeploymentTree(), performDuplicationOfPlacement(), and performShallowDuplicationOfPlacement().

1118 {
1119  list<ElementaryNode *> ret;
1120  list<Node *> setOfNode=edGetDirectDescendants();
1121  for(list<Node *>::const_iterator iter=setOfNode.begin();iter!=setOfNode.end();iter++)
1122  {
1123  list<ElementaryNode *> myCurrentSet=(*iter)->getRecursiveConstituents();
1124  ret.insert(ret.end(),myCurrentSet.begin(),myCurrentSet.end());
1125  }
1126  return ret;
1127 }
ComposedNode * ComposedNode::getRootNode ( ) const throw (Exception)
virtual

Reimplemented from YACS::ENGINE::Node.

Definition at line 923 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_father, and YACS::ENGINE::Node::getRootNode().

Referenced by YACS::ENGINE::CollectorSwOutPort::CollectorSwOutPort().

924 {
925  if(!_father)
926  return (ComposedNode *)this;
927  return Node::getRootNode();
928 }
list< InputDataStreamPort * > ComposedNode::getSetOfInputDataStreamPort ( ) const
virtual

Implements YACS::ENGINE::Node.

Definition at line 1248 of file ComposedNode.cxx.

References edGetDirectDescendants(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::HMI::SubjectComposedNode::loadChildren().

1249 {
1250  list<Node *> constituents=edGetDirectDescendants();
1251  list<InputDataStreamPort *> ret;
1252  for(list<Node *>::iterator iter=constituents.begin();iter!=constituents.end();iter++)
1253  {
1254  list<InputDataStreamPort *> currentsPorts=(*iter)->getSetOfInputDataStreamPort();
1255  ret.insert(ret.end(),currentsPorts.begin(),currentsPorts.end());
1256  }
1257  return ret;
1258 }
list< InputPort * > ComposedNode::getSetOfInputPort ( ) const
virtual

Implements YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Loop, YACS::ENGINE::Switch, YACS::ENGINE::DynParaLoop, and YACS::ENGINE::OptimizerLoop.

Definition at line 1224 of file ComposedNode.cxx.

References edGetDirectDescendants(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::DynParaLoop::getSetOfInputPort(), YACS::ENGINE::Switch::getSetOfInputPort(), and YACS::ENGINE::Loop::getSetOfInputPort().

1225 {
1226  list<Node *> constituents=edGetDirectDescendants();
1227  list<InputPort *> ret;
1228  for(list<Node *>::iterator iter=constituents.begin();iter!=constituents.end();iter++)
1229  {
1230  list<InputPort *> currentsPorts=(*iter)->getSetOfInputPort();
1231  ret.insert(ret.end(),currentsPorts.begin(),currentsPorts.end());
1232  }
1233  return ret;
1234 }
std::vector< std::pair< OutPort *, InPort * > > ComposedNode::getSetOfInternalLinks ( ) const

Definition at line 583 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getSetOfOutPort(), isInMyDescendance(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::Bloc::Bloc(), YACS::ENGINE::ForLoop::ForLoop(), YACS::HMI::SubjectComposedNode::loadLinks(), and YACS::ENGINE::WhileLoop::WhileLoop().

584 {
585  vector< pair<OutPort *, InPort *> > ret;
586  list<OutPort *> temp=getSetOfOutPort();
587  for(list<OutPort *>::const_iterator iter2=temp.begin();iter2!=temp.end();iter2++)
588  {
589  set<InPort *> temp2=(*iter2)->edSetInPort();
590  for(set<InPort *>::iterator iter3=temp2.begin();iter3!=temp2.end();iter3++)
591  if(isInMyDescendance((*iter3)->getNode()))
592  ret.push_back(pair<OutPort *, InPort *>((*iter2),(*iter3)));
593  }
594  return ret;
595 }
std::vector< std::pair< InPort *, OutPort * > > ComposedNode::getSetOfLinksComingInCurrentScope ( ) const
virtual

Implements YACS::ENGINE::Node.

Definition at line 831 of file ComposedNode.cxx.

References getAllInPortsComingFromOutsideOfCurrentScope(), isInMyDescendance(), and PMMLBasicsTestLauncher::ret.

Referenced by edDisconnectAllLinksWithMe().

832 {
833  vector< pair<InPort *, OutPort *> > ret;
834  set<InPort *> ports=getAllInPortsComingFromOutsideOfCurrentScope();
835  for(set<InPort *>::iterator iter2=ports.begin();iter2!=ports.end();iter2++)
836  {
837  set<OutPort *> temp2=(*iter2)->edSetOutPort();
838  for(set<OutPort *>::iterator iter3=temp2.begin();iter3!=temp2.end();iter3++)
839  {
840  if(isInMyDescendance((*iter3)->getNode()))continue;
841  std::set<OutPort *> trueOutPorts;
842  (*iter3)->getAllRepresented(trueOutPorts);
843  for(std::set<OutPort *>::iterator iter4=trueOutPorts.begin();iter4!=trueOutPorts.end();++iter4)
844  ret.push_back(pair<InPort *, OutPort *>(*iter2,*iter4));
845  }
846  }
847  return ret;
848 }
std::vector< std::pair< OutPort *, InPort * > > ComposedNode::getSetOfLinksLeavingCurrentScope ( ) const
virtual

Implements YACS::ENGINE::Node.

Definition at line 597 of file ComposedNode.cxx.

References getAllOutPortsLeavingCurrentScope(), isInMyDescendance(), and PMMLBasicsTestLauncher::ret.

Referenced by edDisconnectAllLinksWithMe().

598 {
599  vector< pair<OutPort *, InPort *> > ret;
600  std::set<OutPort *> ports=getAllOutPortsLeavingCurrentScope();
601  for(set<OutPort *>::iterator iter2=ports.begin();iter2!=ports.end();iter2++)
602  {
603  set<InPort *> temp2=(*iter2)->edSetInPort();
604  for(set<InPort *>::iterator iter3=temp2.begin();iter3!=temp2.end();iter3++)
605  if(!isInMyDescendance((*iter3)->getNode()))
606  ret.push_back(pair<OutPort *, InPort *>(*iter2,*iter3));
607  }
608  return ret;
609 }
list< OutputDataStreamPort * > ComposedNode::getSetOfOutputDataStreamPort ( ) const
virtual

Implements YACS::ENGINE::Node.

Definition at line 1260 of file ComposedNode.cxx.

References edGetDirectDescendants(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::HMI::SubjectComposedNode::loadChildren().

1261 {
1262  list<Node *> constituents=edGetDirectDescendants();
1263  list<OutputDataStreamPort *> ret;
1264  for(list<Node *>::iterator iter=constituents.begin();iter!=constituents.end();iter++)
1265  {
1266  list<OutputDataStreamPort *> currentsPorts=(*iter)->getSetOfOutputDataStreamPort();
1267  ret.insert(ret.end(),currentsPorts.begin(),currentsPorts.end());
1268  }
1269  return ret;
1270 }
list< OutputPort * > ComposedNode::getSetOfOutputPort ( ) const
virtual

Implements YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::OptimizerLoop, YACS::ENGINE::DynParaLoop, and YACS::ENGINE::ForLoop.

Definition at line 1236 of file ComposedNode.cxx.

References edGetDirectDescendants(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::ForLoop::getSetOfOutputPort(), and YACS::ENGINE::DynParaLoop::getSetOfOutputPort().

1237 {
1238  list<Node *> constituents=edGetDirectDescendants();
1239  list<OutputPort *> ret;
1240  for(list<Node *>::iterator iter=constituents.begin();iter!=constituents.end();iter++)
1241  {
1242  list<OutputPort *> currentsPorts=(*iter)->getSetOfOutputPort();
1243  ret.insert(ret.end(),currentsPorts.begin(),currentsPorts.end());
1244  }
1245  return ret;
1246 }
std::string ComposedNode::getTaskName ( Task task) const
virtual

Implements YACS::ENGINE::Scheduler.

Definition at line 170 of file ComposedNode.cxx.

References getChildName().

171 {
172  return getChildName(dynamic_cast<ElementaryNode *>(task));
173 }
void ComposedNode::init ( bool  start = true)
virtual
bool ComposedNode::isFinished ( )
virtual
Node * ComposedNode::isInMyDescendance ( Node nodeToTest) const

Returns the parent of a node that is the direct child of this node.

Note
if 'nodeToTest'=='this' this is returned. Else if 'nodeToTest' is in descendance of 'this' the direct son is returned. Else 0 is returned.
Parameters
nodeToTest: the node to check

Definition at line 945 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_father.

Referenced by YACS::ENGINE::DynParaLoop::buildDelegateOf(), YACS::ENGINE::Loop::buildDelegateOf(), YACS::ENGINE::ForLoop::checkCFLinks(), YACS::ENGINE::Bloc::checkCFLinks(), YACS::ENGINE::DynParaLoop::checkCFLinks(), checkCFLinks(), YACS::ENGINE::Bloc::checkControlDependancy(), YACS::ENGINE::DynParaLoop::cloneAndPlaceNodesCoherently(), getAllInPortsComingFromOutsideOfCurrentScope(), YACS::ENGINE::Switch::getAllInPortsComingFromOutsideOfCurrentScope(), getAllOutPortsLeavingCurrentScope(), YACS::ENGINE::DynParaLoop::getDynInputPortByAbsName(), YACS::HMI::SceneBlocItem::getNodesInfo(), getSetOfInternalLinks(), getSetOfLinksComingInCurrentScope(), getSetOfLinksLeavingCurrentScope(), YACS::ENGINE::OptimizerLoop::initInterceptors(), YACS::HMI::SubjectComposedNode::removeExternalControlLinks(), YACS::ENGINE::VisitorSaveSchema::writeControls(), YACS::ENGINE::VisitorSaveSchema::writeSimpleDataLinks(), and YACS::ENGINE::VisitorSaveSchema::writeSimpleStreamLinks().

946 {
947  if(nodeToTest==0)
948  return 0;
949  if((ComposedNode *)nodeToTest==this)
950  return (Node *)this;
951  Node *iterBack=nodeToTest;
952  ComposedNode *iter=nodeToTest->_father;
953  while(iter!=0 && iter!=this)
954  {
955  iterBack=iter;
956  iter=iter->_father;
957  }
958  if(iter!=0)
959  return iterBack;
960  else
961  return 0;
962 }
bool ComposedNode::isNameAlreadyUsed ( const std::string &  name) const
virtual

Reimplemented in YACS::ENGINE::Bloc.

Definition at line 1512 of file ComposedNode.cxx.

Referenced by YACS::ENGINE::Node::setName().

1513 {
1514  return false;
1515 }
bool ComposedNode::isNodeAlreadyAggregated ( const Node node) const

Check that Node 'node' is already a direct son of this.

Definition at line 931 of file ComposedNode.cxx.

References YACS::ENGINE::Node::getAllAscendanceOf().

932 {
933  list<ComposedNode *> nodeAncestors = node->getAllAscendanceOf();
934  return find(nodeAncestors.begin(),nodeAncestors.end(),(ComposedNode *)this)!=nodeAncestors.end();
935 }
virtual bool YACS::ENGINE::ComposedNode::isPlacementPredictableB4Run ( ) const
pure virtual
virtual bool YACS::ENGINE::ComposedNode::isRepeatedUnpredictablySeveralTimes ( ) const
inlinevirtual

Reimplemented in YACS::ENGINE::Loop.

Definition at line 78 of file ComposedNode.hxx.

78 { return false; }
void ComposedNode::loaded ( )

Definition at line 1484 of file ComposedNode.cxx.

1485 {
1486 }
void ComposedNode::notifyFrom ( const Task sender,
YACS::Event  event,
const Executor execInst 
)
virtual

Notify the node a task has emitted an event.

TO COMMENT MORE

Note
Runtime called method. Overloads the Scheduler::notifyFrom abstract method. Typically Called in Executor (in a parallel thread or not) by the Task 'task' to inform the scheduler that an event coded 'event' (in Executor static const var) happened. Contrary to updateStateFrom several levels may exist between 'sender' and 'this'.
Parameters
sender: task emitting event
event: event emitted

Called by Executor::functionForTaskExecution on YACS::FINISH event

Called by Executor::launchTask on YACS::START event

Calls ComposedNode::updateStateFrom to update state from task to root node

Implements YACS::ENGINE::Scheduler.

Definition at line 243 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_father, DEBTRACE, YACS::NOEVENT, and updateStateFrom().

247 {
248  DEBTRACE("ComposedNode::notifyFrom " << event);
249  ElementaryNode *taskTyped=dynamic_cast<ElementaryNode *>((Task *)sender);
250  YACS::Event curEvent=event;
251  Node *lminus1LevelNode=taskTyped;
252  ComposedNode *curLevelNode=taskTyped->_father;
253  if(!curLevelNode)//Specific case of loop when 0 turn is specified without any enclosing bloc.
254  return ;
255  curEvent=curLevelNode->updateStateFrom(lminus1LevelNode,curEvent,execInst);
256  while(curEvent!=YACS::NOEVENT && curLevelNode!=this)
257  {
258  lminus1LevelNode=curLevelNode;
259  curLevelNode=curLevelNode->_father;
260  curEvent=curLevelNode->updateStateFrom(lminus1LevelNode,curEvent,execInst);
261  }
262 }
void ComposedNode::performCFComputations ( LinkInfo info) const
protectedvirtual

perform recursively all CF computations.

Reimplemented in YACS::ENGINE::Bloc.

Definition at line 674 of file ComposedNode.cxx.

References edGetDirectDescendants().

Referenced by YACS::ENGINE::Bloc::performCFComputations().

675 {
676  list<Node *> nodes=edGetDirectDescendants();
677  for(list<Node *>::iterator iter=nodes.begin();iter!=nodes.end();iter++)
678  if(dynamic_cast<ComposedNode *>(*iter))
679  ((ComposedNode *)(*iter))->performCFComputations(info);
680 }
void ComposedNode::performDuplicationOfPlacement ( const Node other)
protectedvirtual

performs a duplication of placement using clone method of containers and components. clone behaviour is driven by attachOnCloning attribute.

Implements YACS::ENGINE::Node.

Definition at line 66 of file ComposedNode.cxx.

References YACS::ENGINE::Container::clone(), YACS::ENGINE::ComponentInstance::clone(), YACS::ENGINE::RefCounter::decrRef(), YACS::ENGINE::DeploymentTree::getAllContainers(), getChildByName(), getChildName(), YACS::ENGINE::DeploymentTree::getComponentsLinkedToContainer(), getDeploymentTree(), getRecursiveConstituents(), YACS::ENGINE::DeploymentTree::getTasksLinkedToComponent(), YACS::ENGINE::DeploymentTree::getTasksLinkedToContainer(), and YACS::ENGINE::ComponentInstance::setContainer().

67 {
68  const ComposedNode &otherC=*(dynamic_cast<const ComposedNode *>(&other));
69  DeploymentTree treeToDup=otherC.getDeploymentTree();
70  list< ElementaryNode * > clones=otherC.getRecursiveConstituents();
71  vector<Container *> conts=treeToDup.getAllContainers();
72  //iterate on all containers
73  for(vector<Container *>::iterator iterCt=conts.begin();iterCt!=conts.end();iterCt++)
74  {
75  vector<ComponentInstance *> comps=treeToDup.getComponentsLinkedToContainer(*iterCt);
76  Container *contCloned=0;
77  if((*iterCt))
78  contCloned=(*iterCt)->clone();
79 
80  //iterate on all component instances linked to the container
81  for(vector<ComponentInstance *>::iterator iterCp=comps.begin();iterCp!=comps.end();iterCp++)
82  {
83  vector<Task *> tasks=treeToDup.getTasksLinkedToComponent(*iterCp);
84  ComponentInstance *curCloned=(*iterCp)->clone();
85  curCloned->setContainer(contCloned);
86  for(vector<Task *>::iterator iterT=tasks.begin();iterT!=tasks.end();iterT++)
87  {
88  //No risk for static cast : appendTask called by ComposedNode.
89  list< ElementaryNode * >::iterator res=find(clones.begin(),clones.end(),(ElementaryNode *)(*iterT));
90  //No risk here to because called only on cloning process...
91  ServiceNode *nodeC=(ServiceNode *)getChildByName(otherC.getChildName(*res));
92  nodeC->setComponent(curCloned);
93  }
94  curCloned->decrRef();
95  }
96 
97  // iterate on all tasks linked to the container
98  vector<Task *> tasks=treeToDup.getTasksLinkedToContainer(*iterCt);
99  for(vector<Task *>::iterator iterT=tasks.begin();iterT!=tasks.end();iterT++)
100  {
101  std::list< ElementaryNode * >::iterator res=find(clones.begin(),clones.end(),(ElementaryNode *)(*iterT));
103  nodeC->setContainer(contCloned);
104  }
105 
106  // ended with current container
107  if(contCloned)
108  contCloned->decrRef();
109  }
110 }
void ComposedNode::performShallowDuplicationOfPlacement ( const Node other)
protectedvirtual

performs a also duplication of placement but here containers and components are not copied at all whatever the value of attachedOnCloning.

Implements YACS::ENGINE::Node.

Definition at line 112 of file ComposedNode.cxx.

References YACS::ENGINE::DeploymentTree::getAllContainers(), getChildByName(), getChildName(), YACS::ENGINE::DeploymentTree::getComponentsLinkedToContainer(), getDeploymentTree(), getRecursiveConstituents(), YACS::ENGINE::DeploymentTree::getTasksLinkedToComponent(), YACS::ENGINE::DeploymentTree::getTasksLinkedToContainer(), and YACS::ENGINE::ComponentInstance::setContainer().

113 {
114  const ComposedNode &otherC=*(dynamic_cast<const ComposedNode *>(&other));
115  DeploymentTree treeToDup=otherC.getDeploymentTree();
116  list< ElementaryNode * > clones=otherC.getRecursiveConstituents();
117  vector<Container *> conts=treeToDup.getAllContainers();
118  //iterate on all containers
119  for(vector<Container *>::iterator iterCt=conts.begin();iterCt!=conts.end();iterCt++)
120  {
121  vector<ComponentInstance *> comps=treeToDup.getComponentsLinkedToContainer(*iterCt);
122  Container *contCloned((*iterCt));
123 
124  //iterate on all component instances linked to the container
125  for(vector<ComponentInstance *>::iterator iterCp=comps.begin();iterCp!=comps.end();iterCp++)
126  {
127  vector<Task *> tasks=treeToDup.getTasksLinkedToComponent(*iterCp);
128  ComponentInstance *curCloned((*iterCp));
129  curCloned->setContainer(contCloned);
130  for(vector<Task *>::iterator iterT=tasks.begin();iterT!=tasks.end();iterT++)
131  {
132  //No risk for static cast : appendTask called by ComposedNode.
133  list< ElementaryNode * >::iterator res=find(clones.begin(),clones.end(),(ElementaryNode *)(*iterT));
134  //No risk here to because called only on cloning process...
135  ServiceNode *nodeC=(ServiceNode *)getChildByName(otherC.getChildName(*res));
136  nodeC->setComponent(curCloned);
137  }
138  }
139 
140  // iterate on all tasks linked to the container
141  vector<Task *> tasks=treeToDup.getTasksLinkedToContainer(*iterCt);
142  for(vector<Task *>::iterator iterT=tasks.begin();iterT!=tasks.end();iterT++)
143  {
144  std::list< ElementaryNode * >::iterator res=find(clones.begin(),clones.end(),(ElementaryNode *)(*iterT));
146  nodeC->setContainer(contCloned);
147  }
148  }
149 }
void ComposedNode::releaseDelegateOf ( InPort *&  port,
OutPort initialStart,
const std::list< ComposedNode * > &  pointsOfView 
) throw (Exception)
protectedvirtual

Reimplemented in YACS::ENGINE::Loop.

Definition at line 1476 of file ComposedNode.cxx.

Referenced by edRemoveLink().

1477 {
1478 }
void ComposedNode::releaseDelegateOf ( OutPort portDwn,
OutPort portUp,
InPort finalTarget,
const std::list< ComposedNode * > &  pointsOfView 
) throw (Exception)
protectedvirtual

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Loop, and YACS::ENGINE::Switch.

Definition at line 1480 of file ComposedNode.cxx.

1481 {
1482 }
void ComposedNode::removeRecursivelyRedundantCL ( )
virtual

This method recursively all redundant control links in this.

Reimplemented in YACS::ENGINE::Bloc.

Definition at line 1106 of file ComposedNode.cxx.

References edGetDirectDescendants(), and removeRecursivelyRedundantCL().

Referenced by YACS::ENGINE::Bloc::removeRecursivelyRedundantCL(), and removeRecursivelyRedundantCL().

1107 {
1108  std::list<Node *> dd(edGetDirectDescendants());
1109  for(std::list<Node *>::const_iterator it=dd.begin();it!=dd.end();it++)
1110  {
1111  ComposedNode *elt(dynamic_cast<ComposedNode *>(*it));
1112  if(elt)
1113  elt->removeRecursivelyRedundantCL();
1114  }
1115 }
void ComposedNode::resetState ( int  level)
virtual

Reset the state of the node and its children depending on the parameter level.

Reimplemented from YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::ForEachLoop.

Definition at line 1623 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_state, YACS::ACTIVATED, DEBTRACE, edGetDirectDescendants(), YACS::ERROR, YACS::FAILED, and YACS::ENGINE::Node::resetState().

Referenced by main(), and YACS::ENGINE::ForEachLoop::resetState().

1624 {
1625  if(level==0)return;
1626 
1627  DEBTRACE("ComposedNode::resetState " << level << "," << _state);
1629  {
1630  Node::resetState(level);
1631  std::list<Node *> nodes=edGetDirectDescendants();
1632  for(std::list<Node *>::iterator iter=nodes.begin();iter!=nodes.end();iter++)
1633  (*iter)->resetState(level);
1634  }
1635 }
void ComposedNode::shutdown ( int  level)
virtual

Stop all pending activities of the composed node.

This method should be called when a Proc is finished and must be deleted from the YACS server

Reimplemented from YACS::ENGINE::Node.

Reimplemented in YACS::ENGINE::DynParaLoop.

Definition at line 1601 of file ComposedNode.cxx.

References DEBTRACE, and edGetDirectDescendants().

Referenced by Handler(), and main().

1602 {
1603  if(level==0)return;
1604  DEBTRACE("ComposedNode::shutdown");
1605  list<Node *> nodes=edGetDirectDescendants();
1606  for(list<Node *>::iterator iter=nodes.begin();iter!=nodes.end();iter++)
1607  (*iter)->shutdown(level);
1608 }
void ComposedNode::solveObviousOrDelegateCFLinks ( const std::list< OutPort * > &  starts,
InputPort end,
unsigned char &  alreadyFed,
bool  direction,
LinkInfo info 
) const
protected

Internal method during CF links. This methode is in charge to statuate on links consistency in the case that no control flow defined by user is set.

Definition at line 753 of file ComposedNode.cxx.

References YACS::ENGINE::E_COLLAPSE_DFDS, FED_ST, FREE_ST, getLowestNodeDealingAll(), YACS::ENGINE::I_BACK, YACS::ENGINE::I_BACK_USELESS, YACS::ENGINE::I_USELESS, YACS::ENGINE::LinkInfo::pushErrLink(), 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 YACS::ENGINE::ForLoop::checkCFLinks(), YACS::ENGINE::DynParaLoop::checkCFLinks(), YACS::ENGINE::OptimizerLoop::checkCFLinks(), checkCFLinks(), and YACS::ENGINE::Loop::checkCFLinks().

754 {
755  static const char what[]="ComposedNode::solveObviousOrDelegateCFLinks : Internal error occured - uncorrect hierarchy detected !";
756  if(starts.size()==1)
757  {
758  if(alreadyFed==FREE_ST)
759  {
760  if(!direction)
761  info.pushInfoLink(*(starts.begin()),end,I_BACK);
762  alreadyFed=FED_ST;
763  }
764  else if(alreadyFed==FED_ST)
765  info.pushInfoLink(*(starts.begin()),end,direction ? I_USELESS : I_BACK_USELESS);
766  else
767  info.pushErrLink(*(starts.begin()),end,E_COLLAPSE_DFDS);
768  }
769  else
770  {
771  Node *levelOfDecision=getLowestNodeDealingAll(starts);
772  if(levelOfDecision==this)
773  throw Exception(what);
774  if(dynamic_cast<ElementaryNode *>(levelOfDecision))
775  {
776  WarnReason reason;
777  if(alreadyFed==FREE_ST || alreadyFed==FED_ST)
778  {
779  if(alreadyFed==FREE_ST)
780  {
781  reason=direction ? W_COLLAPSE_EL : W_BACK_COLLAPSE_EL;
782  alreadyFed=FED_ST;
783  }
784  else
786  for(list< OutPort *>::const_iterator iter=starts.begin();iter!=starts.end();iter++)
787  info.pushWarnLink(*iter,end,reason);
788  }
789  }
790  else
791  ((ComposedNode *)levelOfDecision)->checkCFLinks(starts,end,alreadyFed,direction,info);
792  }
793 }
bool ComposedNode::splitNamesBySep ( const std::string &  globalName,
const char  separator[],
std::string &  firstPart,
std::string &  lastPart,
bool  priority 
) throw (Exception)
staticprotected

Splits name globalName in 2 parts using separator.

Note
'priority' specifies if during search process of 'separator' the max part is for 'firstPart' (priority=true) or 'lastPart' (priority=false).
Exceptions
Exception: 'lastPart' or 'firstPart' is empty.
Returns
true if split process succeeds false otherwise (typically when character separator was not found).

Definition at line 557 of file ComposedNode.cxx.

Referenced by getChildByName(), YACS::ENGINE::DynParaLoop::getDynInputPortByAbsName(), and YACS::ENGINE::ForEachLoop::getDynOutPortByAbsName().

559 {
560  const string delims(separator);
561  string portName, nodeName;
562  string::size_type idx;
563  if(priority)
564  idx = globalName.find_last_of(delims);
565  else
566  idx = globalName.find_first_of(delims);
567  if (idx == string::npos)
568  {
569  firstPart=globalName;
570  lastPart="";
571  return false;
572  }
573  firstPart = globalName.substr(0,idx);
574  lastPart = globalName.substr(idx+1);
575  if ((firstPart.empty()) || (lastPart.empty()))
576  {
577  string what("the name "); what+= globalName ; what+=" is not a valid port name";
578  throw Exception(what);
579  }
580  return true;
581 }
virtual std::string YACS::ENGINE::ComposedNode::typeName ( )
inlinevirtual
YACS::Event ComposedNode::updateStateFrom ( Node node,
YACS::Event  event,
const Executor execInst 
)
protected

Update node state on receiving event from a node.

Note
Runtime called method. Perform, the state updating, from the son node 'node' emitting the event 'event' (among Executor static const var). WARNING Precondition : this == node->_father
Returns
The event (among Executor static const var) destinated to this->_father node to perform eventually up level update.

Calls ComposedNode::updateStateOnStartEventFrom if event is YACS::START

Calls ComposedNode::updateStateOnFinishedEventFrom if event is YACS::FINISH

Called by ComposedNode::notifyFrom

Definition at line 1378 of file ComposedNode.cxx.

References YACS::ENGINE::Node::_errorDetails, YACS::ABORT, DEBTRACE, YACS::ERROR, YACS::ENGINE::Node::exForwardFailed(), YACS::FINISH, YACS::ENGINE::Node::getName(), YACS::NOEVENT, YACS::ENGINE::Node::setState(), YACS::START, updateStateOnFailedEventFrom(), updateStateOnFinishedEventFrom(), updateStateOnStartEventFrom(), and YACS::Exception::what().

Referenced by notifyFrom().

1382 {
1383  DEBTRACE("updateStateFrom: " << node->getName() << " " << event);
1384  try
1385  {
1386  switch(event)
1387  {
1388  case YACS::START:
1389  return updateStateOnStartEventFrom(node);
1390  break;
1391  case YACS::FINISH:
1392  return updateStateOnFinishedEventFrom(node);
1393  break;
1394  case YACS::ABORT:
1395  return updateStateOnFailedEventFrom(node,execInst);
1396  break;
1397  default:
1398  return YACS::NOEVENT;//TODO unexpected type of event
1399  break;
1400  }
1401  }
1402  catch(YACS::Exception& ex)
1403  {
1404  //unexpected exception: probably a bug in engine
1405  //try to keep a consistent global state
1406  DEBTRACE( "updateStateFrom: " << ex.what() );
1407  _errorDetails="Internal error: ";
1408  _errorDetails=_errorDetails + ex.what();
1410  exForwardFailed();
1411  return YACS::ABORT;
1412  }
1413  catch(...)
1414  {
1415  //unexpected exception: probably a bug in engine
1416  //try to keep a consistent global state
1418  exForwardFailed();
1419  return YACS::ABORT;
1420  }
1421 }
YACS::Event ComposedNode::updateStateOnFailedEventFrom ( Node node,
const Executor execInst 
)
protectedvirtual

Method used to notify the node that a child node has failed.

Reimplemented in YACS::ENGINE::ForEachLoop, YACS::ENGINE::DynParaLoop, YACS::ENGINE::OptimizerLoop, and YACS::ENGINE::Bloc.

Definition at line 1437 of file ComposedNode.cxx.

References YACS::ABORT, YACS::FAILED, and YACS::ENGINE::Node::setState().

Referenced by updateStateFrom().

1438 {
1440  return YACS::ABORT;
1441 }
virtual YACS::Event YACS::ENGINE::ComposedNode::updateStateOnFinishedEventFrom ( Node node)
protectedpure virtual
YACS::Event ComposedNode::updateStateOnStartEventFrom ( Node node)
protectedvirtual

Method used to notify the node that a child node has started.

Update the ComposedNode state and return the ComposedNode change state

Parameters
node: the child node that has started
Returns
the loop state change

Definition at line 1430 of file ComposedNode.cxx.

References YACS::ACTIVATED, YACS::ENGINE::Node::setState(), and YACS::START.

Referenced by updateStateFrom().

1431 {
1433  return YACS::START;
1434 }

Friends And Related Function Documentation

friend class Bloc
friend

Definition at line 44 of file ComposedNode.hxx.

friend class ElementaryNode
friend

Definition at line 47 of file ComposedNode.hxx.

friend class Loop
friend

Definition at line 45 of file ComposedNode.hxx.

friend class OutPort
friend

Definition at line 46 of file ComposedNode.hxx.

Member Data Documentation

const unsigned char YACS::ENGINE::ComposedNode::FED_DS_ST = 1
staticprotected

Definition at line 173 of file ComposedNode.hxx.

Referenced by YACS::ENGINE::Bloc::checkCFLinks().

const char ComposedNode::SEP_CHAR_BTW_LEVEL ="."
staticprotected

Definition at line 49 of file ComposedNode.hxx.

Referenced by getLowestCommonAncestorStr().


The documentation for this class was generated from the following files: