A value managed through static functions. More...
#include <props.hxx>
Public Types | |
typedef T(* | getter_t )() |
The template type of a static getter function. | |
typedef void(* | setter_t )(T) |
The template type of a static setter function. | |
Public Member Functions | |
SGRawValueFunctions (getter_t getter=0, setter_t setter=0) | |
Explicit constructor. | |
virtual | ~SGRawValueFunctions () |
Destructor. | |
virtual T | getValue () const |
Get the underlying value. | |
virtual bool | setValue (T value) |
Set the underlying value. | |
virtual SGRaw * | clone () const |
Create a copy of this raw value, bound to the same functions. |
A value managed through static functions.
A read-only value will not have a setter; a write-only value will not have a getter.
Definition at line 453 of file props.hxx.
SGRawValueFunctions< T >::SGRawValueFunctions | ( | getter_t | getter = 0 , |
|
setter_t | setter = 0 | |||
) | [inline] |
virtual T SGRawValueFunctions< T >::getValue | ( | ) | const [inline, virtual] |
Get the underlying value.
This method will invoke the getter function to get a value. If no getter function was supplied, this method will always return the default value for the type.
Implements SGRawValue< T >.
virtual bool SGRawValueFunctions< T >::setValue | ( | T | value | ) | [inline, virtual] |
Set the underlying value.
This method will invoke the setter function to change the underlying value. If no setter function was supplied, this method will return false.
Implements SGRawValue< T >.