ScummVM API documentation
Singleton

Description

API for managing singletons.

Classes

class  Common::Singleton< T >
 

Macros

#define DECLARE_SINGLETON(T)   template<> T *Singleton<T>::_singleton = 0
 

Macro Definition Documentation

◆ DECLARE_SINGLETON

#define DECLARE_SINGLETON (   T)    template<> T *Singleton<T>::_singleton = 0

Note that you need to use this macro from the Common namespace.

This is because C++ requires initial explicit specialization to be placed in the same namespace as the template.