MPQC
3.0.0-alpha
|
Helper class to connect a 'property' in a c++ class to getter/setter methods. More...
#include <util/misc/property.h>
Public Types | |
typedef property< ClassType, MemberType > | self |
typedef MemberType(ClassType::* | getter_type) () const |
typedef void(ClassType::* | setter_type) (const MemberType &) |
Public Member Functions | |
property (ClassType *aTarget, getter_type aGetter=NULL, setter_type aSetter=NULL) | |
ctor NOTE: Avoid using leading underscores, technically, the C++ standard forbids them. | |
property (self &&other) | |
self & | operator= (self &)=delete |
self & | operator= (const self &)=delete |
self & | operator= (const MemberType &value) |
assignment operator. More... | |
operator MemberType () const | |
conversion operator, provides 'getter' | |
void | set_target (ClassType *a) |
void | set_getter (getter_type g) |
void | set_setter (setter_type s) |
void | set_target_getter_setter (ClassType *a, getter_type g, setter_type s=NULL) |
Helper class to connect a 'property' in a c++ class to getter/setter methods.
ClassType | The type of the class in which the property is found. |
MemberType | The type of the property value. |
|
inline |
assignment operator.
Provides setter parent.field = value functionality