openshot-audio
0.1.6
|
#include <juce_Component.h>
Public Member Functions | |
SafePointer () noexcept | |
SafePointer (ComponentType *component) | |
SafePointer (const SafePointer &other) noexcept | |
SafePointer & | operator= (const SafePointer &other) |
SafePointer & | operator= (ComponentType *newComponent) |
ComponentType * | getComponent () const noexcept |
operator ComponentType * () const noexcept | |
ComponentType * | operator-> () noexcept |
const ComponentType * | operator-> () const noexcept |
void | deleteAndZero () |
bool | operator== (ComponentType *component) const noexcept |
bool | operator!= (ComponentType *component) const noexcept |
Holds a pointer to some type of Component, which automatically becomes null if the component is deleted.
If you're using a component which may be deleted by another event that's outside of your control, use a SafePointer instead of a normal pointer to refer to it, and you can test whether it's null before using it to see if something has deleted it.
The ComponentType typedef must be Component, or some subclass of Component.
You may also want to use a WeakReference<Component> object for the same purpose.
|
inlinenoexcept |
Creates a null SafePointer.
|
inline |
Creates a SafePointer that points at the given component.
|
inlinenoexcept |
Creates a copy of another SafePointer.
|
inline |
If the component is valid, this deletes it and sets this pointer to null.
|
inlinenoexcept |
Returns the component that this pointer refers to, or null if the component no longer exists.
|
inlinenoexcept |
Returns the component that this pointer refers to, or null if the component no longer exists.
|
inlinenoexcept |
|
inlinenoexcept |
Returns the component that this pointer refers to, or null if the component no longer exists.
|
inlinenoexcept |
Returns the component that this pointer refers to, or null if the component no longer exists.
|
inline |
Copies another pointer to this one.
|
inline |
Copies another pointer to this one.
|
inlinenoexcept |