Version: 8.3.0
YACS::ENGINE::Node Class Referenceabstract

Base class for all nodes. More...

#include <Node.hxx>

Inheritance diagram for YACS::ENGINE::Node:
Collaboration diagram for YACS::ENGINE::Node:

Public Member Functions

virtual ~Node ()
 
virtual void init (bool start=true)
 
virtual void shutdown (int level)
 Stop all pending activities of the node. More...
 
virtual void resetState (int level)
 Reset the node state depending on the parameter level. More...
 
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
 
virtual std::list
< ElementaryNode * > 
getRecursiveConstituents () const =0
 
virtual std::list< ProgressWeightgetProgressWeight () const =0
 
virtual int getNumberOfInputPorts () const =0
 
virtual int getNumberOfOutputPorts () const =0
 
std::list< InPort * > getSetOfInPort () const
 
std::list< OutPort * > getSetOfOutPort () const
 
virtual std::list< InputPort * > getSetOfInputPort () const =0
 
virtual std::list< OutputPort * > getSetOfOutputPort () const =0
 
virtual std::list< InputPort * > getLocalInputPorts () const =0
 
virtual std::list< OutputPort * > getLocalOutputPorts () const =0
 
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...
 
virtual std::string getInPortName (const InPort *) const =0 throw (Exception)
 
virtual std::string getOutPortName (const OutPort *) const =0 throw (Exception)
 
virtual std::list
< InputDataStreamPort * > 
getSetOfInputDataStreamPort () const =0
 
virtual std::list
< OutputDataStreamPort * > 
getSetOfOutputDataStreamPort () const =0
 
InPortgetInPort (const std::string &name) const throw (Exception)
 
InPropertyPortgetInPropertyPort () const throw (Exception)
 
virtual OutPortgetOutPort (const std::string &name) const throw (Exception)
 
virtual std::set< OutPort * > getAllOutPortsLeavingCurrentScope () const =0
 
virtual std::set< InPort * > getAllInPortsComingFromOutsideOfCurrentScope () const =0
 
virtual std::vector< std::pair
< OutPort *, InPort * > > 
getSetOfLinksLeavingCurrentScope () const =0
 
virtual std::vector< std::pair
< InPort *, OutPort * > > 
getSetOfLinksComingInCurrentScope () const =0
 
virtual InputPortgetInputPort (const std::string &name) const throw (Exception)
 
virtual OutputPortgetOutputPort (const std::string &name) const =0 throw (Exception)
 
virtual InputDataStreamPortgetInputDataStreamPort (const std::string &name) const =0 throw (Exception)
 
virtual OutputDataStreamPortgetOutputDataStreamPort (const std::string &name) const =0 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 ComposedNodegetRootNode () const throw (Exception)
 
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 NodegetChildByName (const std::string &name) const =0 throw (Exception)
 
virtual ProcgetProc ()
 
virtual const ProcgetProc () const
 
virtual void accept (Visitor *visitor)=0
 
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 typeName ()
 
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 void edUpdateState ()
 update the status of the node More...
 
virtual std::string getErrorReport ()
 returns a string that contains an error report if the node is in error 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)
 
virtual void cleanNodes ()
 Clean the node in case of not clean exit. More...
 

Static Public Member Functions

static std::string getStateName (YACS::StatesForNode state)
 Return the name of a state. More...
 

Public Attributes

YACS::Colour _colour
 

Static Public Attributes

static std::map< int, Node * > idMap
 

Protected Member Functions

 Node (const std::string &name)
 
 Node (const Node &other, ComposedNode *father)
 
virtual void performDuplicationOfPlacement (const Node &other)=0
 performs a duplication of placement using clone method of containers and components. clone behaviour is driven by attachOnCloning attribute. More...
 
virtual void performShallowDuplicationOfPlacement (const Node &other)=0
 performs a also duplication of placement but here containers and components are not copied at all whatever the value of attachedOnCloning. More...
 
virtual NodesimpleClone (ComposedNode *father, bool editionOnly=true) const =0
 
virtual void exForwardFailed ()
 
virtual void exForwardFinished ()
 
virtual void edDisconnectAllLinksWithMe ()
 

Static Protected Member Functions

static void checkValidityOfPortName (const std::string &name) throw (Exception)
 
static ComposedNodecheckHavingCommonFather (Node *node1, Node *node2) throw (Exception)
 

Protected Attributes

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
 

Static Protected Attributes

static const char SEP_CHAR_IN_PORT [] ="."
 
static int _total = 0
 

Friends

class Bloc
 
class Loop
 
class Switch
 
class InputPort
 
class OutputPort
 
class InPropertyPort
 
class DynParaLoop
 
class ForEachLoop
 
class ComposedNode
 
class ElementaryNode
 
class Visitor
 
void StateLoader (Node *node, YACS::StatesForNode state)
 

Detailed Description

Base class for all nodes.

Definition at line 67 of file Node.hxx.

Constructor & Destructor Documentation

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

Definition at line 68 of file Node.cxx.

References _inPropertyPort, _numId, YACS::ENGINE::Runtime::_tc_propvec, _total, idMap, and InPropertyPort.

68  :_name(name),_inGate(this),_outGate(this),_father(0),_state(YACS::READY),
70 {
71  // Should be protected by lock ??
72  _numId = _total++;
73  idMap[_numId]=this;
74 
75  // Every node has an InPropertyPort
76  _inPropertyPort = new InPropertyPort("__InPropertyPort__Node__YACS_", this, Runtime::_tc_propvec);
77 }
Node::Node ( const Node other,
ComposedNode father 
)
protected

Definition at line 79 of file Node.cxx.

References _inPropertyPort, _numId, YACS::ENGINE::Runtime::_tc_propvec, _total, idMap, and InPropertyPort.

79  :_inGate(this),_outGate(this),_name(other._name),_father(father),
82 {
83  _numId = _total++;
84  idMap[_numId]=this;
85 
86  // Every node has an InPropertyPort
87  _inPropertyPort = new InPropertyPort("__InPropertyPort__Node__YACS_", this, Runtime::_tc_propvec);
88 }
Node::~Node ( )
virtual

Definition at line 90 of file Node.cxx.

References _inPropertyPort.

91 {
92  delete _inPropertyPort;
93 }

