| GL Studio C++ Runtime API

Public Types | Public Member Functions | Protected Attributes | List of all members
AttributeMethodCallback< T > Class Template Reference

`#include <disti_metadata.h>`

Inheritance diagram for AttributeMethodCallback< T >:

## Public Types
typedef void(T::* | Callback) (DistiAttributeBase &attr)
| Typedef for the callback function pointer.

## Public Member Functions
| AttributeMethodCallback (T *object, Callback method)
void | Call (DistiAttributeBase &ev) override
virtual bool | IsValid () const override
virtual void | Call (DistiAttributeBase &attr)=0
virtual bool | IsValid () const =0

## Protected Attributes
Callback | _method
| Method to call back when invoked.
WeakRef< T > | _object
| The underlying object containing the callback method.

## Detailed Description

template<class T>
class disti::AttributeMethodCallback< T >

Template for an AttributeCallbackBase that will call a class method whenever the attribute changes. The class must implement WeakReferenceable. Don't use this directly, use CreateAttributeMethodCallback instead.

## Constructor & Destructor Documentation

## ◆ AttributeMethodCallback()

AttributeMethodCallback | ( | T * | object,
|  | Callback | method
| ) |  |
| inline

Construct a new AttributeMethodCallback object to link the callback and the class containing it.

Parameters

  object | The object containing the callback method.
  method | The method to call back.

## Member Function Documentation

## ◆ Call()

void Call | ( | DistiAttributeBase & | attr | ) |
| inline override virtual

Call the callback with the provided display event.

Parameters

  attr | The attribute associated with this callback.

Implements AttributeObserver.

## ◆ IsValid()

virtual bool IsValid | ( |  | ) | const
| inline override virtual

When IsValid is false, then this AttributeObserver can be deleted.

Returns
  Whether or not this observer is attached to a valid attribute.

Implements AttributeObserver.

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

- disti_metadata.h