GL Studio C++ Runtime API
AttributeResourceCallback< T > Class Template Reference

#include <disti_metadata.h>

Inheritance diagram for AttributeResourceCallback< T >:
AttributeObserver

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
objectThe object containing the attribute.
attributeNameThe attribute to set.

Member Function Documentation

◆ Call()

void Call ( DistiAttributeBase attr)
inlineoverridevirtual

Call the callback with the provided display event.

Parameters
attrThe attribute associated with this callback.

Implements AttributeObserver.

◆ IsValid()

virtual bool IsValid ( ) const
inlineoverridevirtual

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: