CPropertyAccessor Class

class CPropertyAccessor

A property accessor encapsulates storage and retrieval of a property. Property accessors define a GetValue and PutValue method that is used by a property container to store and retrieve a property value. The property container associates each accessor object with a property ID. This class implements GetValue and PutValue by storing two function pointers - one for getting the value and one for storing the value. The signature of the get and put functions must match one of the signatures recognized by this class. This class defines a series of embedded typedef's to define the get and put function signatures that can be used. There is a constructor for each accessor function type supported to make it easy to construct a property accessor.

Defined in: PropAccessor.h

Class Template Arguments

T

The class that the property accessor invokes the get and put methods on.

See Also

CPropertyContainer

Class Members

CPropertyAccessor()

Construct a property accessor object.

AccessorType m_type

Indicates the function signature of the get and put functions

union

Pointer to the get function

union

Pointer to the put function

void GetValue(const _SourceClass* pObj, VARIANT& propVal) const

Retrieve a property value.

void PutValue(_SourceClass* pObj, const VARIANT& propVal)

Store a property value.