Version: 8.3.0
YACS::ENGINE::FakeNodeForSwitch Class Reference

#include <Switch.hxx>

Inheritance diagram for YACS::ENGINE::FakeNodeForSwitch:
Collaboration diagram for YACS::ENGINE::FakeNodeForSwitch:

Private Member Functions

 FakeNodeForSwitch (Switch *sw, bool normalFinish, bool internalError=false)
 
 FakeNodeForSwitch (const FakeNodeForSwitch &other)
 
NodesimpleClone (ComposedNode *father, bool editionOnly) const
 
void exForwardFailed ()
 
void exForwardFinished ()
 
void execute ()
 
void aborted ()
 
void finished ()
 

Private Attributes

Switch_sw
 
bool _normalFinish
 
bool _internalError
 

Friends

class Switch
 

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) throw (Exception)
 
std::list< ElementaryNode * > getRecursiveConstituents () const
 
std::list< ProgressWeightgetProgressWeight () const
 Get the progress weight for all elementary nodes. More...
 
NodegetChildByName (const std::string &name) const throw (Exception)
 
virtual void checkBasicConsistency () const throw (Exception)
 
ComposedNodegetDynClonerIfExists (const ComposedNode *levelToStop) const
 
int getNumberOfInputPorts () const
 
int getNumberOfOutputPorts () const
 
std::string getInPortName (const InPort *) const throw (Exception)
 
std::string getOutPortName (const OutPort *) const throw (Exception)
 
InputPortgetInputPort (const std::string &name) const throw (Exception)
 
OutputPortgetOutputPort (const std::string &name) const throw (Exception)
 
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 throw (Exception)
 
OutputDataStreamPortgetOutputDataStreamPort (const std::string &name) const throw (Exception)
 
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) throw (Exception)
 
virtual OutputPortedAddOutputPort (const std::string &outputPortName, TypeCode *type) throw (Exception)
 
virtual InputDataStreamPortedAddInputDataStreamPort (const std::string &inputPortDSName, TypeCode *type) throw (Exception)
 
virtual OutputDataStreamPortedAddOutputDataStreamPort (const std::string &outputPortDSName, TypeCode *type) throw (Exception)
 
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
 
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)
 
template<class PORT >
void edRemovePortTypedFromSet (PORT *port, std::list< PORT * > &setOfPorts) throw (Exception)
 
template<class PORT >
bool isPortNameAlreadyExist (const std::string &portName, const std::list< PORT * > &setOfPorts)
 
- Static Public Member Functions inherited from YACS::ENGINE::Node
static std::string getStateName (YACS::StatesForNode state)
 Return the name of a state. More...
 
- 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 throw (Exception)
 
template<class PORT , class ENUMTYPE >
PORT * edAddPort (const std::string &portName, std::list< PORT * > &setOfPorts, ENUMTYPE type) throw (Exception)
 
template<class PORT , class ENUMTYPE >
bool edCheckAddPort (const std::string &portName, std::list< PORT * > &setOfPorts, ENUMTYPE type) throw (Exception)
 
- Static Protected Member Functions inherited from YACS::ENGINE::ElementaryNode
template<class PORT >
static void edRemovePortTypedFromSet (PORT *port, std::list< PORT * > &setOfPorts) throw (Exception)
 
template<class PORT >
static bool isPortNameAlreadyExist (const std::string &portName, const std::list< PORT * > &setOfPorts)
 
- Protected Attributes inherited from YACS::ENGINE::ElementaryNode
std::list< InputPort * > _setOfInputPort
 
std::list< OutputPort * > _setOfOutputPort
 
std::list< InputDataStreamPort * > _setOfInputDataStreamPort
 
std::list< OutputDataStreamPort * > _setOfOutputDataStreamPort
 
bool _createDatastreamPorts
 
bool _multi_port_node
 
- Static Protected Attributes inherited from YACS::ENGINE::Node
static const char SEP_CHAR_IN_PORT [] ="."
 
static int _total = 0
 

Detailed Description

Definition at line 66 of file Switch.hxx.

Constructor & Destructor Documentation

FakeNodeForSwitch::FakeNodeForSwitch ( Switch sw,
bool  normalFinish,
bool  internalError = false 
)
private

Definition at line 226 of file Switch.cxx.

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

Referenced by simpleClone().

226  :ElementaryNode("thisIsAFakeNode"),
227  _sw(sw),
228  _normalFinish(normalFinish),
229  _internalError(internalError)
230 {
232  _father=_sw->getFather();
233 }
FakeNodeForSwitch::FakeNodeForSwitch ( const FakeNodeForSwitch other)
private

Definition at line 235 of file Switch.cxx.

235  :ElementaryNode(other),_sw(0),
236  _normalFinish(false),
237  _internalError(true)
238 {
239 }

Member Function Documentation

void FakeNodeForSwitch::aborted ( )
privatevirtual

Reimplemented from YACS::ENGINE::ElementaryNode.

Definition at line 262 of file Switch.cxx.

References _internalError, YACS::ENGINE::Node::_state, _sw, YACS::ERROR, YACS::INTERNALERR, and YACS::ENGINE::Node::setState().

263 {
264  if(_internalError)
266  else
268 }
void FakeNodeForSwitch::execute ( )
privatevirtual

Implements YACS::ENGINE::Task.

Definition at line 256 of file Switch.cxx.

References _normalFinish.

257 {
258  if(!_normalFinish)
259  throw Exception("");//only to trigger ABORT on Executor
260 }
void FakeNodeForSwitch::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 246 of file Switch.cxx.

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

247 {
248  _sw->exForwardFailed();
249 }
void FakeNodeForSwitch::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 251 of file Switch.cxx.

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

252 {
254 }
void FakeNodeForSwitch::finished ( )
privatevirtual

Reimplemented from YACS::ENGINE::ElementaryNode.

Definition at line 270 of file Switch.cxx.

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

271 {
273 }
Node * FakeNodeForSwitch::simpleClone ( ComposedNode father,
bool  editionOnly 
) const
privatevirtual

Implements YACS::ENGINE::Node.

Definition at line 241 of file Switch.cxx.

References FakeNodeForSwitch().

242 {
243  return new FakeNodeForSwitch(*this);
244 }

Friends And Related Function Documentation

friend class Switch
friend

Definition at line 68 of file Switch.hxx.

Member Data Documentation

bool YACS::ENGINE::FakeNodeForSwitch::_internalError
private

Definition at line 72 of file Switch.hxx.

Referenced by aborted().

bool YACS::ENGINE::FakeNodeForSwitch::_normalFinish
private

Definition at line 71 of file Switch.hxx.

Referenced by execute().

Switch* YACS::ENGINE::FakeNodeForSwitch::_sw
private

Definition at line 70 of file Switch.hxx.

Referenced by aborted(), exForwardFailed(), exForwardFinished(), FakeNodeForSwitch(), and finished().


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