Version: 9.15.0
YACS::ENGINE::FakeNodeForForEachLoop Class Reference

#include <ForEachLoop.hxx>

Inheritance diagram for YACS::ENGINE::FakeNodeForForEachLoop:
Collaboration diagram for YACS::ENGINE::FakeNodeForForEachLoop:

Private Member Functions

 FakeNodeForForEachLoop (ForEachLoopGen *loop, bool normalFinish)
 
 FakeNodeForForEachLoop (const FakeNodeForForEachLoop &other)
 
NodesimpleClone (ComposedNode *father, bool editionOnly) const
 
void exForwardFailed ()
 
void exForwardFinished ()
 
void execute ()
 
void aborted ()
 
void finished ()
 

Private Attributes

ForEachLoopGen_loop
 
bool _normalFinish
 

Static Private Attributes

static const char NAME [] ="thisIsAFakeNode"
 

Friends

class ForEachLoopGen
 

Additional Inherited Members

- Public Member Functions inherited from YACS::ENGINE::ElementaryNode
virtual ~ElementaryNode ()
 
void exUpdateState ()
 Update the node state. More...
 
void init (bool start=true)
 
bool isDeployable () const
 
ComponentInstancegetComponent ()
 
const ComponentInstancegetComponent () const
 
ContainergetContainer ()
 
YACS::StatesForNode getState () const
 
void getReadyTasks (std::vector< Task * > &tasks)
 
void edRemovePort (Port *port)
 
std::list< ElementaryNode * > getRecursiveConstituents () const
 
std::list< ProgressWeightgetProgressWeight () const
 Get the progress weight for all elementary nodes. More...
 
NodegetChildByName (const std::string &name) const
 
virtual void checkBasicConsistency () const
 
ComposedNodegetDynClonerIfExists (const ComposedNode *levelToStop) const
 
int getNumberOfInputPorts () const
 
int getNumberOfOutputPorts () const
 
std::string getInPortName (const InPort *) const
 
std::string getOutPortName (const OutPort *) const
 
InputPortgetInputPort (const std::string &name) const
 
OutputPortgetOutputPort (const std::string &name) const
 
std::list< InputPort * > getSetOfInputPort () const
 
std::list< OutputPort * > getSetOfOutputPort () const
 
std::list< InputPort * > getLocalInputPorts () const
 
std::list< OutputPort * > getLocalOutputPorts () const
 
std::set< OutPort * > getAllOutPortsLeavingCurrentScope () const
 
std::set< InPort * > getAllInPortsComingFromOutsideOfCurrentScope () const
 
virtual std::vector< std::pair< OutPort *, InPort * > > getSetOfLinksLeavingCurrentScope () const
 
virtual std::vector< std::pair< InPort *, OutPort * > > getSetOfLinksComingInCurrentScope () const
 
std::list< InputDataStreamPort * > getSetOfInputDataStreamPort () const
 
std::list< OutputDataStreamPort * > getSetOfOutputDataStreamPort () const
 
InputDataStreamPortgetInputDataStreamPort (const std::string &name) const
 
OutputDataStreamPortgetOutputDataStreamPort (const std::string &name) const
 
virtual InputPortcreateInputPort (const std::string &inputPortName, TypeCode *type)
 
virtual OutputPortcreateOutputPort (const std::string &outputPortName, TypeCode *type)
 
virtual InputDataStreamPortcreateInputDataStreamPort (const std::string &inputPortDSName, TypeCode *type)
 
virtual OutputDataStreamPortcreateOutputDataStreamPort (const std::string &outputPortDSName, TypeCode *type)
 
virtual InputPortedAddInputPort (const std::string &inputPortName, TypeCode *type)
 
virtual OutputPortedAddOutputPort (const std::string &outputPortName, TypeCode *type)
 
virtual InputDataStreamPortedAddInputDataStreamPort (const std::string &inputPortDSName, TypeCode *type)
 
virtual OutputDataStreamPortedAddOutputDataStreamPort (const std::string &outputPortDSName, TypeCode *type)
 
virtual void edOrderInputPorts (const std::list< InputPort * > &ports)
 
virtual void edOrderOutputPorts (const std::list< OutputPort * > &ports)
 
virtual std::string typeName ()
 
virtual void edUpdateState ()
 update the status of the node More...
 
virtual void ensureLoading ()
 Put this node into TOLOAD state when possible. More...
 
int getMaxLevelOfParallelism () const
 
ComplexWeightgetWeight ()
 
void setWeight (double elementaryWeight)
 
void getWeightRegardingDPL (ComplexWeight *weight)
 
void partitionRegardingDPL (const PartDefinition *pd, std::map< ComposedNode *, YACS::BASES::AutoRefCnt< PartDefinition > > &zeMap)
 
void begin ()
 
bool isReady ()
 
void loaded ()
 Notify this node that it is loaded. More...
 
void connected ()
 Notify this node that it is connected. More...
 
