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"
65 template <
size_t MAX_SIZE_,
83 :
public etl::generic_pool<etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::size,
84 etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::alignment,
89 typedef etl::generic_pool<etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::size,
90 etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::alignment,
93 static const size_t MAX_SIZE = MAX_SIZE_;
102#if ETL_CPP11_NOT_SUPPORTED || ETL_USING_STLPORT
106 template <
typename T>
109 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");
111 return base_t::template create<T>();
117 template <
typename T,
typename TP1>
120 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");
122 return base_t::template create<T>(p1);
128 template <
typename T,
typename TP1,
typename TP2>
131 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");
133 return base_t::template create<T>(p1, p2);
139 template <
typename T,
typename TP1,
typename TP2,
typename TP3>
140 T*
create(
const TP1& p1,
const TP2& p2,
const TP3& p3)
142 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");
144 return base_t::template create<T>(p1, p2, p3);
150 template <
typename T,
typename TP1,
typename TP2,
typename TP3,
typename TP4>
151 T*
create(
const TP1& p1,
const TP2& p2,
const TP3& p3,
const TP4& p4)
153 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");
155 return base_t::template create<T>(p1, p2, p3, p4);
161 template <
typename T,
typename... Args>
164 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");
166 return base_t::template create<T>(etl::forward<Args>(args)...);
173 template <
typename T>
176 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 ||
212 template <
typename T1,
229 :
public etl::generic_pool_ext<etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::size,
230 etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::alignment>
234 typedef etl::generic_pool_ext<etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::size,
235 etl::largest<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>::alignment>
base_t;
245#if ETL_CPP11_NOT_SUPPORTED || ETL_USING_STLPORT
249 template <
typename T>
252 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");
254 return base_t::template create<T>();
260 template <
typename T,
typename TP1>
263 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");
265 return base_t::template create<T>(p1);
271 template <
typename T,
typename TP1,
typename TP2>
274 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");
276 return base_t::template create<T>(p1, p2);
282 template <
typename T,
typename TP1,
typename TP2,
typename TP3>
283 T*
create(
const TP1& p1,
const TP2& p2,
const TP3& p3)
285 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 return base_t::template create<T>(p1, p2, p3);
293 template <
typename T,
typename TP1,
typename TP2,
typename TP3,
typename TP4>
294 T*
create(
const TP1& p1,
const TP2& p2,
const TP3& p3,
const TP4& p4)
296 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");
298 return base_t::template create<T>(p1, p2, p3, p4);
304 template <
typename T,
typename... Args>
307 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");
309 return base_t::template create<T>(etl::forward<Args>(args)...);
316 template <
typename T>
319 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 ||
Definition: variant_pool.h:231
T * create(const TP1 &p1, const TP2 &p2)
Creates the object. Two parameter constructor.
Definition: variant_pool.h:272
T * create(const TP1 &p1, const TP2 &p2, const TP3 &p3, const TP4 &p4)
Creates the object. Four parameter constructor.
Definition: variant_pool.h:294
T * create()
Creates the object. Default constructor.
Definition: variant_pool.h:250
void destroy(const T *const p)
Destroys the object.
Definition: variant_pool.h:317
T * create(const TP1 &p1)
Creates the object. One parameter constructor.
Definition: variant_pool.h:261
T * create(const TP1 &p1, const TP2 &p2, const TP3 &p3)
Creates the object. Three parameter constructor.
Definition: variant_pool.h:283
variant_pool_ext(typename base_t::element *buffer, size_t size)
Default constructor.
Definition: variant_pool.h:240
size_t max_size() const
Returns the maximum number of items in the variant_pool.
Definition: variant_pool.h:343
Definition: variant_pool.h:86
size_t max_size() const
Returns the maximum number of items in the variant_pool.
Definition: variant_pool.h:200
void destroy(const T *const p)
Destroys the object.
Definition: variant_pool.h:174
T * create(const TP1 &p1)
Creates the object. One parameter constructor.
Definition: variant_pool.h:118
T * create()
Creates the object. Default constructor.
Definition: variant_pool.h:107
variant_pool()
Default constructor.
Definition: variant_pool.h:98
T * create(const TP1 &p1, const TP2 &p2, const TP3 &p3, const TP4 &p4)
Creates the object. Four parameter constructor.
Definition: variant_pool.h:151
T * create(const TP1 &p1, const TP2 &p2)
Creates the object. Two parameter constructor.
Definition: variant_pool.h:129
T * create(const TP1 &p1, const TP2 &p2, const TP3 &p3)
Creates the object. Three parameter constructor.
Definition: variant_pool.h:140
Definition: largest.h:367
size_t size() const
Returns the number of allocated items in the pool.
Definition: ipool.h:293
size_t max_size() const
Returns the maximum number of items in the pool.
Definition: ipool.h:269
void destroy(const U *const p_object)
Definition: generic_pool.h:169
void destroy(const U *const p_object)
Definition: generic_pool.h:337
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
Definition: alignment.h:223
Definition: type_traits.h:1376