class ConfigParam

A class for storing a configuration parameter. More...

 
LOGO
 Annotated List  Files  Globals  Hierarchy  Index  Top

Public Types

Public Methods


Detailed Description

This class can be used to store a configuration parameter. Such parameter has a current and a default value.

typedef XorpCallback1<void, T>::RefPtr UpdateCallback

UpdateCallback

explicit  ConfigParam (const T& value)

ConfigParam

Constructor of a parameter with an initial value.

Create a configurable parameter, and initialize its initial and current value.

Parameters:

valuethe initial and current value to initialize the parameter to.
 ConfigParam (const T& value, const UpdateCallback& update_cb)

ConfigParam

Constructor of a parameter with an initial value and a callback.

Create a configurable parameter, initialize it, and assign a callback method that will be invoked when the value changes.

Parameters:

valuethe initial and current value to initialize the parameter to.
update_cbthe callback method that will be invoked when the value changes.
 ~ConfigParam ()

~ConfigParam

[virtual]

Destructor

const T&  get ()

get

[const]

Get the current value of the parameter.

Returns: the current value of the parameter.

void  set (const T& value)

set

Set the current value of the parameter.

Parameters:

valuethe current value to set the parameter to.
ConfigParam&  operator= (const T& value)

operator=

Assignment operator

Parameters:

valuethe value to assign to the parameter.

Returns: the parameter with the new value assigned.

const T&  operator++ ()

operator++

Increment Operator (prefix).

The numerical value of this configuration parameter is incremented by one.

Returns: a reference to this configuration parameter after it was incremented by one.

T  operator++ (int)

operator++

Increment Operator (postfix).

The numerical value of this configuration parameter is incremented by one.

Returns: the value of this configuration parameter before it was incremented by one.

const T&  incr ()

incr

Increment Operator.

The numerical value of this configuration parameter is incremented by one.

Returns: a reference to this configuration parameter after it was incremented by one.

const T&  operator-- ()

operator--

Decrement Operator (prefix).

The numerical value of this configuration parameter is decremented by one.

Returns: a reference to this configuration parameter after it was decremented by one.

T  operator-- (int)

operator--

Decrement Operator (postfix).

The numerical value of this configuration parameter is decremented by one.

Returns: the value of this configuration parameter before it was decremented by one.

const T&  decr ()

decr

Decrement Operator.

The numerical value of this configuration parameter is decremented by one.

Returns: a reference to this configuration parameter after it was decremented by one.

const T&  get_initial_value ()

get_initial_value

[const]

Get the initial value of the parameter.

void  reset ()

reset

Reset the current value of the parameter to its initial value.


Generated by: bms on anglepoise.lon.incunabulum.net on Wed Jul 23 10:05:24 2008, using kdoc 2.0a54+XORP.