roviz  0.7
Code Documentation of roviz
Static Public Member Functions | List of all members
Singleton< T > Class Template Reference

The Singleton Template figures as baseclass for all Singletons. It provides a instance() functions which returns the only instance. Template parameter T: Class that you implement (Curiously recurring template pattern) More...

#include <singleton.h>

Inheritance diagram for Singleton< T >:
Inheritance graph
Collaboration diagram for Singleton< T >:
Collaboration graph

Static Public Member Functions

static T * instance ()
 Returns the current instance of the singleton. More...
 

Additional Inherited Members

- Protected Member Functions inherited from AbstractSingleton
virtual bool postInit ()=0
 postInit will be called after all components and singletons have been constructed/initialized More...
 
virtual bool preDestroy ()=0
 preDestroy will be called before any of the components and singletons will be destructed/deinitailized More...
 

Detailed Description

template<typename T>
class Singleton< T >

The Singleton Template figures as baseclass for all Singletons. It provides a instance() functions which returns the only instance. Template parameter T: Class that you implement (Curiously recurring template pattern)

Member Function Documentation

◆ instance()

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

Returns the current instance of the singleton.

Returns
the one and only instance

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