libvisual  0.5.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Attributes | List of all members
LV::Singleton< T > Class Template Reference

Singleton class template. More...

#include <libvisual/lv_singleton.hpp>

Inheritance diagram for LV::Singleton< T >:
Inheritance graph
[legend]
Collaboration diagram for LV::Singleton< T >:
Collaboration graph
[legend]

Public Member Functions

 Singleton (Singleton const &)=delete
 
Singleton const & operator= (Singleton const &)=delete
 
virtual ~Singleton ()
 Destructor.
 

Static Public Member Functions

static T * instance ()
 Returns the singleton instance. More...
 
static void destroy ()
 Destroys the singleton instance.
 

Protected Member Functions

template<>
Systemm_instance
 
template<>
PluginRegistrym_instance
 

Static Protected Attributes

static T * m_instance
 

Detailed Description

template<class T>
class LV::Singleton< T >

Singleton class template.

Template Parameters
TClass to make singleton out of
Note
Singleton is implemented using the curiously recurring template pattern (CRTP).

Definition at line 13 of file lv_singleton.hpp.

Member Function Documentation

template<class T>
static T* LV::Singleton< T >::instance ( )
inlinestatic

Returns the singleton instance.

Returns
singleton instance

Definition at line 27 of file lv_singleton.hpp.


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