library/utility/singleton.hh

Defines

allow_singleton_access(class_name)
namespace scarab

The standard scarab namespace.

template <class x_type>
class singleton
#include <singleton.hh>

Public Static Functions

x_type *get_instance()
void kill_instance()
template <class… x_args>
x_type *create_instance(x_args... args)

Protected Functions

singleton()
~singleton()

Private Static Functions

void construct_instance()
void delete_instance()

Private Static Attributes

x_type *f_instance = nullptr
destroyer<x_type> f_destroyer
std::mutex f_mutex

Friends

friend scarab::destroyer< x_type >