MPQC  3.0.0-alpha
sc::property< ClassType, MemberType > Class Template Reference

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)
 
selfoperator= (self &)=delete
 
selfoperator= (const self &)=delete
 
selfoperator= (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)
 

Detailed Description

template<typename ClassType, typename MemberType>
class sc::property< ClassType, MemberType >

Helper class to connect a 'property' in a c++ class to getter/setter methods.

Template Parameters
ClassTypeThe type of the class in which the property is found.
MemberTypeThe type of the property value.

Member Function Documentation

◆ operator=()

template<typename ClassType , typename MemberType >
self& sc::property< ClassType, MemberType >::operator= ( const MemberType &  value)
inline

assignment operator.

Provides setter parent.field = value functionality


The documentation for this class was generated from the following file:

Generated at Sun Jan 26 2020 23:24:09 for MPQC 3.0.0-alpha using the documentation package Doxygen 1.8.16.