Thrill  0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.

+ Inheritance diagram for Singleton< Instance, destroy_on_exit >:

#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

using instance_pointer = instance_type *
private

Definition at line 30 of file singleton.hpp.

using instance_type = Instance
private

Definition at line 29 of file singleton.hpp.

using volatile_instance_pointer = volatile instance_pointer
private

Definition at line 31 of file singleton.hpp.

Constructor & Destructor Documentation

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

non-copyable: delete copy-constructor

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

move-constructor: default

Member Function Documentation

Singleton< Instance, destroy_on_exit >::instance_pointer CreateInstance ( )
staticprivate

Definition at line 60 of file singleton.hpp.

Referenced by Singleton< DiskQueues >::GetInstance().

void DestroyInstance ( )
staticprivate

Definition at line 72 of file singleton.hpp.

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

non-copyable: delete assignment operator

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

move-assignment operator: default

Member Data Documentation

Singleton< Instance, destroy_on_exit >::volatile_instance_pointer instance_ = nullptr
staticprivate

Definition at line 33 of file singleton.hpp.

Referenced by Singleton< DiskQueues >::GetInstance().


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