xorp

TestVarRW Class Reference

Inheritance diagram for TestVarRW:
VarRW

List of all members.

Public Member Functions

const Elementread (const Id &id)
 Read a variable from a route [such as nexthop].
void write (const Id &id, const Element &elem)
 Write a variable to a route.

Private Types

typedef map< Id, const Element * > ELEM

Private Attributes

ELEM _elem

Member Function Documentation

const Element & TestVarRW::read ( const Id &  id) [virtual]

Read a variable from a route [such as nexthop].

If the protocol doesn't support the requested variable, and exception should be thrown.

If the variable is not present in the current route, then an ElemNull should be returned [for example if ipv6 is requested on a v4 route].

VarRW is responsible for deleting the object read [it owns it]. However care must be taken not to delete objects that were obtained by write() even though we pass them to read() later.

Returns:
Element requested, or ElemNull of element is not available.
Parameters:
idThe variable that is being requested [such as metric].

Implements VarRW.

void TestVarRW::write ( const Id &  id,
const Element e 
) [virtual]

Write a variable to a route.

VarRW does not own Element, so it must not delete it.

Parameters:
idIdentifier of variable that must be written to.
eValue that must be written to the variable.

Implements VarRW.


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