JUCE
Loading...
Searching...
No Matches
Classes | Macros
juce_Singleton.h File Reference

Classes

struct  SingletonHolder< Type, MutexType, onlyCreateOncePerRun >
 Used by the JUCE_DECLARE_SINGLETON macros to manage a static pointer to a singleton instance. More...
 

Macros

#define JUCE_DECLARE_SINGLETON(Classname, doNotRecreateAfterDeletion)    JUCE_PRIVATE_DECLARE_SINGLETON (Classname, juce::CriticalSection, doNotRecreateAfterDeletion, , get)
 Macro to generate the appropriate methods and boilerplate for a singleton class.
 
#define JUCE_DECLARE_SINGLETON_INLINE(Classname, doNotRecreateAfterDeletion)    JUCE_PRIVATE_DECLARE_SINGLETON (Classname, juce::CriticalSection, doNotRecreateAfterDeletion, inline, get)
 The same as JUCE_DECLARE_SINGLETON, but does not require a matching JUCE_IMPLEMENT_SINGLETON definition.
 
#define JUCE_IMPLEMENT_SINGLETON(Classname)    decltype (Classname::singletonHolder) Classname::singletonHolder;
 This is a counterpart to the JUCE_DECLARE_SINGLETON macros.
 
#define JUCE_DECLARE_SINGLETON_SINGLETHREADED(Classname, doNotRecreateAfterDeletion)    JUCE_PRIVATE_DECLARE_SINGLETON (Classname, juce::DummyCriticalSection, doNotRecreateAfterDeletion, , get)
 Macro to declare member variables and methods for a singleton class.
 
#define JUCE_DECLARE_SINGLETON_SINGLETHREADED_INLINE(Classname, doNotRecreateAfterDeletion)    JUCE_PRIVATE_DECLARE_SINGLETON (Classname, juce::DummyCriticalSection, doNotRecreateAfterDeletion, inline, get)
 The same as JUCE_DECLARE_SINGLETON_SINGLETHREADED, but does not require a matching JUCE_IMPLEMENT_SINGLETON definition.
 
#define JUCE_DECLARE_SINGLETON_SINGLETHREADED_MINIMAL(Classname)    JUCE_PRIVATE_DECLARE_SINGLETON (Classname, juce::DummyCriticalSection, false, , getWithoutChecking)
 Macro to declare member variables and methods for a singleton class.
 
#define JUCE_DECLARE_SINGLETON_SINGLETHREADED_MINIMAL_INLINE(Classname)    JUCE_PRIVATE_DECLARE_SINGLETON (Classname, juce::DummyCriticalSection, false, inline, getWithoutChecking)
 The same as JUCE_DECLARE_SINGLETON_SINGLETHREADED_MINIMAL, but does not require a matching JUCE_IMPLEMENT_SINGLETON definition.