virtual std::string getErrorDetails ()
 Give a description of error when node status is ERROR. More...
 
virtual void initService ()
 
virtual void connectService ()
 
virtual void disconnectService ()
 
virtual void load ()
 
virtual void getCoupledTasks (std::set< Task * > &coupledSet)
 Calls getCoupledNodes for Task interface. More...
 
virtual void getCoupledNodes (std::set< Task * > &coupledSet)
 Put all nodes that are coupled to this node in coupledSet. More...
 
void accept (Visitor *visitor)
 
virtual void addDatastreamPortToInitMultiService (const std::string &port_name, int number)
 
- Public Member Functions inherited from YACS::ENGINE::Node
virtual ~Node ()
 
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 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...
 
void writeDotInFile (const std::string &fileName) const
 
virtual void exFailedState ()
 Notify this node that its execution has failed. More...
 
virtual void exDisabledState ()
 Notify this node that it has been disabled. More...
 
std::list< InPort * > getSetOfInPort () const
 
std::list< OutPort * > getSetOfOutPort () const
 
virtual std::set< InputPort * > edGetSetOfUnitializedInputPort () const
 Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency. More...
 
virtual bool edAreAllInputPortInitialized () const
 Becomes deprecated soon. Replaced by ComposedNode::CheckConsistency. More...
 
InPortgetInPort (const std::string &name) const
 
InPropertyPortgetInPropertyPort () const
 
virtual OutPortgetOutPort (const std::string &name) const
 
std::list< ComposedNode * > getAllAscendanceOf (ComposedNode *levelToStop=0) const
 
bool operator> (const Node &other) const
 
bool operator< (const Node &other) const
 
std::string getImplementation () const
 
DynParaLoopgetClosestDPLAmongAncestors () const
 
virtual ComposedNodegetRootNode () 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
 
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 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 cleanNodes ()
 Clean the node in case of not clean exit. More...
 
- Public Member Functions inherited from YACS::ENGINE::Task
virtual void imposeResource (const std::string &resource_name, const std::string &container_name)
 
virtual bool canAcceptImposedResource ()
 
virtual bool hasImposedResource () const
 
virtual ~Task ()
 
- Static Public Member Functions inherited from YACS::ENGINE::Node
static std::string getStateName (YACS::StatesForNode state)
 Return the name of a state. More...
 
static void checkValidityOfNodeName (const std::string &name)
 
- Public Attributes inherited from YACS::ENGINE::Node
YACS::Colour _colour
 
- Static Public Attributes inherited from YACS::ENGINE::Node
static std::map< int, Node * > idMap
 
