30#error THIS HEADER IS A GENERATOR. DO NOT INCLUDE.
51#ifndef ETL_VARIANT_POOL_INCLUDED
52#define ETL_VARIANT_POOL_INCLUDED
57#include "static_assert.h"
64#if ETL_USING_CPP11 && !defined(ETL_VARIANT_POOL_FORCE_CPP03_IMPLEMENTATION)
66 template <
size_t MAX_SIZE_,
typename ... Ts>
69 etl::largest<Ts...>::alignment,
78 static const size_t MAX_SIZE = MAX_SIZE_;
90 template <
typename T,
typename... Args>
101 template <
typename T>
124 template <
typename ... Ts>
125 class variant_pool_ext
127 etl::largest<Ts...>::alignment>
138 : base_t(buffer,
size)
145 template <
typename T,
typename... Args>
156 template <
typename T>
169 return base_t::max_size();
179 template <
size_t MAX_SIZE_,
197 :
public etl::generic_pool<etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::size,
198 etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::alignment,
203 typedef etl::generic_pool<etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::size,
204 etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::alignment,
207 static const size_t MAX_SIZE =
MAX_SIZE_;
216#if ETL_CPP11_NOT_SUPPORTED || ETL_USING_STLPORT
220 template <
typename T>
223 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
231 template <
typename T,
typename TP1>
234 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
242 template <
typename T,
typename TP1,
typename TP2>
245 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
253 template <
typename T,
typename TP1,
typename TP2,
typename TP3>
256 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
264 template <
typename T,
typename TP1,
typename TP2,
typename TP3,
typename TP4>
267 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
275 template <
typename T,
typename...
Args>
278 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
287 template <
typename T>
290 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value ||
326 template <
typename T1,
343 :
public etl::generic_pool_ext<etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::size,
344 etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::alignment>
348 typedef etl::generic_pool_ext<etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::size,
349 etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::alignment>
base_t;
359#if ETL_CPP11_NOT_SUPPORTED || ETL_USING_STLPORT
363 template <
typename T>
366 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
374 template <
typename T,
typename TP1>
377 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
385 template <
typename T,
typename TP1,
typename TP2>
388 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
396 template <
typename T,
typename TP1,
typename TP2,
typename TP3>
399 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
407 template <
typename T,
typename TP1,
typename TP2,
typename TP3,
typename TP4>
410 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
418 template <
typename T,
typename...
Args>
421 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value),
"Unsupported type");
430 template <
typename T>
433 ETL_STATIC_ASSERT((
etl::is_one_of<T, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::value ||
459 return base_t::max_size();
Definition variant_pool.h:345
T * create(const TP1 &p1, const TP2 &p2)
Creates the object. Two parameter constructor.
Definition variant_pool.h:386
T * create(const TP1 &p1, const TP2 &p2, const TP3 &p3, const TP4 &p4)
Creates the object. Four parameter constructor.
Definition variant_pool.h:408
T * create()
Creates the object. Default constructor.
Definition variant_pool.h:364
void destroy(const T *const p)
Destroys the object.
Definition variant_pool.h:431
T * create(const TP1 &p1)
Creates the object. One parameter constructor.
Definition variant_pool.h:375
T * create(const TP1 &p1, const TP2 &p2, const TP3 &p3)
Creates the object. Three parameter constructor.
Definition variant_pool.h:397
variant_pool_ext(typename base_t::element *buffer, size_t size)
Default constructor.
Definition variant_pool.h:354
size_t max_size() const
Returns the maximum number of items in the variant_pool.
Definition variant_pool.h:457
Definition variant_pool.h:200
size_t max_size() const
Returns the maximum number of items in the variant_pool.
Definition variant_pool.h:314
void destroy(const T *const p)
Destroys the object.
Definition variant_pool.h:288
T * create(const TP1 &p1)
Creates the object. One parameter constructor.
Definition variant_pool.h:232
T * create()
Creates the object. Default constructor.
Definition variant_pool.h:221
variant_pool()
Default constructor.
Definition variant_pool.h:212
T * create(const TP1 &p1, const TP2 &p2, const TP3 &p3, const TP4 &p4)
Creates the object. Four parameter constructor.
Definition variant_pool.h:265
T * create(const TP1 &p1, const TP2 &p2)
Creates the object. Two parameter constructor.
Definition variant_pool.h:243
T * create(const TP1 &p1, const TP2 &p2, const TP3 &p3)
Creates the object. Three parameter constructor.
Definition variant_pool.h:254
size_t size() const
Returns the number of allocated items in the pool.
Definition ipool.h:293
Definition generic_pool.h:56
Definition generic_pool.h:213
is_base_of
Definition type_traits_generator.h:1252
bitset_ext
Definition absolute.h:38
variant_pool()
Default constructor.
Definition variant_pool_generator.h:234
pair holds two objects of arbitrary type
Definition utility.h:164
ETL_CONSTEXPR pair()
Default constructor.
Definition utility.h:176