TreeNode Class Reference
[Fountain master and slave nodes]

represents a Fountain node in the tree topology More...

#include <TreeNode.h>

List of all members.

Public Types

enum  TreeNodeState
 Contains the state that each TreeNode object can have.

Public Member Functions

 TreeNode (const NodeID &nodeID, FountainWireProtPtr conn=FountainWireProtPtr(NULL))
 Default constructor.
 ~TreeNode ()
 Destructor.
 TreeNode (const TreeNode &rhs)
 Copy constructor.
TreeNodeoperator= (const TreeNode &rhs)
 Assignment operator.
bool operator== (const TreeNode &rhs) const
bool operator!= (const TreeNode &rhs) const
 Inequality operator to compare the IDs of two TreeNode objects.
bool operator< (const TreeNode &rhs) const
 Less than operator to lexically compare the IDs of two TreeNode objects.
const std::string & getHostname () const
 operator NodeID () const
 Conversion operator to NodeID.
unsigned int getListenPort () const
 Get the listen port.
TreeNodeState getState () const
 Get the TreeNodeState.
FountainWireProtPtr getConnection () const
 Get the connection.
void setState (TreeNodeState s)
 Set the state of this node.
void setConnection (FountainWireProtPtr con)
 Set this node's connection.

Static Public Member Functions

static const char * fountain_convert (TreeNodeState t)
 Convert a TreeNodeState into a c-string.

Friends

std::ostream & operator<< (std::ostream &output, const TreeNode &rhs)
 ostream operator


Detailed Description

represents a Fountain node in the tree topology

TreeNode objexts are used to maintain information about all Fountain nodes present in the tree topology maintained by the master Fountain node.


Constructor & Destructor Documentation

TreeNode::TreeNode const NodeID nodeID,
FountainWireProtPtr  conn = FountainWireProtPtr(NULL)
[inline]
 

Default constructor.

Parameters:
nodeID The NodeID to use for this node
conn The connection for this node
Exceptions:
FountainException if the nodeID is invalid


Member Function Documentation

const char * TreeNode::fountain_convert TreeNodeState  t  )  [static]
 

Convert a TreeNodeState into a c-string.

Returns:
a c-string containing the text representation of the TreeNodeState t
Parameters:
t A TreeNodeState

FountainWireProtPtr TreeNode::getConnection  )  const [inline]
 

Get the connection.

Returns:
A SmartPtr object wrapped around a FountainWireProt handler containing this node's connection

const std::string& TreeNode::getHostname  )  const [inline]
 

Returns:
a string object containing the hostname

unsigned int TreeNode::getListenPort  )  const [inline]
 

Get the listen port.

Returns:
the listen port

TreeNodeState TreeNode::getState  )  const [inline]
 

Get the TreeNodeState.

Returns:
The TreeNodeState

bool TreeNode::operator!= const TreeNode rhs  )  const [inline]
 

Inequality operator to compare the IDs of two TreeNode objects.

Returns:
true if the two ID strings are lexicographically equal

bool TreeNode::operator== const TreeNode rhs  )  const [inline]
 

Returns:
true if the two ID strings are lexicographically equal

void TreeNode::setConnection FountainWireProtPtr  con  )  [inline]
 

Set this node's connection.

Parameters:
con The connection

void TreeNode::setState TreeNodeState  s  )  [inline]
 

Set the state of this node.

Parameters:
s The state


The documentation for this class was generated from the following files:
Generated on Wed Mar 8 14:43:33 2006 for Fountain by  doxygen 1.4.6