|
xorp
|
A class for storing a configuration parameter. More...
#include <config_param.hh>
Public Types | |
|
typedef XorpCallback1< void, T > ::RefPtr | UpdateCallback |
Public Member Functions | |
| ConfigParam (const T &value) | |
| Constructor of a parameter with an initial value. | |
| ConfigParam (const T &value, const UpdateCallback &update_cb) | |
| Constructor of a parameter with an initial value and a callback. | |
| virtual | ~ConfigParam () |
| Destructor. | |
| const T & | get () const |
| Get the current value of the parameter. | |
| void | set (const T &value) |
| Set the current value of the parameter. | |
| ConfigParam & | operator= (const T &value) |
| Assignment operator. | |
| const T & | operator++ () |
| Increment Operator (prefix). | |
| T | operator++ (int) |
| Increment Operator (postfix). | |
| const T & | incr () |
| Increment Operator. | |
| const T & | operator-- () |
| Decrement Operator (prefix). | |
| T | operator-- (int) |
| Decrement Operator (postfix). | |
| const T & | decr () |
| Decrement Operator. | |
| const T & | get_initial_value () const |
| Get the initial value of the parameter. | |
| void | reset () |
| Reset the current value of the parameter to its initial value. | |
Private Attributes | |
| T | _value |
| T | _initial_value |
| UpdateCallback | _update_cb |
A class for storing a configuration parameter.
This class can be used to store a configuration parameter. Such parameter has a current and a default value.
| ConfigParam< T >::ConfigParam | ( | const T & | value | ) | [inline, explicit] |
| ConfigParam< T >::ConfigParam | ( | const T & | value, |
| const UpdateCallback & | update_cb | ||
| ) | [inline] |
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.
| const T& ConfigParam< T >::decr | ( | ) | [inline] |
Decrement Operator.
The numerical value of this configuration parameter is decremented by one.
| const T& ConfigParam< T >::get | ( | ) | const [inline] |
| const T& ConfigParam< T >::incr | ( | ) | [inline] |
Increment Operator.
The numerical value of this configuration parameter is incremented by one.
| const T& ConfigParam< T >::operator++ | ( | ) | [inline] |
Increment Operator (prefix).
The numerical value of this configuration parameter is incremented by one.
| T ConfigParam< T >::operator++ | ( | int | ) | [inline] |
Increment Operator (postfix).
The numerical value of this configuration parameter is incremented by one.
| T ConfigParam< T >::operator-- | ( | int | ) | [inline] |
Decrement Operator (postfix).
The numerical value of this configuration parameter is decremented by one.
| const T& ConfigParam< T >::operator-- | ( | ) | [inline] |
Decrement Operator (prefix).
The numerical value of this configuration parameter is decremented by one.
| ConfigParam& ConfigParam< T >::operator= | ( | const T & | value | ) | [inline] |
| void ConfigParam< T >::set | ( | const T & | value | ) | [inline] |