|
JUCE-7.0.12-0-g4f43011b96 JUCE-7.0.12-0-g4f43011b96
JUCE — C++ application framework with suport for VST, VST3, LV2 audio plug-ins
« « « Anklang Documentation |
Used by the JUCE_DECLARE_SINGLETON macros to manage a static pointer to a singleton instance. More...
#include "juce_Singleton.h"
Public Member Functions | |
| Type * | get () |
| Returns the current instance, or creates a new instance if there isn't one. | |
| Type * | getWithoutChecking () |
| Returns the current instance, or creates a new instance if there isn't one, but doesn't do any locking, or checking for recursion or error conditions. | |
| void | deleteInstance () |
| Deletes and resets the current instance, if there is one. | |
| void | clear (Type *expectedObject) noexcept |
| Called by the class's destructor to clear the pointer if it is currently set to the given object. | |
Public Attributes | |
| std::atomic< Type * > | instance |
Used by the JUCE_DECLARE_SINGLETON macros to manage a static pointer to a singleton instance.
You generally won't use this directly, but see the macros JUCE_DECLARE_SINGLETON, JUCE_DECLARE_SINGLETON_SINGLETHREADED, JUCE_DECLARE_SINGLETON_SINGLETHREADED_MINIMAL, and JUCE_IMPLEMENT_SINGLETON for how it is intended to be used.
@tags{Core}
Definition at line 38 of file juce_Singleton.h.
| juce::SingletonHolder< Type, MutexType, onlyCreateOncePerRun >::~SingletonHolder | ( | ) |
Definition at line 42 of file juce_Singleton.h.
|
noexcept |
Called by the class's destructor to clear the pointer if it is currently set to the given object.
Definition at line 116 of file juce_Singleton.h.
| void juce::SingletonHolder< Type, MutexType, onlyCreateOncePerRun >::deleteInstance | ( | ) |
Deletes and resets the current instance, if there is one.
Definition at line 109 of file juce_Singleton.h.
| Type * juce::SingletonHolder< Type, MutexType, onlyCreateOncePerRun >::get | ( | ) |
Returns the current instance, or creates a new instance if there isn't one.
Definition at line 54 of file juce_Singleton.h.
| Type * juce::SingletonHolder< Type, MutexType, onlyCreateOncePerRun >::getWithoutChecking | ( | ) |
Returns the current instance, or creates a new instance if there isn't one, but doesn't do any locking, or checking for recursion or error conditions.
Definition at line 98 of file juce_Singleton.h.
| std::atomic<Type*> juce::SingletonHolder< Type, MutexType, onlyCreateOncePerRun >::instance |
Definition at line 123 of file juce_Singleton.h.