GL Studio C++ Runtime API
AttributeFnCallback Class Reference

#include <gls_metadata_attributes.h>

Inheritance diagram for AttributeFnCallback:
AttributeObserver

Public Member Functions

 AttributeFnCallback (WeakReferenceable *object, std::function< void()> func)
 
void Call (DistiAttributeBase &ev) override
 
virtual bool IsValid () const override
 
virtual void Call (DistiAttributeBase &attr)=0
 
virtual bool IsValid () const =0
 

Protected Attributes

std::function< void()> _func
 The callback function pointer to call.
 
WeakRef< WeakReferenceable_object
 The object associated with this callback, callback will only be called if this object is valid.
 

Detailed Description

The AttributeFnCallback class. An implementation of the AttributeObserver interface.

Constructor & Destructor Documentation

◆ AttributeFnCallback()

AttributeFnCallback ( WeakReferenceable object,
std::function< void()>  func 
)
inline

Constructor

Note
Should not be called directly, call Connect().
Parameters
objectThe object associated with this callback.
funcThe callback function pointer to call.

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: