class Network

The Pull Network Class. More...

Definition#include <data-flow/include/Network.h>
InheritsNode
Inherited byIterator, ThreadedIterator
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Members


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.

 Network (string nodeName, ParameterSet params)

Subnet: NetworkNode constructor

Network ()

default destructor

Node*  getNodeNamed (const string &name)

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

void  addNode (const string &factoryName,const 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.

void  addNode (Node &node)

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

void  connect (const string &currentNodeName,const string &inputName, const string &inputNodeName, const string &outputName)

[virtual]

connecting two nodes. We are using the node names.

Node*  removeNode (const string &nodeName)

removing a node. We are using the node name.

string  getName ()

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

Reimplemented from Node.

void  setName (const string &my_name)

Naming the current network

Node*  getSinkNode ()

Returns the sinkNode

void  setSinkNode (Node* node)

[virtual]

Setting the sink node (unique)

Node*  getInputNode ()

Returns the inputNode pointer

void  setInputNode (Node* node)

[virtual]

Setting the input node (unique)

vector<NodeInput>&  getInputs ()

[virtual]

Returns the inputs vector

Reimplemented from Node.

void  reset ()

[virtual]

resets the Network and all the internal nodes

Reimplemented from Node.

void  stop ()

[virtual]

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

Reimplemented from Node.

void  cleanupNotify ()

[virtual]

Notify the node that is will be destroyed shortly

Reimplemented from Node.

void  request (int outputID, const ParameterSet &req)

[virtual]

Standard request-passing method between nodes during initialization

Reimplemented from Node.

void  initialize ()

[virtual]

Subnet : NetworkNode specific initialize

Reimplemented from Node.

ObjectRef  getOutput (int output_id, int count)

[virtual]

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

Reimplemented from Node.

bool  hasOutput (int output_id)

[const virtual]

Subnet : checks if the sinkNode has the desired output

Reimplemented from Node.

void  connectToNode (string in, Node *inNode, string out)

[virtual]

Subnet : The connectToNode method overloaded from Node

Reimplemented from Node.

void  verifyConnect ()

[virtual]

Verify input connections for the node

Reimplemented from Node.

int  translateInput (string inputName)

[protected virtual]

Subnet : getting the related number of the input description

Reimplemented from Node.

int  translateOutput (string outputName)

[protected virtual]

Subnet : getting the related number of the output description

Reimplemented from Node.

void  connectToNode (unsigned int in, Node *inNode, unsigned int out)

[protected virtual]

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

Reimplemented from Node.

int numNodes

[protected]

The number of nodes in the network

map<string,Node*> nodeDictionary

[protected]

The node dictionary

Node * sinkNode

[protected]

The sink node

Node * inputNode

[protected]

The input node

 Network ()

[protected]

default constructor should never be used


Generated by: jmvalin@usw-pr-shell2 on Mon Jun 24 00:06:36 2002, using kdoc 2.0a40.