|
nux-1.14.0
|
A read/write property that uses a functions to get and set the value. More...
#include <NuxCore/Property.h>
Public Types | |
| typedef VALUE_TYPE | ValueType |
|
typedef PropertyChangedSignal < VALUE_TYPE > | SignalBase |
|
typedef sigc::slot< bool, VALUE_TYPE const & > | SetterFunction |
| typedef sigc::slot< VALUE_TYPE > | GetterFunction |
Public Member Functions | |
| RWProperty (GetterFunction getter_function, SetterFunction setter_function) | |
| VALUE_TYPE | operator= (VALUE_TYPE const &value) |
| operator VALUE_TYPE () const | |
| VALUE_TYPE | operator() () const |
| VALUE_TYPE | operator() (VALUE_TYPE const &value) |
| VALUE_TYPE | Get () const |
| VALUE_TYPE | Set (VALUE_TYPE const &value) |
| void | SetGetterFunction (GetterFunction getter_function) |
| void | SetSetterFunction (SetterFunction setter_function) |
A read/write property that uses a functions to get and set the value.
The value type is not stored in the propery, but maintained by the setter and getter functions.
A changed signal is emitted if the setter function specifies that the value has changed.
The default setter does nothing and emits no signal, and the default getter returns a default constructed VALUE_TYPE. The default getter and setter should be overridden through either the constructor args or through the SetGetterFunction / SetSetterFunction.
Definition at line 152 of file Property.h.