| GL Studio C++ Runtime API

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

`#include <weak_referenceable_mixin.h>`

Inheritance diagram for WeakReferenceableMixin:

## Public Member Functions
void | AddWeakReference (WeakReference *weakRef) override
void | NotifyWeakReferenceDestroyed (WeakReference *ref) override
virtual void | AddWeakReference (WeakReference *weakRef)=0
virtual void | NotifyWeakReferenceDestroyed (WeakReference *weakReference)=0

## Protected Member Functions
| WeakReferenceableMixin ()
virtual | ~WeakReferenceableMixin ()

## Protected Attributes
DynamicArray< WeakReference * > * | _weakRefs

## Detailed Description

utility helper mixin class for simplifying implementing WeakReferenceable. Classes that want to implement WeakReferenceable can simply inherit this class

## Constructor & Destructor Documentation

## ◆ WeakReferenceableMixin()

WeakReferenceableMixin | ( |  | ) |
| inline protected

constructor

## ◆ ~WeakReferenceableMixin()

virtual ~WeakReferenceableMixin | ( |  | ) |
| inline protected virtual

destructor. Notifies all weak references that this object is being deleted

## Member Function Documentation

## ◆ AddWeakReference()

void AddWeakReference | ( | WeakReference * | weakRef | ) |
| inline override virtual

Add a weak reference to this object, that gets notified when this object is destroyed. Does not take ownership of weakRef.

Parameters

  weakRef | the weak reference to add.

Implements WeakReferenceable.

## ◆ NotifyWeakReferenceDestroyed()

void NotifyWeakReferenceDestroyed | ( | WeakReference * | weakReference | ) |
| inline override virtual

Notify this object that its weak reference is being destroyed.

Parameters

  weakReference | The weak reference to notify.

Implements WeakReferenceable.

## Member Data Documentation

## ◆ _weakRefs

DynamicArray<WeakReference*>* _weakRefs
| protected

pointer to array of weak refs. Allocated on the first call to GetWeakReference()

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

- weak_referenceable_mixin.h