Berserk
Static Public Member Functions | Static Protected Member Functions | List of all members
Singleton< TInstance > Class Template Reference

Singleton class. More...

#include <Singleton.hpp>

Static Public Member Functions

static TInstance * InstancePointer ()
 
static TInstance & Instance ()
 

Static Protected Member Functions

static void Provide (TInstance *reference)
 
static void Remove (TInstance *reference)
 

Detailed Description

template<typename TInstance>
class Singleton< TInstance >

Singleton class.

Template Parameters
TInstanceType of provided singleton

Member Function Documentation

◆ Instance()

template<typename TInstance >
static TInstance& Singleton< TInstance >::Instance ( )
inlinestatic
Returns
Public instance reference

◆ InstancePointer()

template<typename TInstance >
static TInstance* Singleton< TInstance >::InstancePointer ( )
inlinestatic
Returns
Public instance pointer

◆ Provide()

template<typename TInstance >
static void Singleton< TInstance >::Provide ( TInstance *  reference)
inlinestaticprotected

Must be called by instance provider

◆ Remove()

template<typename TInstance >
static void Singleton< TInstance >::Remove ( TInstance *  reference)
inlinestaticprotected

Must be called by instance provider


The documentation for this class was generated from the following file: