Hermes  0.9.5-beta
Hierarchical Distributed I/O Buffering System
hermes::Singleton< T > Class Template Reference

#include <singleton.h>

Public Member Functions

Singletonoperator= (const Singleton)=delete
 
 Singleton (const Singleton &)=delete
 

Static Public Member Functions

template<typename... Args>
static T * GetInstance (Args... args)
 

Static Protected Attributes

static std::unique_ptr< T > instance = nullptr
 

Detailed Description

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

A class to represent singleton pattern

Constructor & Destructor Documentation

◆ Singleton()

template<typename T >
hermes::Singleton< T >::Singleton ( const Singleton< T > &  )
delete

Constructor

Member Function Documentation

◆ GetInstance()

template<typename T >
template<typename... Args>
static T* hermes::Singleton< T >::GetInstance ( Args...  args)
inlinestatic

Uses unique pointer to build a static global instance of variable.

Template Parameters
T
Returns
instance of T
Here is the caller graph for this function:

◆ operator=()

template<typename T >
Singleton& hermes::Singleton< T >::operator= ( const  Singleton)
delete

Operators

Member Data Documentation

◆ instance

template<typename T >
std::unique_ptr< T > hermes::Singleton< T >::instance = nullptr
staticprotected

static instance.


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