- Protected Member Functions inherited from YACS::ENGINE::ElementaryNode
 ElementaryNode (const std::string &name)
 
 ElementaryNode (const ElementaryNode &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 initCommonPartWithoutStateManagement (bool start)
 
virtual void createMultiDatastreamPorts ()
 
void edDisconnectAllLinksWithMe ()
 
bool areAllInputPortsValid () const
 
template<class PORT >
PORT * getPort (const std::string &name, const std::list< PORT * > &setOfPorts) const
 
template<class PORT , class ENUMTYPE >
PORT * edAddPort (const std::string &portName, std::list< PORT * > &setOfPorts, ENUMTYPE type)
 
template<class PORT , class ENUMTYPE >
bool edCheckAddPort (const std::string &portName, std::list< PORT * > &setOfPorts, ENUMTYPE type)
 
- Protected Member Functions inherited from YACS::ENGINE::Node
 Node (const std::string &name)
 
 Node (const Node &other, ComposedNode *father)
 
- Static Protected Member Functions inherited from YACS::ENGINE::ElementaryNode
template<class PORT >
static void edRemovePortTypedFromSet (PORT *port, std::list< PORT * > &setOfPorts)
 
template<class PORT >
static bool isPortNameAlreadyExist (const std::string &portName, const std::list< PORT * > &setOfPorts)
 
- Static Protected Member Functions inherited from YACS::ENGINE::Node
static void checkValidityOfPortName (const std::string &name)
 
static ComposedNodecheckHavingCommonFather (Node *node1, Node *node2)
 
- Protected Attributes inherited from YACS::ENGINE::ElementaryNode
std::list< InputPort * > _setOfInputPort
 
std::list< OutputPort * > _setOfOutputPort
 
std::list< InputDataStreamPort * > _setOfInputDataStreamPort
 
std::list< OutputDataStreamPort * > _setOfOutputDataStreamPort
 
ComplexWeight _weight
 
bool _createDatastreamPorts
 
bool _multi_port_node
 
- Protected Attributes inherited from YACS::ENGINE::Node
InGate _inGate
 
OutGate _outGate
 
InPropertyPort_inPropertyPort
 
std::string _name
 
ComposedNode_father
 
YACS::StatesForNode _state
 
int _modified
 
std::string _errorDetails
 
int _numId
 
std::string _implementation
 
std::map< std::string, std::string > _propertyMap
 
Node_eventReceiver =nullptr
 
- Static Protected Attributes inherited from YACS::ENGINE::Node
static const char SEP_CHAR_IN_PORT [] ="."
 
static int _total = 0
 

Detailed Description

Definition at line 107 of file ForEachLoop.hxx.

Constructor & Destructor Documentation

◆ FakeNodeForForEachLoop() [1/2]

FakeNodeForForEachLoop::FakeNodeForForEachLoop ( ForEachLoopGen loop,
bool  normalFinish 
)
private

Definition at line 260 of file ForEachLoop.cxx.

261  _loop(loop),
262  _normalFinish(normalFinish)
263 {
266 }
ComposedNode * _father
Definition: Node.hxx:90
friend class ElementaryNode
Definition: Node.hxx:80
ComposedNode * getFather() const
Definition: Node.hxx:127
YACS::StatesForNode _state
Definition: Node.hxx:91
@ TOACTIVATE
Definition: define.hxx:40

References YACS::ENGINE::Node::_father, _loop, YACS::ENGINE::Node::_state, YACS::ENGINE::Node::getFather(), and YACS::TOACTIVATE.

Referenced by simpleClone().

◆ FakeNodeForForEachLoop() [2/2]

FakeNodeForForEachLoop::FakeNodeForForEachLoop ( const FakeNodeForForEachLoop other)
private

Definition at line 268 of file ForEachLoop.cxx.

268  :ElementaryNode(other),_loop(0),
269  _normalFinish(false)
270 {
271 }

Member Function Documentation

◆ aborted()

void FakeNodeForForEachLoop::aborted ( )
privatevirtual

Reimplemented from YACS::ENGINE::ElementaryNode.

Definition at line 296 of file ForEachLoop.cxx.

297 {
299 }
void setState(YACS::StatesForNode theState)
Sets the given state for node.
Definition: Node.cxx:652
@ ERROR
Definition: define.hxx:52

References _loop, YACS::ERROR, and YACS::ENGINE::Node::setState().

◆ execute()

void FakeNodeForForEachLoop::execute ( )
privatevirtual

Implements YACS::ENGINE::Task.

Definition at line 288 of file ForEachLoop.cxx.

289 {
290  if(!_normalFinish)
291  throw Exception("");//only to trigger ABORT on Executor
292  else
294 }

References _loop, _normalFinish, and YACS::ENGINE::ForEachLoopGen::pushAllSequenceValues().

◆ exForwardFailed()

void FakeNodeForForEachLoop::exForwardFailed ( )
privatevirtual

Called typically by Bloc to notify failure on potentially next nodes on the same scope of 'this'

Reimplemented from YACS::ENGINE::Node.

Definition at line 278 of file ForEachLoop.cxx.

279 {
281 }
virtual void exForwardFailed()
Definition: Node.cxx:378

References _loop, and YACS::ENGINE::Node::exForwardFailed().

◆ exForwardFinished()

void FakeNodeForForEachLoop::exForwardFinished ( )
privatevirtual

Called typically by Bloc to activate potentially next nodes on the same scope of 'this'

Reimplemented from YACS::ENGINE::Node.

Definition at line 283 of file ForEachLoop.cxx.

284 {
286 }
virtual void exForwardFinished()
Definition: Node.cxx:386

References _loop, and YACS::ENGINE::Node::exForwardFinished().

◆ finished()

void FakeNodeForForEachLoop::finished ( )
privatevirtual

Reimplemented from YACS::ENGINE::ElementaryNode.

Definition at line 301 of file ForEachLoop.cxx.

302 {
304 }
@ DONE
Definition: define.hxx:43

References _loop, YACS::DONE, and YACS::ENGINE::Node::setState().

◆ simpleClone()

Node * FakeNodeForForEachLoop::simpleClone ( ComposedNode father,
bool  editionOnly 
) const
privatevirtual

Implements YACS::ENGINE::Node.

Definition at line 273 of file ForEachLoop.cxx.

274 {
275  return new FakeNodeForForEachLoop(*this);
276 }
FakeNodeForForEachLoop(ForEachLoopGen *loop, bool normalFinish)

References FakeNodeForForEachLoop().

Friends And Related Function Documentation

◆ ForEachLoopGen

friend class ForEachLoopGen
friend

Definition at line 109 of file ForEachLoop.hxx.

Member Data Documentation

◆ _loop

ForEachLoopGen* YACS::ENGINE::FakeNodeForForEachLoop::_loop
private

◆ _normalFinish

bool YACS::ENGINE::FakeNodeForForEachLoop::_normalFinish
private

Definition at line 112 of file ForEachLoop.hxx.

Referenced by execute().

◆ NAME

const char FakeNodeForForEachLoop::NAME ="thisIsAFakeNode"
staticprivate

Definition at line 123 of file ForEachLoop.hxx.


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