class ConfigParam

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

Definition#include <config_param.hh>
Template formConfigParam<class T>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

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

inline const T&  get ()

get

[const]

Get the current value of the parameter.

Returns: the current value of the parameter.

inline void  set (const T& value)

set

Set the current value of the parameter.

Parameters:
valuethe current value to set the parameter to.

inline 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

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

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

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

inline const T&  get_initial_value ()

get_initial_value

[const]

Get the initial value of the parameter.

inline void  reset ()

reset

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


Generated by: pavlin on possum.icir.org on Thu Aug 28 12:51:57 2003, using kdoc 2.0a54+XORP.