Public Types | Public Member Functions | Private Member Functions | Private Attributes
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.
EdgeedgeInfo (unsigned id)
 Convenience function to get edge info.
const EdgeedgeInfo (unsigned id) const
 Convenience function to get edge info.
GraphVertex node (unsigned id) const
 Get the node descriptor for this id.
NodenodeInfo (unsigned id)
 Convenience function to get node info.
const NodenodeInfo (unsigned id) const
 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 ()
 Default constructor creates empty graph.
 TopologicalMap (const TopologicalMap &g)
 Copy constructor.

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

Default constructor creates empty graph.

Definition at line 81 of file topological_map.cpp.

Copy constructor.

Definition at line 85 of file topological_map.cpp.


Member Function Documentation

Add an edge.

Return values:
Descriptorfor the newly added edge
Exceptions:
DuplicateEdgeIdException
InvalidEdgeIdExceptionif info.id is 0
UnknownNodeIdException

Definition at line 164 of file topological_map.cpp.

Add a node.

Return values:
Descriptorfor the newly added node
Exceptions:
DuplicateNodeIdException
InvalidNodeIdExceptionif info.id is 0

Definition at line 155 of file topological_map.cpp.

Get the edge descriptor for this id.

Exceptions:
UnknownEdgeIdException

Definition at line 122 of file topological_map.cpp.

Convenience function to get edge info.

Exceptions:
UnknownEdgeIdException

Definition at line 135 of file topological_map.cpp.

Convenience function to get edge info.

Exceptions:
UnknownEdgeIdException

Definition at line 145 of file topological_map.cpp.

Get the node descriptor for this id.

Exceptions:
UnknownNodeIdException

Definition at line 114 of file topological_map.cpp.

Convenience function to get node info.

Exceptions:
UnknownNodeIdException

Definition at line 130 of file topological_map.cpp.

Convenience function to get node info.

Exceptions:
UnknownNodeIdException

Definition at line 140 of file topological_map.cpp.

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

Assignment operator.

Definition at line 91 of file topological_map.cpp.

Recompute the indices from the graph.

Definition at line 98 of file topological_map.cpp.

Remove an edge.

Todo:
Not implemented
Exceptions:
UnknownEdgeIdException

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:


topological_map_2d
Author(s): Bhaskara Marthi
autogenerated on Sun Jan 5 2014 11:39:24