diff options
author | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-14 13:54:39 +0100 |
---|---|---|
committer | Emiel Bruijntjes <emiel.bruijntjes@copernica.com> | 2014-03-14 13:54:39 +0100 |
commit | a525d95b26fa6e4afdca803a8f77579cd26cedc6 (patch) | |
tree | d0bbaecbaa4f477ea7f5b7f30c05d0dc63229d8a /include/class.h | |
parent | 1f1a0fa9349d37e623ae763b48c7ea21681cd45b (diff) |
added extra property methods to allow both const and non-const setters and getters, updated documentation
Diffstat (limited to 'include/class.h')
-rw-r--r-- | include/class.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/class.h b/include/class.h index d867699..23c39e1 100644 --- a/include/class.h +++ b/include/class.h @@ -170,12 +170,12 @@ public: * @param getter The getter method * @param setter The setter method */ - void property(const char *name, Value (T::*getter)() ) { ClassBase::property(name, static_cast<getter_callback>(getter), nullptr); } - void property(const char *name, Value (T::*getter)() const ) { ClassBase::property(name, static_cast<getter_callback>(getter), nullptr); } - void property(const char *name, Value (T::*getter)() , void (T::*setter)(const Value &value) ) { ClassBase::property(name, static_cast<getter_callback>(getter), static_cast<setter_callback>(setter)); } - void property(const char *name, Value (T::*getter)() const, void (T::*setter)(const Value &value) ) { ClassBase::property(name, static_cast<getter_callback>(getter), static_cast<setter_callback>(setter)); } - void property(const char *name, Value (T::*getter)() , void (T::*setter)(const Value &value) const) { ClassBase::property(name, static_cast<getter_callback>(getter), static_cast<setter_callback>(setter)); } - void property(const char *name, Value (T::*getter)() const, void (T::*setter)(const Value &value) const) { ClassBase::property(name, static_cast<getter_callback>(getter), static_cast<setter_callback>(setter)); } + void property(const char *name, Value (T::*getter)() ) { ClassBase::property(name, static_cast<getter_callback_0>(getter)); } + void property(const char *name, Value (T::*getter)() const ) { ClassBase::property(name, static_cast<getter_callback_1>(getter)); } + void property(const char *name, Value (T::*getter)() , void (T::*setter)(const Value &value) ) { ClassBase::property(name, static_cast<getter_callback_0>(getter), static_cast<setter_callback_0>(setter)); } + void property(const char *name, Value (T::*getter)() const, void (T::*setter)(const Value &value) ) { ClassBase::property(name, static_cast<getter_callback_1>(getter), static_cast<setter_callback_0>(setter)); } + void property(const char *name, Value (T::*getter)() , void (T::*setter)(const Value &value) const) { ClassBase::property(name, static_cast<getter_callback_0>(getter), static_cast<setter_callback_1>(setter)); } + void property(const char *name, Value (T::*getter)() const, void (T::*setter)(const Value &value) const) { ClassBase::property(name, static_cast<getter_callback_1>(getter), static_cast<setter_callback_1>(setter)); } private: /** |