GraphNode< T > Class Template Reference

#include <TAPsGraphNode.hpp>

Collaboration diagram for GraphNode< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

GetValue () const
void SetValue (T v)
virtual ~GraphNode ()

Public Attributes

bool m_bMark
int m_iID
m_tValue
std::set< int > m_vNeighbors

Protected Member Functions

int GetID () const
bool GetStatusMark () const
 GraphNode (const T &value=T(), int id=-1)
void Mark ()
void SetID (int id)
void SetStatusMark (bool b)
void Unmark ()

Friends

class DirectedGraph< T >
std::ostream & operator<< (std::ostream &output, GraphNode< T > const &node)


Detailed Description

template<typename T>
class GraphNode< T >

Definition at line 23 of file TAPsGraphNode.hpp.


Constructor & Destructor Documentation

template<typename T>
BEGIN_NAMESPACE_TAPs__DS GraphNode< T >::GraphNode ( const T &  value = T(),
int  id = -1 
) [inline, protected]

Definition at line 20 of file TAPsGraphNode.cpp.

00021     : m_iID( id ), 
00022       m_tValue( value ),
00023       m_bMark( false ),
00024       m_vNeighbors()
00025 {}

template<typename T>
GraphNode< T >::~GraphNode (  )  [inline, virtual]

Definition at line 28 of file TAPsGraphNode.cpp.

00029 {}


Member Function Documentation

template<typename T>
int GraphNode< T >::GetID (  )  const [inline, protected]

Definition at line 75 of file TAPsGraphNode.hpp.

00075 { return m_iID; }

template<typename T>
bool GraphNode< T >::GetStatusMark (  )  const [inline, protected]

Definition at line 77 of file TAPsGraphNode.hpp.

00077 { return m_bMark; }

template<typename T>
T GraphNode< T >::GetValue (  )  const [inline]

Definition at line 82 of file TAPsGraphNode.hpp.

00082 { return m_tValue; }

template<typename T>
void GraphNode< T >::Mark (  )  [inline, protected]

Definition at line 79 of file TAPsGraphNode.hpp.

00079 { m_bMark = true; }

template<typename T>
void GraphNode< T >::SetID ( int  id  )  [inline, protected]

Definition at line 76 of file TAPsGraphNode.hpp.

00076 { m_iID = id; }

template<typename T>
void GraphNode< T >::SetStatusMark ( bool  b  )  [inline, protected]

Definition at line 78 of file TAPsGraphNode.hpp.

00078 { m_bMark = b; }

template<typename T>
void GraphNode< T >::SetValue ( v  )  [inline]

Definition at line 83 of file TAPsGraphNode.hpp.

00083 { m_tValue = v; }

template<typename T>
void GraphNode< T >::Unmark (  )  [inline, protected]

Definition at line 80 of file TAPsGraphNode.hpp.

00080 { m_bMark = false; }


Friends And Related Function Documentation

template<typename T>
friend class DirectedGraph< T > [friend]

Definition at line 26 of file TAPsGraphNode.hpp.

template<typename T>
std::ostream& operator<< ( std::ostream &  output,
GraphNode< T > const &  node 
) [friend]

Definition at line 52 of file TAPsGraphNode.hpp.

00053     {
00054         output  << "GraphNode<" << typeid(T).name() << "> ID:" << node.m_iID 
00055                 << " with value: " << node.m_tValue
00056                 << " and has a path to nodes:";
00057         
00058         for ( std::set< int >::const_iterator n = node.m_vNeighbors.begin();
00059                 n != node.m_vNeighbors.end(); ++n )
00060         {
00061             output << ' ' << *n;
00062         }
00063         output << "\n";
00064         return output;
00065     }


Member Data Documentation

template<typename T>
bool GraphNode< T >::m_bMark

Definition at line 32 of file TAPsGraphNode.hpp.

template<typename T>
int GraphNode< T >::m_iID

Definition at line 31 of file TAPsGraphNode.hpp.

template<typename T>
T GraphNode< T >::m_tValue

Definition at line 33 of file TAPsGraphNode.hpp.

template<typename T>
std::set< int > GraphNode< T >::m_vNeighbors

Definition at line 39 of file TAPsGraphNode.hpp.


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

Generated on Mon Oct 13 11:44:52 2008 for TAPs by  doxygen 1.5.6