Member Function Documentation

void Node::applyDPLScope ( ComposedNode gfn)
virtual

Method called by the Executor only if the executor is sensitive of scope of DynParaLoop. This method is virtual and empty because by default nothing is done.

Reimplemented in YACS::ENGINE::PythonNode.

Definition at line 648 of file Node.cxx.

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

649 {
650 }
ComposedNode * Node::checkHavingCommonFather ( Node node1,
Node node2 
) throw (Exception)
staticprotected
Note
: Check that 'node1' and 'node2' have exactly the same father
Exceptions
:If 'node1' and 'node2' have NOT exactly the same father

Definition at line 439 of file Node.cxx.

References _father.

440 {
441  if(node1!=0 && node2!=0)
442  {
443  if(node1->_father==node2->_father)
444  return node1->_father;
445  }
446  throw Exception("check failed : nodes have not the same father");
447 }
void Node::checkValidityOfPortName ( const std::string &  name) throw (Exception)
staticprotected

checks validity of ports name, that must not contain a particular character '?' USAGE NOT CLEAR, not used so far, when are those characters set ?

Definition at line 426 of file Node.cxx.

427 {
428  if(name.find(SEP_CHAR_IN_PORT, 0 )!=string::npos)
429  {
430  string what("Port name "); what+=name; what+="not valid because it contains character "; what+=SEP_CHAR_IN_PORT;
431  throw Exception(what);
432  }
433 }
void Node::cleanNodes ( )
virtual

Clean the node in case of not clean exit.

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

Reimplemented in YACS::ENGINE::ComposedNode.

Definition at line 804 of file Node.cxx.

805 {
806 }
Node * Node::clone ( ComposedNode father,
bool  editionOnly = true 
) const

This method MUST NEVER BE VIRTUAL

This method clones this by :

  • deep copying nodes, links, ports, types
  • containers are either deep copied or shallow copied depending on _isAttachedOnCloning attribute.
  • component are either deep copied or shallow copied depending on _isAttachedOnCloning attribute.

So this method clone is dedicated for DynParaLoop class or subclasses. It should not be used elsewhere, because _isAttachedOnCloning attribute is an attribute in the engine not for GUI/TUI aspects. For GUI/TUI manipulation cloneWithoutCompAndContDeepCpy method should be used preferably.

Parameters
[in]father- The new father of the returned clone.
[in]editionOnlyignored
See Also
cloneWithoutCompAndContDeepCpy

Definition at line 128 of file Node.cxx.

References performDuplicationOfPlacement(), PMMLBasicsTestLauncher::ret, and simpleClone().

Referenced by YACS::ENGINE::DynParaLoop::DynParaLoop(), YACS::ENGINE::ElementaryNode::getReadyTasks(), YACS::ENGINE::OptimizerLoop::initInterceptors(), YACS::ENGINE::ProcCataLoader::loadCata(), and YACS::HMI::CommandAddNodeFromCatalog::localExecute().

129 {
130  Node *ret(simpleClone(father,editionOnly));
131  ret->performDuplicationOfPlacement(*this);
132  return ret;
133 }
Node * Node::cloneWithoutCompAndContDeepCpy ( ComposedNode father,
bool  editionOnly = true 
) const

This method MUST NEVER BE VIRTUAL

This method clones this by :

  • deep copying nodes, links, ports, types
  • shallow copy containers
  • shallow copy components

So this method simply ignores isAttachedOnCloning attribute for both containers and components. So this method is dedicated for the GUI/TUI users.

Parameters
[in]father- The new father of the returned clone.
[in]editionOnlyignored

Definition at line 147 of file Node.cxx.

References performShallowDuplicationOfPlacement(), PMMLBasicsTestLauncher::ret, and simpleClone().

Referenced by YACS::HMI::CommandPutInComposedNode::localExecute(), YACS::HMI::CommandCopyNode::localExecute(), and YACS::HMI::SubjectNode::registerUndoDestroy().

148 {
149  Node *ret(simpleClone(father,editionOnly));
150  ret->performShallowDuplicationOfPlacement(*this);
151  return ret;
152 }
bool Node::edAreAllInputPortInitialized ( ) const
virtual

Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency.

Definition at line 365 of file Node.cxx.

References edGetSetOfUnitializedInputPort().

366 {
367  set<InputPort *> setOfUnitializedInputPort = edGetSetOfUnitializedInputPort();
368  return ( setOfUnitializedInputPort.size() == 0);
369 }
void Node::edDisconnectAllLinksWithMe ( )
protectedvirtual
set< InputPort * > Node::edGetSetOfUnitializedInputPort ( ) const
virtual

Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency.

Definition at line 352 of file Node.cxx.

References getSetOfInputPort().

Referenced by edAreAllInputPortInitialized().

353 {
354  set<InputPort *> setOfUnitializedInputPort;
355  list<InputPort *> allOfInputPorts=getSetOfInputPort();
356  for(list<InputPort *>::const_iterator iter=allOfInputPorts.begin();iter!=allOfInputPorts.end();iter++)
357  {
358  if ( ! (*iter)->edIsInitialized() )
359  setOfUnitializedInputPort.insert(*iter);
360  }
361  return setOfUnitializedInputPort;
362 }
void Node::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 in YACS::ENGINE::ComposedNode, and YACS::ENGINE::ElementaryNode.

Definition at line 703 of file Node.cxx.

References _modified, and DEBTRACE.

Referenced by isValid().

704 {
705  DEBTRACE("Node::edUpdateState(): " << _modified);
706  _modified=0;
707 }
void Node::ensureLoading ( )
virtual

Put this node into TOLOAD state when possible.

Reimplemented in YACS::ENGINE::ElementaryNode.

Definition at line 775 of file Node.cxx.

References _state, YACS::READY, setState(), and YACS::TOLOAD.

Referenced by YACS::ENGINE::ElementaryNode::ensureLoading().

776 {
777  if(_state == YACS::READY)
779 }
void Node::exDisabledState ( )
virtual

Notify this node that it has been disabled.

The node goes in DISABLED state and propagate the notification through the outGate port

Definition at line 228 of file Node.cxx.

References _outGate, DEBTRACE, YACS::DISABLED, YACS::ENGINE::OutGate::exNotifyDisabled(), getName(), and setState().

