topological_map_2d::TopologicalMap Class Reference

#include <topological_map.h>

List of all members.

Public Types

typedef msg::TopologicalMapEdge Edge
typedef msg::TopologicalMapNode Node

Public Member Functions

GraphEdge addEdge (const Edge &info)
 Add an edge.
GraphVertex addNode (const Node &info)
 Add a node.
GraphEdge edge (unsigned id) const
 Get the edge descriptor for this id.
const EdgeedgeInfo (unsigned id) const
 Convenience function to get edge info.
EdgeedgeInfo (unsigned id)
 Convenience function to get edge info.
GraphVertex node (unsigned id) const
 Get the node descriptor for this id.
const NodenodeInfo (unsigned id) const
 Convenience function to get node info.
NodenodeInfo (unsigned id)
 Convenience function to get node info.
TopologicalMapoperator= (const TopologicalMap &g)
 Assignment operator.
void removeEdge (unsigned id)
 Remove an edge.
void removeNode (unsigned id)
 Remove a node.
 TopologicalMap (const TopologicalMap &g)
 Copy constructor.
 TopologicalMap ()
 Default constructor creates empty graph.

Private Member Functions

void recomputeIndices ()
 Recompute the indices from the graph.

Private Attributes

std::map< unsigned, GraphEdgeedge_map_
std::map< unsigned, GraphVertexvertex_map_

Detailed Description

Basically a boost adjacency_list, together with additional indexes that map from unsigned integers to boost node and edge descriptors (which are void pointers, and therefore can't be used when serializing the message). Adding and removing nodes and edges should be done with the member functions below so the indexes are updated appropriately. For everything else, use the boost adjacency_list ops, though some of them are wrapped for convenience, such as node/edgeInfo.

Definition at line 70 of file topological_map.h.


Member Typedef Documentation

typedef msg::TopologicalMapEdge topological_map_2d::TopologicalMap::Edge

Definition at line 75 of file topological_map.h.

typedef msg::TopologicalMapNode topological_map_2d::TopologicalMap::Node

Definition at line 74 of file topological_map.h.


Constructor & Destructor Documentation

topological_map_2d::TopologicalMap::TopologicalMap (  ) 

Default constructor creates empty graph.

Definition at line 77 of file topological_map.cpp.

topological_map_2d::TopologicalMap::TopologicalMap ( const TopologicalMap g  ) 

Copy constructor.

Definition at line 81 of file topological_map.cpp.


Member Function Documentation

GraphEdge topological_map_2d::TopologicalMap::addEdge ( const Edge info  ) 

Add an edge.

Return values:
Descriptor for the newly added edge
Exceptions:
DuplicateEdgeIdException 
InvalidEdgeIdException if info.id is 0
UnknownNodeIdException 

Definition at line 160 of file topological_map.cpp.

GraphVertex topological_map_2d::TopologicalMap::addNode ( const Node info  ) 

Add a node.

Return values:
Descriptor for the newly added node
Exceptions:
DuplicateNodeIdException 
InvalidNodeIdException if info.id is 0

Definition at line 151 of file topological_map.cpp.

GraphEdge topological_map_2d::TopologicalMap::edge ( unsigned  id  )  const

Get the edge descriptor for this id.

Exceptions:
UnknownEdgeIdException 

Definition at line 118 of file topological_map.cpp.

const TopologicalMap::Edge & topological_map_2d::TopologicalMap::edgeInfo ( unsigned  id  )  const

Convenience function to get edge info.

Exceptions:
UnknownEdgeIdException 

Definition at line 141 of file topological_map.cpp.

TopologicalMap::Edge & topological_map_2d::TopologicalMap::edgeInfo ( unsigned  id  ) 

Convenience function to get edge info.

Exceptions:
UnknownEdgeIdException 

Definition at line 131 of file topological_map.cpp.

GraphVertex topological_map_2d::TopologicalMap::node ( unsigned  id  )  const

Get the node descriptor for this id.

Exceptions:
UnknownNodeIdException 

Definition at line 110 of file topological_map.cpp.

const TopologicalMap::Node & topological_map_2d::TopologicalMap::nodeInfo ( unsigned  id  )  const

Convenience function to get node info.

Exceptions:
UnknownNodeIdException 

Definition at line 136 of file topological_map.cpp.

TopologicalMap::Node & topological_map_2d::TopologicalMap::nodeInfo ( unsigned  id  ) 

Convenience function to get node info.

Exceptions:
UnknownNodeIdException 

Definition at line 126 of file topological_map.cpp.

TopologicalMap & topological_map_2d::TopologicalMap::operator= ( const TopologicalMap g  ) 

Assignment operator.

Definition at line 87 of file topological_map.cpp.

void topological_map_2d::TopologicalMap::recomputeIndices (  )  [private]

Recompute the indices from the graph.

Definition at line 94 of file topological_map.cpp.

void topological_map_2d::TopologicalMap::removeEdge ( unsigned  id  ) 

Remove an edge.

Todo:
Not implemented
Exceptions:
UnknownEdgeIdException 
void topological_map_2d::TopologicalMap::removeNode ( unsigned  id  ) 

Remove a node.

Todo:
Not implemented
Exceptions:
UnknownNodeIdException 

Member Data Documentation

Definition at line 139 of file topological_map.h.

Definition at line 138 of file topological_map.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Defines


topological_map_2d
Author(s): Bhaskara Marthi
autogenerated on Fri Jan 11 09:14:28 2013