Lums
Static Public Member Functions | Protected Member Functions | List of all members
lm::Singleton< T > Class Template Reference

An helper template for creating singletons. More...

#include <Singleton.hpp>

Static Public Member Functions

static T & instance ()
 

Protected Member Functions

 Singleton ()=default
 
 Singleton (const Singleton< T > &)=delete
 
Singleton< T > & operator= (const Singleton< T > &)=delete
 

Detailed Description

template<typename T>
class lm::Singleton< T >

An helper template for creating singletons.

Singletons created using this class are lazy-constructed

Constructor & Destructor Documentation

template<typename T>
lm::Singleton< T >::Singleton ( )
protecteddefault

Default ctor

template<typename T>
lm::Singleton< T >::Singleton ( const Singleton< T > &  )
protecteddelete

Deleted copy ctor

Member Function Documentation

template<typename T>
static T& lm::Singleton< T >::instance ( )
inlinestatic

Get the single instance

Returns
The single instance
template<typename T>
Singleton<T>& lm::Singleton< T >::operator= ( const Singleton< T > &  )
protecteddelete

Deleted assignment operator


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