Referenced by YACS::ENGINE::InGate::exNotifyDisabled(), YACS::ENGINE::ElementaryNode::init(), init(), YACS::ENGINE::PyFuncNode::init(), and YACS::switchtypeParser::state().

229 {
230  DEBTRACE( "Node::exDisabledState: " << getName() );
233 }
void Node::exFailedState ( )
virtual

Notify this node that its execution has failed.

The node goes in FAILED state and propagate the notification through the outGate port

Definition at line 215 of file Node.cxx.

References _outGate, DEBTRACE, YACS::ENGINE::OutGate::exNotifyFailed(), YACS::FAILED, getName(), and setState().

Referenced by YACS::ENGINE::InGate::exNotifyFailed().

216 {
217  DEBTRACE( "Node::exFailedState: " << getName() );
220 }
bool Node::exIsControlReady ( ) const

Definition at line 190 of file Node.cxx.

References _inGate, and YACS::ENGINE::InGate::exIsReady().

191 {
192  return _inGate.exIsReady();
193 }
std::list< ComposedNode * > Node::getAllAscendanceOf ( ComposedNode levelToStop = 0) const

gets a set of the composed nodes that constitute the ascendancy of this node, starting from root or from a particular ancestor WARNING : returned set is not sorted !

Parameters
levelToStopcomposed node which is the oldest ancestor required
Returns
ascendancy, direct father first in set.

Definition at line 313 of file Node.cxx.

References _father, and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::OutPort::calculateHistoryOfLinkWith(), YACS::ENGINE::ComposedNode::edAddLink(), and YACS::ENGINE::ComposedNode::isNodeAlreadyAggregated().

314 {
315  list<ComposedNode *> ret;
316  if(this==levelToStop)
317  return ret;
318  for(ComposedNode *iter=_father;iter!=levelToStop && iter!=0; iter=iter->_father)
319  ret.push_back(iter);
320  return ret;
321 }
virtual std::set<InPort *> YACS::ENGINE::Node::getAllInPortsComingFromOutsideOfCurrentScope ( ) const
pure virtual
virtual std::set<OutPort *> YACS::ENGINE::Node::getAllOutPortsLeavingCurrentScope ( ) const
pure virtual
std::string Node::getColorState ( YACS::StatesForNode  state) const

Return the color associated to a state.

Parameters
state: the node state
Returns
the associated color

Definition at line 549 of file Node.cxx.

References YACS::ACTIVATED, YACS::DISABLED, YACS::DONE, YACS::ERROR, YACS::FAILED, YACS::LOADED, YACS::PAUSE, YACS::READY, YACS::TOACTIVATE, and YACS::TOLOAD.

Referenced by YACS::ENGINE::Bloc::writeDot(), writeDot(), YACS::ENGINE::Loop::writeDot(), and YACS::ENGINE::ForEachLoop::writeDot().

550 {
551  switch(state)
552  {
553  case YACS::READY:
554  return "pink";
555  case YACS::TOLOAD:
556  return "magenta";
557  case YACS::LOADED:
558  return "magenta";
559  case YACS::TOACTIVATE:
560  return "purple";
561  case YACS::ACTIVATED:
562  return "blue";
563  case YACS::DONE:
564  return "green";
565  case YACS::ERROR:
566  return "red";
567  case YACS::FAILED:
568  return "orange";
569  case YACS::DISABLED:
570  return "grey";
571  case YACS::PAUSE:
572  return "white";
573  default:
574  return "white";
575  }
576 }
std::string Node::getContainerLog ( )
virtual

returns a string that contains the name of the container log file if it exists

Do nothing here. To subclass

Reimplemented in YACS::ENGINE::PyFuncNode, YACS::ENGINE::SalomeNode, and YACS::ENGINE::PythonNode.

Definition at line 754 of file Node.cxx.

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

755 {
756  return "";
757 }
virtual void YACS::ENGINE::Node::getCoupledNodes ( std::set< Task * > &  coupledNodes)
inlinevirtual

Reimplemented in YACS::ENGINE::ElementaryNode.

Definition at line 192 of file Node.hxx.

Referenced by YACS::ENGINE::ElementaryNode::getCoupledNodes().

192 { }
std::vector< std::pair< std::string, int > > Node::getDPLScopeInfo ( ComposedNode gfn)

Definition at line 625 of file Node.cxx.

References YACS::ENGINE::DynParaLoop::getBranchIDOfNode(), YACS::ENGINE::ComposedNode::getChildName(), getFather(), p, and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::PythonNode::applyDPLScope().

626 {
627  std::vector< std::pair<std::string,int> > ret;
628  Node *work2(this);
629  ComposedNode *work(getFather());
630  while(work!=gfn && work!=0)
631  {
632  DynParaLoop *workc(dynamic_cast<DynParaLoop *>(work));
633  if(workc)
634  {
635  std::pair<std::string,int> p(gfn->getChildName(workc),workc->getBranchIDOfNode(work2));
636  ret.push_back(p);
637  }
638  work2=work;
639  work=work->getFather();
640  }
641  return ret;
642 }
YACS::StatesForNode Node::getEffectiveState ( ) const
virtual

Return the node state in the context of its father.

Returns
the effective node state

The node state is stored in a private attribute _state. This state is relative to its father state : a node with a TOACTIVATE state with a father node in a READY state is not to activate. Its effective state is only READY. This method returns the effective state of the node taking into account that of its father.

Reimplemented in YACS::ENGINE::Switch.

Definition at line 509 of file Node.cxx.

References _father, _state, YACS::DISABLED, and getEffectiveState().

Referenced by dumpState(), getEffectiveState(), YACS::ENGINE::DynParaLoop::getErrorReport(), YACS::ENGINE::ComposedNode::getErrorReport(), getErrorReport(), YACS::ENGINE::Proc::getNodeState(), Proc_i::getState(), YACS::ENGINE::Proc::getXMLState(), Proc_i::getXMLState(), main(), YACS::ENGINE::Bloc::writeDot(), writeDot(), YACS::ENGINE::Loop::writeDot(), and YACS::ENGINE::ForEachLoop::writeDot().

510 {
511  if(!_father) //the root node
512  return _state;
514  return YACS::DISABLED;
515  return _father->getEffectiveState(this);
516 }
YACS::StatesForNode Node::getEffectiveState ( const Node node) const
virtual

Return the effective state of a node in the context of this one (its father)

Parameters
node,:the node which effective state is queried
Returns
the effective node state

Reimplemented in YACS::ENGINE::Switch.

Definition at line 523 of file Node.cxx.

References YACS::DISABLED, YACS::ERROR, YACS::FAILED, getEffectiveState(), getState(), YACS::READY, and YACS::TOACTIVATE.

524 {
525  if(node->getState()==YACS::DISABLED)
526  return YACS::DISABLED;
527 
528  YACS::StatesForNode effectiveState=getEffectiveState();
529  switch(effectiveState)
530  {
531  case YACS::READY:
532  return YACS::READY;
533  case YACS::TOACTIVATE:
534  return YACS::READY;
535  case YACS::DISABLED:
536  return YACS::DISABLED;
537  case YACS::ERROR:
538  return YACS::FAILED;
539  default:
540  return node->getState();
541  }
542 }
virtual std::string YACS::ENGINE::Node::getErrorDetails ( ) const
inlinevirtual
std::string Node::getErrorReport ( )
virtual

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

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

Definition at line 713 of file Node.cxx.

References _errorDetails, DEBTRACE, YACS::DISABLED, YACS::ERROR, YACS::FAILED, getEffectiveState(), getName(), getState(), YACS::INTERNALERR, and YACS::INVALID.

Referenced by YACS::ENGINE::Proc::getNodeErrorReport(), YACS::HMI::GenericGui::onGetErrorReport(), and YACS::ENGINE::OptimizerLoop::updateStateOnFailedEventFrom().

714 {
715  if(getState()==YACS::DISABLED)
716  return "<error node= "+getName()+ "state= DISABLED/>\n";
717 
718  YACS::StatesForNode effectiveState=getEffectiveState();
719 
720  DEBTRACE("Node::getErrorReport: " << getName() << " " << effectiveState << " " << _errorDetails);
721  if(effectiveState != YACS::INVALID && effectiveState != YACS::ERROR &&
722  effectiveState != YACS::FAILED && effectiveState != YACS::INTERNALERR)
723  return "";
724 
725  std::string report="<error node= " ;
726  report=report + getName() ;
727  switch(effectiveState)
728  {
729  case YACS::INVALID:
730  report=report+" state= INVALID";
731  break;
732  case YACS::ERROR:
733  report=report+" state= ERROR";
734  break;
735  case YACS::FAILED:
736  report=report+" state= FAILED";
737  break;
738  case YACS::INTERNALERR:
739  report=report+" state= INTERNALERR";
740  break;
741  default:
742  break;
743  }
744  report=report + ">\n" ;
745  report=report+_errorDetails;
746  report=report+"\n</error>";
747  return report;
748 }
ComposedNode* YACS::ENGINE::Node::getFather ( ) const
inline
const std::string Node::getId ( ) const

Definition at line 449 of file Node.cxx.

References YACS::ENGINE::ComposedNode::getChildName(), YACS::ENGINE::ComposedNode::getName(), and getRootNode().

Referenced by YACS::ENGINE::Bloc::writeDot(), YACS::ENGINE::Switch::writeDot(), writeDot(), YACS::ENGINE::Loop::writeDot(), and YACS::ENGINE::ForEachLoop::writeDot().

450 {
451  std::string id=getRootNode()->getName();
452  if(getRootNode() != this)
453  id= id+'.'+ getRootNode()->getChildName(this);
454  string::size_type debut =id.find_first_of('.');
455  while(debut != std::string::npos){
456  id[debut]='_';
457  debut=id.find_first_of('.',debut);
458  }
459  return id;
460 }
string Node::getImplementation ( ) const
Returns
Implementation of node: C++, Python, CORBA... _implementation is set by a derived class in a Runtime it normally applies only to elementaryNodes and it is used by Ports to select Data Converters. Potential problem with Ports attached to composed Nodes...

Definition at line 346 of file Node.cxx.

References _implementation.

Referenced by writeDot().

347 {
348  return _implementation;
349 }
InPort * Node::getInPort ( const std::string &  name) const throw (Exception)

Definition at line 235 of file Node.cxx.

References PMMLBasicsTestLauncher::ret.

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

236 {
237  InPort *ret;
238  try
239  {
240  ret=getInputPort(name);
241  }
242  catch(Exception& e)
243  {
244  ret=getInputDataStreamPort(name);
245  }
246  return ret;
247 }
virtual std::string YACS::ENGINE::Node::getInPortName ( const InPort ) const throw (Exception)
pure virtual
InPropertyPort * Node::getInPropertyPort ( ) const throw (Exception)

Definition at line 250 of file Node.cxx.

References _inPropertyPort.

251 {
252  return _inPropertyPort;
253 }
const std::string& YACS::ENGINE::Node::getName ( ) const
inline

Definition at line 122 of file Node.hxx.

Referenced by YACS::ENGINE::CollectorSwOutPort::addPotentialProducerForMaster(), YACS::HMI::SubjectComposedNode::addSubjectNode(), YACS::ENGINE::OutNode::checkBasicConsistency(), YACS::ENGINE::StudyInNode::checkBasicConsistency(), YACS::ENGINE::PresetNode::checkBasicConsistency(), YACS::ENGINE::StudyOutNode::checkBasicConsistency(), YACS::ENGINE::InputPort::checkBasicConsistency(), YACS::ENGINE::PythonNode::checkBasicConsistency(), YACS::ENGINE::PyFuncNode::checkBasicConsistency(), YACS::ENGINE::DynParaLoop::checkConsistencyAndSetNode(), YACS::ENGINE::DynParaLoop::cloneAndPlaceNodesCoherently(), YACS::ENGINE::PythonEntry::commonRemoteLoadPart1(), YACS::HMI::SubjectNode::copy(), YACS::ENGINE::PythonNode::createRemoteAdaptedPyInterpretor(), YACS::ENGINE::PyFuncNode::createRemoteAdaptedPyInterpretor(), YACS::ENGINE::ComposedNode::edAddDFLink(), YACS::ENGINE::Loop::edSetNode(), YACS::ENGINE::ElementaryNode::edUpdateState(), YACS::ENGINE::ElementaryNode::ensureLoading(), exDisabledState(), YACS::ENGINE::SalomePythonNode::execute(), YACS::ENGINE::CORBANode::execute(), YACS::ENGINE::DistributedPythonNode::execute(), YACS::ENGINE::SalomeNode::execute(), YACS::ENGINE::PythonNode::executeLocal(), YACS::ENGINE::PyFuncNode::executeLocal(), YACS::ENGINE::PythonNode::executeRemote(), YACS::ENGINE::PyFuncNode::executeRemote(), exFailedState(), YACS::ENGINE::ElementaryNode::exUpdateState(), YACS::dynparalooptypeParser< T >::finalizenode(), getErrorReport(), YACS::ENGINE::CollectorSwOutPort::getHumanReprOfIncompleteCases(), YACS::ENGINE::ElementaryNode::getInPortName(), YACS::ENGINE::ComposedNode::getMyQualifiedName(), YACS::ENGINE::Switch::getMyQualifiedName(), YACS::ENGINE::ComposedNode::getName(), YACS::HMI::SubjectNode::getName(), YACS::ENGINE::ElementaryNode::getOutPortName(), YACS::ENGINE::ComposedNode::getPortName(), getQualifiedName(), YACS::ENGINE::ElementaryNode::getReadyTasks(), YACS::ENGINE::ElementaryPoint::getRepr(), YACS::ENGINE::ElementaryNode::init(), YACS::dynparalooptypeParser< T >::initnode(), YACS::looptypeParser< T >::inline_(), YACS::casetypeParser::inline_(), YACS::bloctypeParser< T >::inline_(), YACS::ENGINE::DistributedPythonNode::load(), YACS::HMI::SubjectComposedNode::loadLinks(), YACS::ENGINE::PyFuncNode::loadLocal(), YACS::HMI::CommandReparentNode::localExecute(), YACS::HMI::CommandCopyNode::localExecute(), YACS::HMI::CommandRenameNode::localExecute(), YACS::HMI::CommandRenameNode::localReverse(), modified(), YACS::looptypeParser< T >::node(), YACS::casetypeParser::node(), YACS::bloctypeParser< T >::node(), YACS::HMI::SubjectNode::notifyObserver(), YACS::ENGINE::graphParser::onEnd(), YACS::bloctypeParser< T >::outnode(), YACS::bloctypeParser< T >::preset(), YACS::looptypeParser< T >::remote(), YACS::casetypeParser::remote(), YACS::bloctypeParser< T >::remote(), YACS::HMI::SubjectComposedNode::removeControlLink(), YACS::HMI::SubjectNode::reparent(), resetState(), YACS::ENGINE::PythonNode::retrieveDftRemotePyInterpretorIfAny(), YACS::ENGINE::PyFuncNode::retrieveDftRemotePyInterpretorIfAny(), YACS::HMI::SubjectNode::saveLinks(), YACS::looptypeParser< T >::server(), YACS::casetypeParser::server(), YACS::bloctypeParser< T >::server(), YACS::looptypeParser< T >::service(), YACS::casetypeParser::service(), YACS::bloctypeParser< T >::service(), YACS::HMI::GuiExecutor::setInPortValue(), YACS::HMI::SubjectDataPort::setName(), YACS::HMI::SubjectNode::setName(), setState(), YACS::looptypeParser< T >::sinline(), YACS::casetypeParser::sinline(), YACS::bloctypeParser< T >::sinline(), YACS::ENGINE::ComposedNode::updateStateFrom(), YACS::ENGINE::OptimizerLoop::updateStateOnFailedEventFrom(), YACS::ENGINE::DynParaLoop::updateStateOnFailedEventFrom(), YACS::ENGINE::ForLoop::updateStateOnFinishedEventFrom(), YACS::ENGINE::Bloc::updateStateOnFinishedEventFrom(), YACS::ENGINE::ForEachLoop::updateStateOnFinishedEventFrom(), YACS::ENGINE::VisitorSaveSchema::visitInlineFuncNode(), YACS::ENGINE::VisitorSaveSchema::visitInlineNode(), YACS::ENGINE::VisitorSaveSalomeSchema::visitOutNode(), YACS::ENGINE::VisitorSaveSalomeSchema::visitPresetNode(), YACS::ENGINE::VisitorSaveSchema::visitServerNode(), YACS::ENGINE::VisitorSaveSchema::visitServiceInlineNode(), YACS::ENGINE::VisitorSaveSchema::visitServiceNode(), YACS::ENGINE::VisitorSaveSalomeSchema::visitStudyInNode(), YACS::ENGINE::VisitorSaveSalomeSchema::visitStudyOutNode(), YACS::ENGINE::VisitorSaveSchema::writeSimpleDataLinks(), and YACS::ENGINE::VisitorSaveSchema::writeSimpleStreamLinks().

122 { return _name; }
virtual int YACS::ENGINE::Node::getNumberOfOutputPorts ( ) const
pure virtual
list< Node * > Node::getOutNodes ( ) const

get the set of all nodes connected to the outGate

Definition at line 181 of file Node.cxx.

References _outGate, YACS::ENGINE::OutGate::edSetInGate(), and PMMLBasicsTestLauncher::ret.

Referenced by insertNodeChildrenInSet().

182 {
183  list<Node *> ret;
184  list<InGate *> inGates=_outGate.edSetInGate();
185  for(list<InGate *>::iterator iter=inGates.begin();iter!=inGates.end();iter++)
186  ret.push_back((*iter)->getNode());
187  return ret;
188 }
OutPort * Node::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 in YACS::ENGINE::ForEachLoop, YACS::ENGINE::Switch, YACS::ENGINE::OptimizerLoop, YACS::ENGINE::ComposedNode, YACS::ENGINE::DynParaLoop, and YACS::ENGINE::ForLoop.

Definition at line 271 of file Node.cxx.

References PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::ComposedNode::getOutPort().

272 {
273  OutPort *ret;
274  try
275  {
276  ret=getOutputPort(name);
277  }
278  catch(Exception& e)
279  {
280  ret=getOutputDataStreamPort(name);
281  }
282  return ret;
283 }
virtual std::string YACS::ENGINE::Node::getOutPortName ( const OutPort ) const throw (Exception)
pure virtual
const Proc * Node::getProc ( ) const
virtual

Reimplemented in YACS::ENGINE::Proc.

Definition at line 404 of file Node.cxx.

References _father, and getProc().

405 {
406  if(!_father)
407  return 0;
408  return _father->getProc();
409 }
virtual std::list<ProgressWeight> YACS::ENGINE::Node::getProgressWeight ( ) const
pure virtual
std::map< std::string, std::string > Node::getProperties ( )

Definition at line 480 of file Node.cxx.

References _father, _propertyMap, and getProperties().

Referenced by YACS::ENGINE::SalomeContainerTools::CreateComponentInstance(), YACS::ENGINE::SalomeNode::execute(), and getProperties().

481 {
482  std::map<std::string,std::string> amap=_propertyMap;
483  if(_father)
484  {
485  std::map<std::string,std::string> fatherMap=_father->getProperties();
486  amap.insert(fatherMap.begin(),fatherMap.end());
487  }
488 
489  return amap;
490 }
std::string Node::getProperty ( const std::string &  name)
virtual

Definition at line 468 of file Node.cxx.

References _father, _propertyMap, and getProperty().

Referenced by YACS::ENGINE::SalomeContainerTools::CreateComponentInstance(), YACS::ENGINE::StudyInNode::execute(), YACS::ENGINE::StudyOutNode::execute(), YACS::ENGINE::SalomeProc::getDefaultStudyId(), getProperty(), and YACS::ENGINE::SalomeProc::init().

469 {
470  std::map<std::string,std::string>::iterator it=_propertyMap.find(name);
471 
472  if(it != _propertyMap.end())
473  return it->second;
474  else if(_father)
475  return _father->getProperty(name);
476  else
477  return "";
478 }
std::map<std::string,std::string> YACS::ENGINE::Node::getPropertyMap ( )
inline
std::string Node::getQualifiedName ( ) const

same as Node::getName() in most cases, but differs for children of switch

used by writeDot to distinguish children of switch, by adding a prefix to the name. prefix is built on case id.

Definition at line 597 of file Node.cxx.

References _father, YACS::ENGINE::ComposedNode::getMyQualifiedName(), and getName().

Referenced by YACS::ENGINE::ComposedNode::getChildName(), YACS::ENGINE::ComposedNode::getPortName(), YACS::ENGINE::Proc::getXMLState(), Proc_i::getXMLState(), YACS::HMI::CommandCopyNode::localExecute(), YACS::ENGINE::Bloc::writeDot(), YACS::ENGINE::Proc::writeDot(), writeDot(), and YACS::ENGINE::Loop::writeDot().

598 {
599  if(_father)
600  return _father->getMyQualifiedName(this);
601  return getName();
602 }
virtual std::list<ElementaryNode *> YACS::ENGINE::Node::getRecursiveConstituents ( ) const
pure virtual
ComposedNode * Node::getRootNode ( ) const throw (Exception)
virtual

Reimplemented in YACS::ENGINE::ComposedNode.

Definition at line 411 of file Node.cxx.

References _father.

Referenced by YACS::ENGINE::InPort::edRemoveAllLinksLinkedWithMe(), getId(), YACS::ENGINE::ComposedNode::getRootNode(), and YACS::HMI::GuiExecutor::setInPortValue().

412 {
413  if(!_father)
414  throw Exception("No root node");
415  ComposedNode *iter=_father;
416  while(iter->_father)
417  iter=iter->_father;
418  return (ComposedNode *)iter;
419 }
std::list< InPort * > Node::getSetOfInPort ( ) const

Definition at line 285 of file Node.cxx.

References getSetOfInputDataStreamPort(), getSetOfInputPort(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::ElementaryNode::getAllInPortsComingFromOutsideOfCurrentScope(), YACS::ENGINE::ComposedNode::getAllInPortsComingFromOutsideOfCurrentScope(), YACS::ENGINE::DynParaLoop::prepareInputsFromOutOfScope(), and YACS::HMI::SceneElementaryNodeItem::reorganize().

286 {
287  list<InPort *> ret;
288  list<InputPort *> data=getSetOfInputPort();
289  ret.insert(ret.end(),data.begin(),data.end());
290  list<InputDataStreamPort *> ds=getSetOfInputDataStreamPort();
291  ret.insert(ret.end(),ds.begin(),ds.end());
292  return ret;
293 }
virtual std::list<InputDataStreamPort *> YACS::ENGINE::Node::getSetOfInputDataStreamPort ( ) const
pure virtual
virtual std::vector< std::pair<InPort *, OutPort *> > YACS::ENGINE::Node::getSetOfLinksComingInCurrentScope ( ) const
pure virtual
std::list< OutPort * > Node::getSetOfOutPort ( ) const

Definition at line 295 of file Node.cxx.

References getSetOfOutputDataStreamPort(), getSetOfOutputPort(), and PMMLBasicsTestLauncher::ret.

Referenced by YACS::ENGINE::ElementaryNode::getAllOutPortsLeavingCurrentScope(), YACS::ENGINE::ComposedNode::getAllOutPortsLeavingCurrentScope(), YACS::HMI::SceneBlocItem::getNodesInfo(), YACS::ENGINE::ComposedNode::getSetOfInternalLinks(), and YACS::HMI::SceneElementaryNodeItem::reorganize().

296 {
297  list<OutPort *> ret;
298  list<OutputPort *> data=getSetOfOutputPort();
299  ret.insert(ret.end(),data.begin(),data.end());
300  list<OutputDataStreamPort *> ds=getSetOfOutputDataStreamPort();
301  ret.insert(ret.end(),ds.begin(),ds.end());
302  return ret;
303 }
virtual std::list<OutputDataStreamPort *> YACS::ENGINE::Node::getSetOfOutputDataStreamPort ( ) const
pure virtual
std::string Node::getStateName ( YACS::StatesForNode  state)
static

Return the name of a state.

Definition at line 785 of file Node.cxx.

References CORBAEngineTest::state.

Referenced by YACS::ENGINE::Executor::functionForTaskExecution(), YACS::ENGINE::Executor::launchTasks(), YACS::ENGINE::Executor::loadTask(), and main().

786 {
787  static NodeStateNameMap nodeStateNameMap;
788  return nodeStateNameMap[state];
789 }
virtual int YACS::ENGINE::Node::isModified ( )
inlinevirtual

Definition at line 186 of file Node.hxx.

186 { return _modified; }
int Node::isValid ( )
virtual

indicates if the node is valid (returns 1) or not (returns 0)

This method is useful when editing a schema. It has no meaning in execution. When a node is edited, its modified method must be called so when isValid is called, its state is updated (call to edUpdateState) before returning the validity check

Definition at line 688 of file Node.cxx.

References _modified, _state, edUpdateState(), and YACS::INVALID.

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

689 {
690  if(_modified)
691  edUpdateState();
692  if(_state > YACS::INVALID)
693  return 1;
694  else
695  return 0;
696 }
bool Node::operator< ( const Node other) const

Definition at line 331 of file Node.cxx.

References _father.

332 {
333  const ComposedNode *iter=_father;
334  while(iter!=0 && iter!=(&other))
335  iter=iter->_father;
336  return iter==(&other);
337 }
bool Node::operator> ( const Node other) const

Definition at line 323 of file Node.cxx.

References _father.

324 {
325  const ComposedNode *iter=other._father;
326  while(iter!=0 && iter!=this)
327  iter=iter->_father;
328  return iter==this;
329 }
virtual void YACS::ENGINE::Node::performDuplicationOfPlacement ( const Node other)
protectedpure virtual

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

Implemented in YACS::ENGINE::InlineNode, YACS::ENGINE::ElementaryNode, YACS::ENGINE::ComposedNode, and YACS::ENGINE::ServiceNode.

Referenced by clone().

virtual void YACS::ENGINE::Node::performShallowDuplicationOfPlacement ( const Node other)
protectedpure virtual

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

Implemented in YACS::ENGINE::InlineNode, YACS::ENGINE::ElementaryNode, YACS::ENGINE::ComposedNode, and YACS::ENGINE::ServiceNode.

Referenced by cloneWithoutCompAndContDeepCpy().

void Node::resetState ( int  level)
virtual

Reset the node state depending on the parameter level.

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

Definition at line 809 of file Node.cxx.

References _state, YACS::ACTIVATED, DEBTRACE, YACS::DONE, YACS::ERROR, YACS::FAILED, YACS::ENGINE::InGate::getBackLinks(), getInGate(), getName(), getState(), YACS::READY, YACS::ENGINE::InGate::setPrecursorDone(), and setState().

Referenced by YACS::ENGINE::ComposedNode::resetState().

810 {
811  DEBTRACE("Node::resetState " << getName() << "," << level << "," << _state);
813  {
815  InGate* inGate = getInGate();
816  std::list<OutGate*> backlinks = inGate->getBackLinks();
817  for (std::list<OutGate*>::iterator io = backlinks.begin(); io != backlinks.end(); io++)
818  {
819  Node* fromNode = (*io)->getNode();
820  if(fromNode->getState() == YACS::DONE)
821  {
822  inGate->setPrecursorDone(*io);
823  }
824  }
825  }
826 }
void Node::sendEvent ( const std::string &  event)
virtual

emit notification to all observers registered with the dispatcher

The dispatcher is unique and can be obtained by getDispatcher()

Definition at line 656 of file Node.cxx.

References DEBTRACE, YACS::ENGINE::Dispatcher::dispatch(), and YACS::ENGINE::Dispatcher::getDispatcher().

Referenced by YACS::ENGINE::ForLoop::exUpdateProgress(), YACS::ENGINE::ForEachLoop::exUpdateProgress(), and setState().

657 {
658  DEBTRACE("Node::sendEvent " << event);
660  disp->dispatch(this,event);
661 }
void Node::sendEvent2 ( const std::string &  event,
void *  something 
)
virtual

emit notification to all observers registered with the dispatcher

The dispatcher is unique and can be obtained by getDispatcher()

Definition at line 667 of file Node.cxx.

References YACS::ENGINE::Dispatcher::dispatch2(), and YACS::ENGINE::Dispatcher::getDispatcher().

Referenced by YACS::ENGINE::ForEachLoop::updateStateForWorkNodeOnFinishedEventFrom().

668 {
670  disp->dispatch2(this,event,something);
671 }
virtual void YACS::ENGINE::Node::setErrorDetails ( const std::string &  error)
inlinevirtual
void Node::setName ( const std::string &  name)

Change the name of the node.

raise an exception if the name is already used in the scope of its father

Parameters
name: the new name

Definition at line 159 of file Node.cxx.

References _father, _name, YACS::ENGINE::ComposedNode::getChildByName(), YACS::ENGINE::ComposedNode::getName(), and YACS::ENGINE::ComposedNode::isNameAlreadyUsed().

Referenced by YACS::ENGINE::ElementaryNode::getReadyTasks(), YACS::HMI::CommandAddNodeFromCatalog::localExecute(), YACS::HMI::CommandPutInComposedNode::localExecute(), YACS::HMI::CommandCopyNode::localExecute(), YACS::HMI::CommandRenameNode::localExecute(), and YACS::HMI::CommandRenameNode::localReverse().

160 {
161  if(_father)
162  {
163  if(_father->isNameAlreadyUsed(name))
164  {
165  if ( _father->getChildByName(name) != this )
166  {
167  std::string what("Name ");
168  what+=name;
169  what+=" already exists in the scope of "; what+=_father->getName();
170  throw Exception(what);
171  }
172  }
173  }
174  _name=name;
175 }
void Node::setProperties ( std::map< std::string, std::string >  properties)
virtual

Definition at line 492 of file Node.cxx.

References _propertyMap.

Referenced by YACS::HMI::CommandSetNodeProperties::localExecute(), and YACS::HMI::CommandSetNodeProperties::localReverse().

493 {
494  _propertyMap.clear();
495  _propertyMap=properties;
496 }
void Node::setProperty ( const std::string &  name,
const std::string &  value 
)
virtual

Definition at line 462 of file Node.cxx.

References _propertyMap, and DEBTRACE.

Referenced by YACS::HMI::GenericGui::createContext(), and YACS::ENGINE::InPropertyPort::exNewPropertyValue().

463 {
464  DEBTRACE("Node::setProperty " << name << " " << value);
465  _propertyMap[name]=value;
466 }
void Node::setState ( YACS::StatesForNode  theState)

Sets the given state for node.

It is strongly recommended to use this function if you want to change the state of the node, instead of direct access to _state field (_state = ...).

Definition at line 617 of file Node.cxx.

References _state, DEBTRACE, getName(), and sendEvent().

Referenced by YACS::ENGINE::FakeNodeForOptimizerLoop::aborted(), YACS::ENGINE::FakeNodeForSwitch::aborted(), YACS::ENGINE::ElementaryNode::aborted(), YACS::ENGINE::FakeNodeForForEachLoop::aborted(), YACS::ENGINE::FakeNodeForLoop::aborted(), YACS::ENGINE::ElementaryNode::begin(), YACS::ENGINE::ElementaryNode::connected(), YACS::ENGINE::ElementaryNode::edUpdateState(), YACS::ENGINE::ComposedNode::edUpdateState(), YACS::ENGINE::ElementaryNode::ensureLoading(), ensureLoading(), exDisabledState(), exFailedState(), YACS::ENGINE::ForLoop::exUpdateState(), YACS::ENGINE::WhileLoop::exUpdateState(), YACS::ENGINE::Bloc::exUpdateState(), YACS::ENGINE::ElementaryNode::exUpdateState(), YACS::ENGINE::OptimizerLoop::exUpdateState(), YACS::ENGINE::Switch::exUpdateState(), exUpdateState(), YACS::ENGINE::ForEachLoop::exUpdateState(), YACS::ENGINE::FakeNodeForLoop::FakeNodeForLoop(), YACS::ENGINE::OptimizerLoop::finalize(), YACS::ENGINE::FakeNodeForOptimizerLoop::finished(), YACS::ENGINE::FakeNodeForSwitch::finished(), YACS::ENGINE::ElementaryNode::finished(), YACS::ENGINE::FakeNodeForForEachLoop::finished(), YACS::ENGINE::FakeNodeForLoop::finished(), YACS::ENGINE::DynParaLoop::forwardExecStateToOriginalBody(), YACS::ENGINE::Bloc::getReadyTasks(), YACS::ENGINE::Switch::getReadyTasks(), YACS::ENGINE::Loop::getReadyTasks(), YACS::ENGINE::ForEachLoop::getReadyTasks(), YACS::ENGINE::ElementaryNode::init(), init(), YACS::ENGINE::PyFuncNode::init(), resetState(), YACS::ENGINE::StateLoader(), YACS::ENGINE::ForEachLoop::updateStateForFinalizeNodeOnFinishedEventFrom(), YACS::ENGINE::ForEachLoop::updateStateForInitNodeOnFinishedEventFrom(), YACS::ENGINE::ForEachLoop::updateStateForWorkNodeOnFinishedEventFrom(), YACS::ENGINE::ComposedNode::updateStateFrom(), YACS::ENGINE::Bloc::updateStateOnFailedEventFrom(), YACS::ENGINE::DynParaLoop::updateStateOnFailedEventFrom(), YACS::ENGINE::ComposedNode::updateStateOnFailedEventFrom(), YACS::ENGINE::WhileLoop::updateStateOnFinishedEventFrom(), YACS::ENGINE::ForLoop::updateStateOnFinishedEventFrom(), YACS::ENGINE::Bloc::updateStateOnFinishedEventFrom(), YACS::ENGINE::OptimizerLoop::updateStateOnFinishedEventFrom(), YACS::ENGINE::Switch::updateStateOnFinishedEventFrom(), and YACS::ENGINE::ComposedNode::updateStateOnStartEventFrom().

618 {
619  DEBTRACE("Node::setState: " << getName() << " " << theState);
620  _state = theState;
621  // emit notification to all observers registered with the dispatcher on any change of the node's state
622  sendEvent("status");
623 }
void Node::shutdown ( int  level)
virtual

Stop all pending activities of the node.

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

Reimplemented in YACS::ENGINE::DynParaLoop, YACS::ENGINE::PyFuncNode, YACS::ENGINE::SalomeNode, YACS::ENGINE::PythonNode, and YACS::ENGINE::ComposedNode.

Definition at line 795 of file Node.cxx.

796 {
797  if(level==0)return;
798 }
void Node::writeDot ( std::ostream &  os) const
virtual

Dump to the input stream a dot representation of the node.

Parameters
os: the input stream

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

Definition at line 582 of file Node.cxx.

References getColorState(), getEffectiveState(), getId(), getImplementation(), getQualifiedName(), and CORBAEngineTest::state.

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

583 {
584  os << getId() << "[fillcolor=\"" ;
586  os << getColorState(state);
587  os << "\" label=\"" << getImplementation() << "Node:" ;
588  os << getQualifiedName() <<"\"];\n";
589 }

Friends And Related Function Documentation

friend class Bloc
friend

Definition at line 69 of file Node.hxx.

friend class ComposedNode
friend

Definition at line 77 of file Node.hxx.

friend class DynParaLoop
friend

Definition at line 75 of file Node.hxx.

friend class ElementaryNode
friend

Definition at line 78 of file Node.hxx.

friend class ForEachLoop
friend

Definition at line 76 of file Node.hxx.

friend class InPropertyPort
friend

Definition at line 74 of file Node.hxx.

Referenced by Node().

friend class InputPort
friend

Definition at line 72 of file Node.hxx.

friend class Loop
friend

Definition at line 70 of file Node.hxx.

friend class OutputPort
friend

Definition at line 73 of file Node.hxx.

void StateLoader ( Node node,
YACS::StatesForNode  state 
)
friend
friend class Switch
friend

Definition at line 71 of file Node.hxx.

friend class Visitor
friend

Definition at line 79 of file Node.hxx.

Member Data Documentation

YACS::Colour YACS::ENGINE::Node::_colour
mutable
InPropertyPort* YACS::ENGINE::Node::_inPropertyPort
protected

Definition at line 86 of file Node.hxx.

Referenced by getInPropertyPort(), Node(), and ~Node().

int YACS::ENGINE::Node::_numId
protected

Definition at line 94 of file Node.hxx.

Referenced by getNumId(), and Node().

OutGate YACS::ENGINE::Node::_outGate
protected
YACS::StatesForNode YACS::ENGINE::Node::_state
protected
int Node::_total = 0
staticprotected

Definition at line 93 of file Node.hxx.

Referenced by Node().


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