xorp

RIPVarRW< A > Class Template Reference

Enables reading and writing variables of RIP routes. More...

#include <rip_varrw.hh>

Inheritance diagram for RIPVarRW< A >:
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

 RIPVarRW (RouteEntry< A > &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 Member Functions

void read_route_nexthop (RouteEntry< A > &route)
bool write_nexthop (const Id &id, const Element &e)
 Specialized template method to write correct nexthop value based on address family of route.

Private Attributes

RouteEntry< A > & _route

Detailed Description

template<class A>
class RIPVarRW< A >

Enables reading and writing variables of RIP routes.


Constructor & Destructor Documentation

template<class A >
RIPVarRW< A >::RIPVarRW ( RouteEntry< A > &  route)
Parameters:
routeroute to read/write values from.

Member Function Documentation

template<class A>
void RIPVarRW< A >::read_route_nexthop ( RouteEntry< A > &  route) [private]
Parameters:
routeroute to read nexthop and network from.
template<class A >
Element * RIPVarRW< A >::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.

template<class A >
void RIPVarRW< A >::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.

template<class A>
bool RIPVarRW< A >::write_nexthop ( const Id &  id,
const Element e 
) [private]

Specialized template method to write correct nexthop value based on address family of route.

Parameters:
idvariable to write.
evalue of variable.
Returns:
true if write was performed, false otherwise.

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