Thrill  0.1
Singleton< Instance, destroy_on_exit > Class Template Reference

Detailed Description

template<typename Instance, bool destroy_on_exit = true>
class thrill::common::Singleton< Instance, destroy_on_exit >

Definition at line 27 of file singleton.hpp.

#include <singleton.hpp>

Public Member Functions

 Singleton ()=default
 
 Singleton (const Singleton &)=delete
 non-copyable: delete copy-constructor More...
 
 Singleton (Singleton &&)=default
 move-constructor: default More...
 
Singletonoperator= (const Singleton &)=delete
 non-copyable: delete assignment operator More...
 
Singletonoperator= (Singleton &&)=default
 move-assignment operator: default More...
 

Static Public Member Functions

static instance_pointer GetInstance ()
 

Private Types

using instance_pointer = instance_type *
 
using instance_type = Instance
 
using volatile_instance_pointer = volatile instance_pointer
 

Static Private Member Functions

static instance_pointer CreateInstance ()
 
static void DestroyInstance ()
 

Static Private Attributes

static volatile_instance_pointer instance_ = nullptr
 

Member Typedef Documentation

◆ instance_pointer

using instance_pointer = instance_type *
private

Definition at line 30 of file singleton.hpp.

◆ instance_type

using instance_type = Instance
private

Definition at line 29 of file singleton.hpp.

◆ volatile_instance_pointer

using volatile_instance_pointer = volatile instance_pointer
private

Definition at line 31 of file singleton.hpp.

Constructor & Destructor Documentation

◆ Singleton() [1/3]

Singleton ( )
default

◆ Singleton() [2/3]

Singleton ( const Singleton< Instance, destroy_on_exit > &  )
delete

non-copyable: delete copy-constructor

◆ Singleton() [3/3]

Singleton ( Singleton< Instance, destroy_on_exit > &&  )
default

move-constructor: default

Member Function Documentation

◆ CreateInstance()

◆ DestroyInstance()

void DestroyInstance ( )
staticprivate

◆ GetInstance()

◆ operator=() [1/2]

Singleton& operator= ( const Singleton< Instance, destroy_on_exit > &  )
delete

non-copyable: delete assignment operator

◆ operator=() [2/2]

Singleton& operator= ( Singleton< Instance, destroy_on_exit > &&  )
default

move-assignment operator: default

Member Data Documentation

◆ instance_


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