xmscore  1.0
xms::Singleton< T > Class Template Reference

Base class for classes that follow the singleton pattern. More...

#include <Singleton.h>

Static Public Member Functions

static T & Instance (bool a_delete=false, T *a_new=NULL)
 Get the instance of the singleton. More...
 
static void Delete ()
 Delete the singleton instance.
 

Detailed Description

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

Base class for classes that follow the singleton pattern.

Definition at line 26 of file Singleton.h.

Member Function Documentation

◆ Instance()

template<typename T>
static T& xms::Singleton< T >::Instance ( bool  a_delete = false,
T *  a_new = NULL 
)
inlinestatic

Get the instance of the singleton.

Parameters
a_deleteIf true delete the instance and recreate next time. RETURNS AN INVALID INSTANCE.
a_newA new pointer to use as the instance when called the first time or just after the instance has been deleted.
Returns
A reference to the instance.

Definition at line 37 of file Singleton.h.

Referenced by xms::Singleton< XmLog >::Delete(), and xms::SharedSingleton< T >::Delete().


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