CyberEngineMkIII
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Protected Member Functions | Static Protected Attributes | List of all members
CYB::API::Singleton< AParent > Class Template Reference

A class for creating static singletons. More...

#include <Singleton.hpp>

Inheritance diagram for CYB::API::Singleton< AParent >:
Inheritance graph
[legend]
Collaboration diagram for CYB::API::Singleton< AParent >:
Collaboration graph
[legend]

Protected Member Functions

 Singleton (const bool AInit) noexcept
 Optionally initialize the singleton with the current object. More...
 
 ~Singleton ()
 Destroy a singleton and nullify it's pointer.
 

Static Protected Attributes

static AParent * FSingleton
 The singleton object.
 

Detailed Description

template<class AParent>
class CYB::API::Singleton< AParent >

A class for creating static singletons.

Template Parameters
AParentThe class that will be inheriting from this one to create a singleton

Definition at line 10 of file Singleton.hpp.

Constructor & Destructor Documentation

template<class AParent>
CYB::API::Singleton< AParent >::Singleton ( const bool  AInit)
protectednoexcept

Optionally initialize the singleton with the current object.

Parameters
AInitIf set to true, FSingleton will be set to this
Thread Safety
Access to this function must be synchronized per template instantiation

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