# Frost::Manager< T > Class Template Reference

Abstract singleton pattern. More...

`#include <frost_utils_manager.h>`

List of all members.

## Static Public Member Functions

static s_ptr< T > | GetSingleton ()
| Returns a pointer to the singleton.
static void | Delete ()
| Deletes the singleton.

## Protected Member Functions

| Manager ()
| Default constructor.
| ~Manager ()
| Destructor.
| Manager (const Manager &mMgr)
| Copy constructor.
Manager & | operator= (const Manager &mMgr)
| Assignment operator.

## Static Private Attributes

static s_ptr< T > | pMgr_ = nullptr

## Friends

class | s_ptr< Manager< T > >

## Detailed Description

### template<class T>
class Frost::Manager< T >

Abstract singleton pattern.

Definition at line 22 of file frost_utils_manager.h.

## Constructor & Destructor Documentation

template<class T>

Frost::Manager< T >::Manager | ( |  | ) | `[inline, protected]`

Default constructor.

Note:
  This is a singleton class. That means that there can only be a single instance at the same time. That's why the constructor is not in public scope.
  If you need to get a pointer to that unique instance, call Manager::GetSingleton().
  Note that, if GetSingleton() has been called at least once, you'll have to delete the returned pointer when you close your program by calling Manager::Delete().

Definition at line 60 of file frost_utils_manager.h.

template<class T>

Frost::Manager< T >::~Manager | ( |  | ) | `[inline, protected]`

Destructor.

Note:
  If GetSingleton() has been called at least once, you'll have to delete the returned pointer when you close your program by calling Manager::Delete() (this is automatically done by Engine).

Definition at line 68 of file frost_utils_manager.h.

template<class T>

Frost::Manager< T >::Manager | ( | const Manager< T > & | mMgr | ) | `[protected]`

Copy constructor.

## Member Function Documentation

template<class T>

static void Frost::Manager< T >::Delete | ( |  | ) | `[inline, static]`

Deletes the singleton.

Note:
  You should call that method when you're not using the singleton anymore, or if you want to reset it.
  Use only if you've called GetSingleton at least once.

Definition at line 43 of file frost_utils_manager.h.

template<class T>

static s_ptr<T> Frost::Manager< T >::GetSingleton | ( |  | ) | `[inline, static]`

Returns a pointer to the singleton.

Note:
  The singleton will be created on the very first call.

Definition at line 30 of file frost_utils_manager.h.

template<class T>

Manager& Frost::Manager< T >::operator= | ( | const Manager< T > & | mMgr | ) | `[protected]`

Assignment operator.

## Friends And Related Function Documentation

template<class T>

friend class s_ptr< Manager< T > >`[friend]`

Definition at line 24 of file frost_utils_manager.h.

## Member Data Documentation

template<class T>

s_ptr< T > Frost::Manager< T >::pMgr_ = nullptr`[inline, static, private]`

Definition at line 78 of file frost_utils_manager.h.

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

- D:/Programmation/Sources/Tensor2/Utils/include/frost_utils_manager.h