Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

FD::Network Class Reference

#include <Network.h>

Inheritance diagram for FD::Network:

Inheritance graph
[legend]
Collaboration diagram for FD::Network:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Network (std::string nodeName, ParameterSet params)
 ~Network ()
NodegetNodeNamed (const std::string &name)
void addNode (const std::string &factoryName, const std::string &nodeName, const ParameterSet &parameters)
void addNode (Node &node)
virtual void connect (const std::string &currentNodeName, const std::string &inputName, const std::string &inputNodeName, const std::string &outputName)
NoderemoveNode (const std::string &nodeName)
std::string getName ()
void setName (const std::string &my_name)
NodegetSinkNode ()
virtual void setSinkNode (Node *node)
NodegetInputNode ()
virtual void setInputNode (Node *node)
virtual std::vector< NodeInput > & getInputs ()
virtual void reset ()
virtual void stop ()
virtual void cleanupNotify ()
virtual void request (int outputID, const ParameterSet &req)
virtual void initialize ()
virtual ObjectRef getOutput (int output_id, int count)
virtual bool hasOutput (int output_id) const
virtual void connectToNode (std::string in, Node *inNode, std::string out)
virtual void verifyConnect ()

Protected Member Functions

virtual int translateInput (std::string inputName)
virtual int translateOutput (std::string outputName)
virtual void connectToNode (unsigned int in, Node *inNode, unsigned int out)
 Network ()

Protected Attributes

int numNodes
std::map< std::string, Node * > nodeDictionary
NodesinkNode
NodeinputNode

Detailed Description

The Pull Network Class. It holds the nodes which are connected by the Network. A network has always a single input node and a sink node (output node). We use a Factory for the cration of Node instances. That way, we can use a lookup dictionary that contains a name for that factory and a pointer to a Factory Base class that uses a virtual function callde Create(). The initialization must begin at the sink node and is propagated through the network until it reaches the input node.A network can be included as a node as well.


Constructor & Destructor Documentation

FD::Network::Network std::string  nodeName,
ParameterSet  params
 

Subnet: NetworkNode constructor

FD::Network::~Network  ) 
 

default destructor

FD::Network::Network  )  [inline, protected]
 

default constructor should never be used


Member Function Documentation

void FD::Network::addNode Node node  ) 
 

Adding a already constructed node. WATCHOUT , THE NODE IS NOT COPIED AT THE MOMENT

void FD::Network::addNode const std::string &  factoryName,
const std::string &  nodeName,
const ParameterSet parameters
 

Adding a node to the network. We use a factory Name to create an instance of the Node and store the node in the node dictionary with an associated name.

virtual void FD::Network::cleanupNotify  )  [virtual]
 

Notify the node that is will be destroyed shortly

Reimplemented from FD::Node.

virtual void FD::Network::connect const std::string &  currentNodeName,
const std::string &  inputName,
const std::string &  inputNodeName,
const std::string &  outputName
[virtual]
 

connecting two nodes. We are using the node names.

virtual void FD::Network::connectToNode unsigned int  in,
Node inNode,
unsigned int  out
[protected, virtual]
 

Subnet : Connect an input node using numeric (integer) input/output names

Reimplemented from FD::Node.

Reimplemented in FD::Iterator.

virtual void FD::Network::connectToNode std::string  in,
Node inNode,
std::string  out
[virtual]
 

Subnet : The connectToNode method overloaded from Node

Reimplemented from FD::Node.

Reimplemented in FD::Iterator.

Node* FD::Network::getInputNode  )  [inline]
 

Returns the inputNode pointer

virtual std::vector<NodeInput>& FD::Network::getInputs  )  [inline, virtual]
 

Returns the inputs vector

Reimplemented from FD::Node.

std::string FD::Network::getName  )  [inline]
 

Returns the name of the node (the same as in the node dictionary)

Reimplemented from FD::Node.

Node* FD::Network::getNodeNamed const std::string &  name  ) 
 

Returns the associated Node pointer from a lookup dictionary with the node name. We return NULL if the node doesn't exist.

virtual ObjectRef FD::Network::getOutput int  output_id,
int  count
[virtual]
 

Subnet : NetworkNode returns the output of the SubNet (from the sinkNode)

Implements FD::Node.

Reimplemented in FD::Iterator.

Node* FD::Network::getSinkNode  )  [inline]
 

Returns the sinkNode

virtual bool FD::Network::hasOutput int  output_id  )  const [virtual]
 

Subnet : checks if the sinkNode has the desired output

Reimplemented from FD::Node.

virtual void FD::Network::initialize  )  [virtual]
 

Subnet : NetworkNode specific initialize

Reimplemented from FD::Node.

Reimplemented in FD::Iterator.

Node* FD::Network::removeNode const std::string &  nodeName  ) 
 

removing a node. We are using the node name.

virtual void FD::Network::request int  outputID,
const ParameterSet req
[inline, virtual]
 

Standard request-passing method between nodes during initialization

Reimplemented from FD::Node.

Reimplemented in FD::Iterator.

virtual void FD::Network::reset  )  [virtual]
 

resets the Network and all the internal nodes

Reimplemented from FD::Node.

Reimplemented in FD::Iterator.

virtual void FD::Network::setInputNode Node node  )  [inline, virtual]
 

Setting the input node (unique)

void FD::Network::setName const std::string &  my_name  )  [inline]
 

Naming the current network

virtual void FD::Network::setSinkNode Node node  )  [inline, virtual]
 

Setting the sink node (unique)

virtual void FD::Network::stop  )  [virtual]
 

Asks the node to stop what it is doing to allow processing termination

Reimplemented from FD::Node.

Reimplemented in FD::Iterator.

virtual int FD::Network::translateInput std::string  inputName  )  [protected, virtual]
 

Subnet : getting the related number of the input description

Reimplemented from FD::Node.

virtual int FD::Network::translateOutput std::string  outputName  )  [protected, virtual]
 

Subnet : getting the related number of the output description

Reimplemented from FD::Node.

virtual void FD::Network::verifyConnect  )  [virtual]
 

Verify input connections for the node

Reimplemented from FD::Node.


Member Data Documentation

Node* FD::Network::inputNode [protected]
 

The input node

std::map<std::string,Node*> FD::Network::nodeDictionary [protected]
 

The node dictionary

int FD::Network::numNodes [protected]
 

The number of nodes in the network

Node* FD::Network::sinkNode [protected]
 

The sink node


The documentation for this class was generated from the following file:
Generated on Wed Oct 5 14:29:37 2005 for FlowDesigner by  doxygen 1.4.4