openshot-audio
0.1.7
|
#include <juce_core.h>
Classes | |
class | Master |
class | SharedPointer |
Public Types | |
typedef ReferenceCountedObjectPtr< SharedPointer > | SharedRef |
Public Member Functions | |
WeakReference () noexcept | |
WeakReference (ObjectType *const object) | |
WeakReference (const WeakReference &other) noexcept | |
WeakReference & | operator= (const WeakReference &other) |
WeakReference & | operator= (ObjectType *const newObject) |
ObjectType * | get () const noexcept |
operator ObjectType * () const noexcept | |
ObjectType * | operator-> () noexcept |
const ObjectType * | operator-> () const noexcept |
bool | wasObjectDeleted () const noexcept |
bool | operator== (ObjectType *const object) const noexcept |
bool | operator!= (ObjectType *const object) const noexcept |
This class acts as a pointer which will automatically become null if the object to which it points is deleted.
To accomplish this, the source object needs to cooperate by performing a couple of simple tasks. It must embed a WeakReference::Master object, which stores a shared pointer object, and must clear this master pointer in its destructor.
E.g.
typedef ReferenceCountedObjectPtr<SharedPointer> juce::WeakReference< ObjectType, ReferenceCountingType >::SharedRef |
|
inlinenoexcept |
Creates a null SafePointer.
|
inline |
Creates a WeakReference that points at the given object.
|
inlinenoexcept |
Creates a copy of another WeakReference.
|
inlinenoexcept |
Returns the object that this pointer refers to, or null if the object no longer exists.
|
inlinenoexcept |
Returns the object that this pointer refers to, or null if the object no longer exists.
|
inlinenoexcept |
|
inlinenoexcept |
Returns the object that this pointer refers to, or null if the object no longer exists.
|
inlinenoexcept |
Returns the object that this pointer refers to, or null if the object no longer exists.
|
inline |
Copies another pointer to this one.
|
inline |
Copies another pointer to this one.
|
inlinenoexcept |
|
inlinenoexcept |
This returns true if this reference has been pointing at an object, but that object has since been deleted.
If this reference was only ever pointing at a null pointer, this will return false. Using operator=() to make this refer to a different object will reset this flag to match the status of the reference from which you're copying.