Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

sim::Routedb Class Reference

Implementation of a simple route database maintained at every node The basic organization of this database is as follows. More...

#include <routedb.h>

List of all members.

Public Member Functions

void addRoute (u_int dest, u_int size, int *rt)
 Add a route to the route data-base.

int * getRoute (u_int dest)
 Get the route for the specified destination.

u_int getRouteLength (u_int dest)
 Get the route length for the obtained route to the destination.

 Routedb (u_int src)
 Construct a new Routedb object.

 Routedb ()
 Construct a new Routedb object.

void setSrc (u_int src)
 Set the source node.


Protected Attributes

RouteMap _rm
 Route map.

u_int _src
 Source node.


Detailed Description

Implementation of a simple route database maintained at every node The basic organization of this database is as follows.

      [dest, route-size, route]
  

Author:
Rama Shenai
Version:
1.0 05/20/2004


Constructor & Destructor Documentation

sim::Routedb::Routedb  )  [inline]
 

Construct a new Routedb object.

Note in this case the src value is unitialized. Use the function setSrc to initialize the node for which this object is intended for.

sim::Routedb::Routedb u_int  src  ) 
 

Construct a new Routedb object.

Parameters:
src The source node


Member Function Documentation

void sim::Routedb::setSrc u_int  src  )  [inline]
 

Set the source node.

Parameters:
src The source node

void sim::Routedb::addRoute u_int  dest,
u_int  size,
int *  rt
 

Add a route to the route data-base.

Parameters:
dest Destination
size Size of the route (hopcount + 1)
rt Route

int* sim::Routedb::getRoute u_int  dest  ) 
 

Get the route for the specified destination.

Parameters:
dest The destination node
Returns:
The route (or NULL in case of error).

u_int sim::Routedb::getRouteLength u_int  dest  ) 
 

Get the route length for the obtained route to the destination.

Parameters:
dest The destination node for the route
Returns:
The route length.


Member Data Documentation

RouteMap sim::Routedb::_rm [protected]
 

Route map.

u_int sim::Routedb::_src [protected]
 

Source node.


The documentation for this class was generated from the following file:
Generated on Fri May 21 15:23:22 2004 for Optical Network Simulation (Build) by doxygen 1.3.7