xorp

StaticRoutesVarRW Class Reference

Allows variables to be written and read from static routes. More...

#include <static_routes_varrw.hh>

Inheritance diagram for StaticRoutesVarRW:
SingleVarRW NONCOPYABLE VarRW

List of all members.

Public Types

enum  {
  VAR_NETWORK4 = VAR_PROTOCOL, VAR_NEXTHOP4, VAR_NETWORK6, VAR_NEXTHOP6,
  VAR_METRIC
}

Public Member Functions

 StaticRoutesVarRW (StaticRoute &route)
void start_read ()
 If any reads are performed, this is a marker which informs the derived class that reads will now start.
Elementsingle_read (const Id &id)
 Read of a variable.
void single_write (const Id &id, const Element &e)
 Write of a variable.

Private Attributes

StaticRoute_route
ElementFactory _ef
bool _is_ipv4
bool _is_ipv6

Detailed Description

Allows variables to be written and read from static routes.


Constructor & Destructor Documentation

StaticRoutesVarRW::StaticRoutesVarRW ( StaticRoute route)
Parameters:
routeroute to read/write values from.

Member Function Documentation

Element * StaticRoutesVarRW::single_read ( const Id &  id) [virtual]

Read of a variable.

The VarRW needs to read a particular element. This may return NULL indicating ElemNull---i.e. variable not present in THIS route.

Returns:
variable requested.
Parameters:
idthe id of the variable.

Implements SingleVarRW.

void StaticRoutesVarRW::single_write ( const Id &  id,
const Element e 
) [virtual]

Write of a variable.

The write MUST be performed now, as the element pointer may become invalid after this call. Also, a single write will be called for each modified element.

Parameters:
ididentifier of variable to be written to.
evalue of variable.

Implements SingleVarRW.


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