31#ifndef ETL_POOL_INCLUDED
32#define ETL_POOL_INCLUDED
38#define ETL_POOL_CPP03_CODE 0
52 template <
typename T, const
size_t VSize>
61 using base_t::ALIGNMENT;
63 using base_t::TYPE_SIZE;
81#if ETL_CPP11_NOT_SUPPORTED || ETL_POOL_CPP03_CODE || ETL_USING_STLPORT
98 template <
typename T1>
101 return base_t::template
create<T>(value1);
110 template <
typename T1,
typename T2>
111 T*
create(
const T1& value1,
const T2& value2)
113 return base_t::template
create<T>(value1, value2);
122 template <
typename T1,
typename T2,
typename T3>
123 T*
create(
const T1& value1,
const T2& value2,
const T3& value3)
125 return base_t::template
create<T>(value1, value2, value3);
134 template <
typename T1,
typename T2,
typename T3,
typename T4>
135 T*
create(
const T1& value1,
const T2& value2,
const T3& value3,
const T4& value4)
137 return base_t::template
create<T>(value1, value2, value3, value4);
146 template <
typename... Args>
149 return base_t::template
create<T>(etl::forward<Args>(args)...);
158 template <
typename U>
161 ETL_STATIC_ASSERT((etl::is_same<U, T>::value || etl::is_base_of<U, T>::value),
"Pool does not contain this type");
162 base_t::release(p_object);
170 template <
typename U>
173 ETL_STATIC_ASSERT((etl::is_base_of<U, T>::value),
"Pool does not contain this type");
174 base_t::destroy(p_object);
181 pool& operator=(
const pool&) ETL_DELETE;
189 template <
typename T>
198 using base_t::ALIGNMENT;
199 using base_t::TYPE_SIZE;
205 : base_t(buffer,
size)
221#if ETL_CPP11_NOT_SUPPORTED || ETL_POOL_CPP03_CODE || ETL_USING_STLPORT
238 template <
typename T1>
241 return base_t::template
create<T>(value1);
250 template <
typename T1,
typename T2>
251 T*
create(
const T1& value1,
const T2& value2)
253 return base_t::template
create<T>(value1, value2);
262 template <
typename T1,
typename T2,
typename T3>
263 T*
create(
const T1& value1,
const T2& value2,
const T3& value3)
265 return base_t::template
create<T>(value1, value2, value3);
274 template <
typename T1,
typename T2,
typename T3,
typename T4>
275 T*
create(
const T1& value1,
const T2& value2,
const T3& value3,
const T4& value4)
277 return base_t::template
create<T>(value1, value2, value3, value4);
286 template <
typename... Args>
289 return base_t::template
create<T>(etl::forward<Args>(args)...);
298 template <
typename U>
301 ETL_STATIC_ASSERT((etl::is_same<U, T>::value || etl::is_base_of<U, T>::value),
"Pool does not contain this type");
302 base_t::release(p_object);
310 template <
typename U>
313 ETL_STATIC_ASSERT((etl::is_base_of<U, T>::value),
"Pool does not contain this type");
314 base_t::destroy(p_object);
size_t size() const
Returns the number of allocated items in the pool.
Definition ipool.h:522
pool_ext(typename base_t::element *buffer, size_t size)
Constructor.
Definition pool.h:204
T * allocate()
Definition pool.h:76
T * allocate()
Definition pool.h:216
T * create(const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
Definition pool.h:135
void release(const U *const p_object)
Definition pool.h:299
T * create(const T1 &value1, const T2 &value2)
Definition pool.h:111
T * create(const T1 &value1)
Definition pool.h:239
T * create(const T1 &value1)
Definition pool.h:99
void destroy(const U *const p_object)
Definition pool.h:311
T * create()
Definition pool.h:87
void destroy(const U *const p_object)
Definition pool.h:171
T * create(const T1 &value1, const T2 &value2)
Definition pool.h:251
T * create(const T1 &value1, const T2 &value2, const T3 &value3)
Definition pool.h:123
T * create()
Definition pool.h:227
T * create(const T1 &value1, const T2 &value2, const T3 &value3)
Definition pool.h:263
pool()
Constructor.
Definition pool.h:68
void release(const U *const p_object)
Definition pool.h:159
T * create(const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4)
Definition pool.h:275
Definition generic_pool.h:56
Definition generic_pool.h:216
bitset_ext
Definition absolute.h:40