soui 5.0.0.1
Soui5 Doc
 
Loading...
Searching...
No Matches
SSingleton2< T > Class Template Reference

Pseudo-Singleton Template. More...

#include <SSingleton2.h>

Public Member Functions

 SSingleton2 (void)
 Constructor for SSingleton2.
 
virtual ~SSingleton2 (void)
 Destructor for SSingleton2.
 

Static Public Member Functions

static T & getSingleton (void)
 Gets the singleton instance.
 
static T * getSingletonPtr (void)
 Gets the pointer to the singleton instance.
 

Detailed Description

template<typename T>
class SSingleton2< T >

Pseudo-Singleton Template.

Description: Implements a pseudo-singleton pattern where the actual singleton management is handled by the SApplication class. This allows for centralized management of singleton instances.

Template Parameters
TType of the class that will be made a pseudo-singleton.

Definition at line 38 of file SSingleton2.h.

Constructor & Destructor Documentation

◆ SSingleton2()

template<typename T>
SSingleton2< T >::SSingleton2 ( void )
inline

Constructor for SSingleton2.

Definition at line 43 of file SSingleton2.h.

◆ ~SSingleton2()

template<typename T>
virtual SSingleton2< T >::~SSingleton2 ( void )
inlinevirtual

Destructor for SSingleton2.

Definition at line 50 of file SSingleton2.h.

Member Function Documentation

◆ getSingleton()

template<typename T>
static T & SSingleton2< T >::getSingleton ( void )
inlinestatic

Gets the singleton instance.

Returns
Reference to the singleton instance.
Note
Asserts that the singleton instance exists.

Definition at line 59 of file SSingleton2.h.

◆ getSingletonPtr()

template<typename T>
static T * SSingleton2< T >::getSingletonPtr ( void )
inlinestatic

Gets the pointer to the singleton instance.

Returns
Pointer to the singleton instance.
Note
Asserts that the singleton instance exists.

Definition at line 70 of file SSingleton2.h.


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