31#ifndef ETL_SINGLETON_INCLUDED
32#define ETL_SINGLETON_INCLUDED
72#if ETL_USING_CPP11 && !defined(ETL_SINGLETON_FORCE_CPP03_IMPLEMENTATION)
87 template <
typename...
TArgs>
90 Data& data = get_data();
94 T* p = data.storage.begin();
105 Data& data = get_data();
109 T* p = data.storage.begin();
122 Data& data = get_data();
126 return *data.storage.begin();
134 Data& data = get_data();
158 static Data& get_data()
166 singleton() =
delete;
167 singleton(
const singleton&) =
delete;
168 singleton& operator =(
const singleton&) =
delete;
187 Data& data = get_data();
191 T* p = data.storage.begin();
201 template <
typename T1>
204 Data& data = get_data();
208 T* p = data.storage.begin();
218 template <
typename T1,
typename T2>
221 Data& data = get_data();
225 T* p = data.storage.begin();
235 template <
typename T1,
typename T2,
typename T3>
238 Data& data = get_data();
242 T* p = data.storage.begin();
252 template <
typename T1,
typename T2,
typename T3,
typename T4>
255 Data& data = get_data();
259 T* p = data.storage.begin();
270 Data& data = get_data();
274 T* p = data.storage.begin();
287 Data& data = get_data();
291 return *data.storage.begin();
299 Data& data = get_data();
320 static Data& get_data()
329 singleton(
const singleton&);
330 singleton& operator =(
const singleton&);
Base singleton error exception.
Definition singleton.h:50
Singleton not created error exception.
Definition singleton.h:63
#define ETL_ASSERT(b, e)
Definition error_handler.h:356
Definition exception.h:47
static void create(const T1 &p1, const T2 &p2, const T3 &p3)
Definition singleton.h:236
static void create(const T1 &p1, const T2 &p2, const T3 &p3, const T4 &p4)
Definition singleton.h:253
static void create()
Constructs the instance of the singleton type.
Definition singleton.h:185
static bool is_valid()
Checks the validity of the singleton.
Definition singleton.h:297
static void create(const T1 &p1)
Definition singleton.h:202
static void destroy()
Destructs the instance of the singleton type.
Definition singleton.h:268
static void create(const T1 &p1, const T2 &p2)
Definition singleton.h:219
static T & instance()
Definition singleton.h:285
Creates .
Definition singleton.h:43
bitset_ext
Definition absolute.h:38
pair holds two objects of arbitrary type
Definition utility.h:164