Main   Class Hierarchy   Classes   Compound List   Files   Compound Members   File Members   Pages  

PathFind::Graph< NODEINFO, EDGEINFO > Class Template Reference

#include <graph.h>

List of all members.


Detailed Description

template<class NODEINFO, class EDGEINFO>
class PathFind::Graph< NODEINFO, EDGEINFO >

Graph with generic data attached to nodes and edges.

Definition at line 24 of file graph.h.

Public Member Functions

void addNode (int nodeId, const NODEINFO &info)
void addOutEdge (int sourceNodeId, int targetNodeId, const EDGEINFO &info)
void removeNodeEdges (int nodeId)
void removeLastNode ()
void removeOutEdge (int sourceNodeId, int targetNodeId)
void clear ()
const NodegetNode (int nodeId) const
NODEINFO & getNodeInfo (int nodeId)
const NODEINFO & getNodeInfo (int nodeId) const
const vector< Edge > & getOutEdges (int nodeId) const

Private Member Functions

NodegetNode (int nodeId)
bool isValidNodeId (int nodeId) const

Private Attributes

vector< Nodem_nodes


Member Function Documentation

template<class NODEINFO, class EDGEINFO>
void PathFind::Graph< NODEINFO, EDGEINFO >::addNode int  nodeId,
const NODEINFO &  info
 

Definition at line 182 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::m_nodes.

template<class NODEINFO, class EDGEINFO>
void PathFind::Graph< NODEINFO, EDGEINFO >::addOutEdge int  sourceNodeId,
int  targetNodeId,
const EDGEINFO &  info
 

Definition at line 204 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::isValidNodeId(), and PathFind::Graph< NODEINFO, EDGEINFO >::m_nodes.

template<class NODEINFO, class EDGEINFO>
void PathFind::Graph< NODEINFO, EDGEINFO >::clear  )  [inline]
 

Definition at line 121 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::m_nodes.

template<class NODEINFO, class EDGEINFO>
Node& PathFind::Graph< NODEINFO, EDGEINFO >::getNode int  nodeId  )  [inline, private]
 

Definition at line 151 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::isValidNodeId().

template<class NODEINFO, class EDGEINFO>
const Node& PathFind::Graph< NODEINFO, EDGEINFO >::getNode int  nodeId  )  const [inline]
 

Definition at line 126 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::isValidNodeId(), and PathFind::Graph< NODEINFO, EDGEINFO >::m_nodes.

Referenced by PathFind::Graph< NODEINFO, EDGEINFO >::getNodeInfo().

template<class NODEINFO, class EDGEINFO>
const NODEINFO& PathFind::Graph< NODEINFO, EDGEINFO >::getNodeInfo int  nodeId  )  const [inline]
 

Definition at line 137 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::Node::getInfo(), and PathFind::Graph< NODEINFO, EDGEINFO >::getNode().

template<class NODEINFO, class EDGEINFO>
NODEINFO& PathFind::Graph< NODEINFO, EDGEINFO >::getNodeInfo int  nodeId  )  [inline]
 

Definition at line 132 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::Node::getInfo(), and PathFind::Graph< NODEINFO, EDGEINFO >::getNode().

template<class NODEINFO, class EDGEINFO>
const vector<Edge>& PathFind::Graph< NODEINFO, EDGEINFO >::getOutEdges int  nodeId  )  const [inline]
 

Definition at line 142 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::isValidNodeId(), and PathFind::Graph< NODEINFO, EDGEINFO >::m_nodes.

template<class NODEINFO, class EDGEINFO>
bool PathFind::Graph< NODEINFO, EDGEINFO >::isValidNodeId int  nodeId  )  const [private]
 

Definition at line 214 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::m_nodes.

Referenced by PathFind::Graph< NODEINFO, EDGEINFO >::addOutEdge(), PathFind::Graph< NODEINFO, EDGEINFO >::getNode(), and PathFind::Graph< NODEINFO, EDGEINFO >::getOutEdges().

template<class NODEINFO, class EDGEINFO>
void PathFind::Graph< NODEINFO, EDGEINFO >::removeLastNode  )  [inline]
 

Definition at line 114 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::m_nodes.

template<class NODEINFO, class EDGEINFO>
void PathFind::Graph< NODEINFO, EDGEINFO >::removeNodeEdges int  nodeId  ) 
 

Definition at line 192 of file graph.h.

References PathFind::Graph< NODEINFO, EDGEINFO >::m_nodes.

template<class NODEINFO, class EDGEINFO>
void PathFind::Graph< NODEINFO, EDGEINFO >::removeOutEdge int  sourceNodeId,
int  targetNodeId
 


Member Data Documentation

template<class NODEINFO, class EDGEINFO>
vector<Node> PathFind::Graph< NODEINFO, EDGEINFO >::m_nodes [private]
 

Definition at line 149 of file graph.h.

Referenced by PathFind::Graph< NODEINFO, EDGEINFO >::addNode(), PathFind::Graph< NODEINFO, EDGEINFO >::addOutEdge(), PathFind::Graph< NODEINFO, EDGEINFO >::clear(), PathFind::Graph< NODEINFO, EDGEINFO >::getNode(), PathFind::Graph< NODEINFO, EDGEINFO >::getOutEdges(), PathFind::Graph< NODEINFO, EDGEINFO >::isValidNodeId(), PathFind::Graph< NODEINFO, EDGEINFO >::removeLastNode(), and PathFind::Graph< NODEINFO, EDGEINFO >::removeNodeEdges().


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


Generated on Thu Aug 7 13:05:23 2003 by Doxygen1.3.1