| GL Studio C++ Runtime API

Public Member Functions | Protected Attributes | List of all members
AttributeFnCallback Class Reference

`#include <gls_metadata_attributes.h>`

Inheritance diagram for AttributeFnCallback:

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

  object | The object associated with this callback.
  func | The callback function pointer to call.

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

- gls_metadata_attributes.h