| GL Studio C++ Runtime API

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

`#include <disti_metadata.h>`

Inheritance diagram for AttributeResourceCallback< T >:

## Public Member Functions
| AttributeResourceCallback (T *object, const AttributeName &attributeName)
void | Call (DistiAttributeBase &attr) override
virtual bool | IsValid () const override
virtual void | Call (DistiAttributeBase &attr)=0
virtual bool | IsValid () const =0

## Protected Attributes
AttributeName | _attributeName
| The attribute to set when invoked.
WeakRef< T > | _object
| The object containing the attribute.

## Detailed Description

template<class T>
class disti::AttributeResourceCallback< T >

Template for an AttributeCallbackBase that will set another object's attribute whenever the attribute changes. The class must implement WeakReferenceable. Don't use this directly, use CreateAttributeResourceCallback instead.

## Constructor & Destructor Documentation

## ◆ AttributeResourceCallback()

AttributeResourceCallback | ( | T * | object,
|  | const AttributeName & | attributeName
| ) |  |
| inline

Construct a new AttributeResourceCallback object to link an attribute to an attribute of another object.

Parameters

  object | The object containing the attribute.
  attributeName | The attribute to set.

## 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