#include <juce_Animator.h>

Public Member Functions | |
| Weak ()=default | |
| Constructor used by the Animator implementation. | |
| Weak (std::shared_ptr< Impl > p) | |
| Constructor used by the Animator implementation. | |
| void * | getKey () const |
| std::optional< Animator > | lock () const |
| If the referenced Animator implementation object still exists it returns an Animator object storing a strong reference to it. | |
Private Attributes | |
| Impl * | originalPtr {} |
| std::weak_ptr< Impl > | ptr |
Stores a weak reference to the Animator's underlying implementation. Animator objects store a strong reference to the implementation, so it won't be deleted as long as an Animator object references it. Instead of copying the Animator, you can use makeWeak() to create a weak reference, which will not prevent deletion of the underlying implementation, but allows you to create a strong reference using the lock function for as long as the underlying object is alive.
This class is used by the AnimatorUpdater, and it's unlikely you will need to use it directly.
|
default |
Constructor used by the Animator implementation.
To obtain a weak reference use Animator::makeWeak().
|
inlineexplicit |
Constructor used by the Animator implementation.
To obtain a weak reference use Animator::makeWeak().
|
inline |
Used internally for storing the reference in a std::map.
|
inline |
|
private |
|
private |