BindReadOnlyProperty function (dbgmodel.h)

A binder which converts an instance methods on a class to a read only property accessor. The class must be IUnknown derived. The returned binder will hold reference on the class object.

Usage: BindReadOnlyProperty(this, &MyClass::GetMyProperty, &MyClass::SetMyProperty)

Syntax

Microsoft::WRL::ComPtr<IModelPropertyAccessor> BindReadOnlyProperty(
  T                                                                           *classObject,
  HRESULT(T::* )(PCWSTR key,IModelObject *contextObject,IModelObject **value) getMethod
);

Parameters

classObject

The instance of a given class to which the newly created read-only property accessor will be bound.

getMethod

A pointer-to-member function pointer of signature (PCWSTR, IModelObject *, IModelObject**) which will act as the getter for the newly created read-only property accessor.

Return value

This function returns Microsoft::WRL::ComPtr<IModelPropertyAccessor>.

Requirements

Requirement Value
Header dbgmodel.h