The Gaudi Framework  v29r2 (7a580596)
concurrency::recursive_CF::ControlFlowNode Class Referenceabstract

#include <src/ControlFlowGraph.h>

Inheritance diagram for concurrency::recursive_CF::ControlFlowNode:
Collaboration diagram for concurrency::recursive_CF::ControlFlowNode:

Public Member Functions

 ControlFlowNode (ControlFlowGraph &graph, unsigned int nodeIndex, const std::string &name)
 Constructor. More...
 
virtual ~ControlFlowNode ()
 Destructor. More...
 
virtual void initialize (const std::unordered_map< std::string, unsigned int > &algname_index_map)=0
 Initialize. More...
 
virtual int updateState (AlgsExecutionStates &states, std::vector< int > &node_decisions) const =0
 Method to set algos to CONTROLREADY, if possible. More...
 
virtual void printState (std::stringstream &output, AlgsExecutionStates &states, const std::vector< int > &node_decisions, const unsigned int &recursionLevel) const =0
 Print a string representing the control flow state. More...
 
const unsigned int & getNodeIndex () const
 Get node index. More...
 
const std::stringgetNodeName () const
 Get node name. More...
 

Public Attributes

ControlFlowGraphm_graph
 

Protected Member Functions

std::string stateToString (const int &stateId) const
 Translation between state id and name. More...
 

Protected Attributes

unsigned int m_nodeIndex
 
std::string m_nodeName
 

Detailed Description

Definition at line 25 of file ControlFlowGraph.h.

Constructor & Destructor Documentation

concurrency::recursive_CF::ControlFlowNode::ControlFlowNode ( ControlFlowGraph graph,
unsigned int  nodeIndex,
const std::string name 
)
inline

Constructor.

Definition at line 29 of file ControlFlowGraph.h.

virtual concurrency::recursive_CF::ControlFlowNode::~ControlFlowNode ( )
inlinevirtual

Destructor.

Definition at line 34 of file ControlFlowGraph.h.

34 {}

Member Function Documentation

const unsigned int& concurrency::recursive_CF::ControlFlowNode::getNodeIndex ( ) const
inline

Get node index.

Definition at line 43 of file ControlFlowGraph.h.

const std::string& concurrency::recursive_CF::ControlFlowNode::getNodeName ( ) const
inline

Get node name.

Definition at line 45 of file ControlFlowGraph.h.

virtual void concurrency::recursive_CF::ControlFlowNode::initialize ( const std::unordered_map< std::string, unsigned int > &  algname_index_map)
pure virtual
virtual void concurrency::recursive_CF::ControlFlowNode::printState ( std::stringstream output,
AlgsExecutionStates states,
const std::vector< int > &  node_decisions,
const unsigned int &  recursionLevel 
) const
pure virtual

Print a string representing the control flow state.

Implemented in concurrency::recursive_CF::AlgorithmNode, and concurrency::recursive_CF::DecisionNode.

std::string ControlFlowNode::stateToString ( const int &  stateId) const
protected

Translation between state id and name.

Definition at line 11 of file ControlFlowGraph.cpp.

12  {
13 
14  if ( 0 == stateId )
15  return "FALSE";
16  else if ( 1 == stateId )
17  return "TRUE";
18  else
19  return "UNDEFINED";
20  }
virtual int concurrency::recursive_CF::ControlFlowNode::updateState ( AlgsExecutionStates states,
std::vector< int > &  node_decisions 
) const
pure virtual

Method to set algos to CONTROLREADY, if possible.

Implemented in concurrency::recursive_CF::AlgorithmNode, and concurrency::recursive_CF::DecisionNode.

Member Data Documentation

ControlFlowGraph* concurrency::recursive_CF::ControlFlowNode::m_graph

Definition at line 48 of file ControlFlowGraph.h.

unsigned int concurrency::recursive_CF::ControlFlowNode::m_nodeIndex
protected

Definition at line 53 of file ControlFlowGraph.h.

std::string concurrency::recursive_CF::ControlFlowNode::m_nodeName
protected

Definition at line 54 of file ControlFlowGraph.h.


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