Embedded Template Library 1.0
|
Classes | |
class | etl::generic_pool< VTypeSize, VAlignment, VSize > |
class | etl::generic_pool_ext< VTypeSize, VAlignment > |
class | etl::pool_exception |
class | etl::pool_no_allocation |
class | etl::pool_object_not_in_pool |
class | etl::pool_element_size |
class | etl::ipool |
class | etl::pool< T, VSize > |
class | etl::pool_ext< T > |
A fixed capacity pool.
class etl::generic_pool |
A templated abstract pool implementation that uses a fixed size pool.
Public Member Functions | |
generic_pool () | |
Constructor. | |
template<typename U > | |
U * | allocate () |
template<typename U > | |
U * | create () |
template<typename U , typename T1 > | |
U * | create (const T1 &value1) |
template<typename U , typename T1 , typename T2 > | |
U * | create (const T1 &value1, const T2 &value2) |
template<typename U , typename T1 , typename T2 , typename T3 > | |
U * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename U , typename T1 , typename T2 , typename T3 , typename T4 > | |
U * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
template<typename U > | |
void | destroy (const U *const p_object) |
![]() | |
template<typename T > | |
T * | allocate () |
template<typename T > | |
T * | create () |
template<typename T , typename T1 > | |
T * | create (const T1 &value1) |
template<typename T , typename T1 , typename T2 > | |
T * | create (const T1 &value1, const T2 &value2) |
template<typename T , typename T1 , typename T2 , typename T3 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
template<typename T > | |
void | destroy (const T *const p_object) |
void | release (const void *const p_object) |
void | release_all () |
Release all objects in the pool. | |
bool | is_in_pool (const void *const p_object) const |
size_t | max_size () const |
Returns the maximum number of items in the pool. | |
size_t | capacity () const |
Returns the maximum number of items in the pool. | |
size_t | available () const |
Returns the number of free items in the pool. | |
size_t | size () const |
Returns the number of allocated items in the pool. | |
bool | empty () const |
bool | full () const |
Static Public Attributes | |
static ETL_CONSTANT size_t | SIZE = VSize |
static ETL_CONSTANT size_t | ALIGNMENT = VAlignment |
static ETL_CONSTANT size_t | TYPE_SIZE = VTypeSize |
Additional Inherited Members | |
![]() | |
typedef size_t | size_type |
![]() | |
ipool (char *p_buffer_, uint32_t item_size_, uint32_t max_size_) | |
Constructor. | |
~ipool () | |
Destructor. | |
|
inline |
Allocate an object from the pool. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned. Static asserts if the specified type is too large for the pool.
|
inline |
Allocate storage for an object from the pool and create with default. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 1 parameter. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 2 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 3 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 4 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Destroys the object. Undefined behaviour if the pool does not contain a 'U'.
p_object | A pointer to the object to be destroyed. |
class etl::generic_pool_ext |
A templated abstract pool implementation that uses a fixed size pool. The storage for the pool is supplied externally.
Public Types | |
typedef etl::aligned_storage< sizeof(element_internal), etl::alignment_of< element_internal >::value >::type | element |
![]() | |
typedef size_t | size_type |
Public Member Functions | |
generic_pool_ext (element *buffer, size_t size) | |
Constructor. | |
template<typename U > | |
U * | allocate () |
template<typename U > | |
U * | create () |
template<typename U , typename T1 > | |
U * | create (const T1 &value1) |
template<typename U , typename T1 , typename T2 > | |
U * | create (const T1 &value1, const T2 &value2) |
template<typename U , typename T1 , typename T2 , typename T3 > | |
U * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename U , typename T1 , typename T2 , typename T3 , typename T4 > | |
U * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
template<typename U > | |
void | destroy (const U *const p_object) |
![]() | |
template<typename T > | |
T * | allocate () |
template<typename T > | |
T * | create () |
template<typename T , typename T1 > | |
T * | create (const T1 &value1) |
template<typename T , typename T1 , typename T2 > | |
T * | create (const T1 &value1, const T2 &value2) |
template<typename T , typename T1 , typename T2 , typename T3 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
template<typename T > | |
void | destroy (const T *const p_object) |
void | release (const void *const p_object) |
void | release_all () |
Release all objects in the pool. | |
bool | is_in_pool (const void *const p_object) const |
size_t | max_size () const |
Returns the maximum number of items in the pool. | |
size_t | capacity () const |
Returns the maximum number of items in the pool. | |
size_t | available () const |
Returns the number of free items in the pool. | |
size_t | size () const |
Returns the number of allocated items in the pool. | |
bool | empty () const |
bool | full () const |
Static Public Attributes | |
static ETL_CONSTANT size_t | ALIGNMENT = VAlignment |
static ETL_CONSTANT size_t | TYPE_SIZE = VTypeSize |
Additional Inherited Members | |
![]() | |
ipool (char *p_buffer_, uint32_t item_size_, uint32_t max_size_) | |
Constructor. | |
~ipool () | |
Destructor. | |
|
inline |
Allocate an object from the pool. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned. Static asserts if the specified type is too large for the pool.
|
inline |
Allocate storage for an object from the pool and create with default. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 1 parameter. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 2 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 3 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 4 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Destroys the object. Undefined behaviour if the pool does not contain a 'U'.
p_object | A pointer to the object to be destroyed. |
class etl::pool_exception |
The base class for pool exceptions.
Public Member Functions | |
pool_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::pool_no_allocation |
The exception thrown when the pool has no more free items.
Public Member Functions | |
pool_no_allocation (string_type file_name_, numeric_type line_number_) | |
![]() | |
pool_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::pool_object_not_in_pool |
The exception thrown when an object is released which does not belong to the pool.
Public Member Functions | |
pool_object_not_in_pool (string_type file_name_, numeric_type line_number_) | |
![]() | |
pool_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::pool_element_size |
The exception thrown when an the type requested is larger than the element size.
Public Member Functions | |
pool_element_size (string_type file_name_, numeric_type line_number_) | |
![]() | |
pool_exception (string_type reason_, string_type file_name_, numeric_type line_number_) | |
![]() | |
ETL_CONSTEXPR | exception (string_type reason_, string_type, numeric_type line_) |
Constructor. | |
ETL_CONSTEXPR string_type | what () const |
ETL_CONSTEXPR string_type | file_name () const |
ETL_CONSTEXPR numeric_type | line_number () const |
Additional Inherited Members | |
![]() | |
typedef const char * | string_type |
typedef int | numeric_type |
class etl::ipool |
Public Types | |
typedef size_t | size_type |
Public Member Functions | |
template<typename T > | |
T * | allocate () |
template<typename T > | |
T * | create () |
template<typename T , typename T1 > | |
T * | create (const T1 &value1) |
template<typename T , typename T1 , typename T2 > | |
T * | create (const T1 &value1, const T2 &value2) |
template<typename T , typename T1 , typename T2 , typename T3 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
template<typename T > | |
void | destroy (const T *const p_object) |
void | release (const void *const p_object) |
void | release_all () |
Release all objects in the pool. | |
bool | is_in_pool (const void *const p_object) const |
size_t | max_size () const |
Returns the maximum number of items in the pool. | |
size_t | capacity () const |
Returns the maximum number of items in the pool. | |
size_t | available () const |
Returns the number of free items in the pool. | |
size_t | size () const |
Returns the number of allocated items in the pool. | |
bool | empty () const |
bool | full () const |
Protected Member Functions | |
ipool (char *p_buffer_, uint32_t item_size_, uint32_t max_size_) | |
Constructor. | |
~ipool () | |
Destructor. | |
|
inline |
Allocate storage for an object from the pool. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create default. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 1 parameter. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Destroys the object. Undefined behaviour if the pool does not contain a 'T'.
p_object | A pointer to the object to be destroyed. |
|
inline |
Checks to see if there are no allocated items in the pool.
|
inline |
Checks to see if there are no free items in the pool.
|
inline |
Check to see if the object belongs to the pool.
p_object | A pointer to the object to be checked. |
|
inline |
Release an object in the pool. If asserts or exceptions are enabled and the object does not belong to this pool then an etl::pool_object_not_in_pool is thrown.
p_object | A pointer to the object to be released. |
class etl::pool |
A templated pool implementation that uses a fixed size pool.
Public Member Functions | |
pool () | |
Constructor. | |
T * | allocate () |
T * | create () |
template<typename T1 > | |
T * | create (const T1 &value1) |
template<typename T1 , typename T2 > | |
T * | create (const T1 &value1, const T2 &value2) |
template<typename T1 , typename T2 , typename T3 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
template<typename U > | |
void | release (const U *const p_object) |
template<typename U > | |
void | destroy (const U *const p_object) |
![]() | |
generic_pool () | |
Constructor. | |
U * | allocate () |
U * | create () |
U * | create (const T1 &value1) |
U * | create (const T1 &value1, const T2 &value2) |
U * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
U * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
void | destroy (const U *const p_object) |
![]() | |
template<typename T > | |
T * | allocate () |
template<typename T > | |
T * | create () |
template<typename T , typename T1 > | |
T * | create (const T1 &value1) |
template<typename T , typename T1 , typename T2 > | |
T * | create (const T1 &value1, const T2 &value2) |
template<typename T , typename T1 , typename T2 , typename T3 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
template<typename T > | |
void | destroy (const T *const p_object) |
void | release (const void *const p_object) |
void | release_all () |
Release all objects in the pool. | |
bool | is_in_pool (const void *const p_object) const |
size_t | max_size () const |
Returns the maximum number of items in the pool. | |
size_t | capacity () const |
Returns the maximum number of items in the pool. | |
size_t | available () const |
Returns the number of free items in the pool. | |
size_t | size () const |
Returns the number of allocated items in the pool. | |
bool | empty () const |
bool | full () const |
Additional Inherited Members | |
![]() | |
typedef size_t | size_type |
![]() | |
static ETL_CONSTANT size_t | SIZE |
static ETL_CONSTANT size_t | ALIGNMENT |
static ETL_CONSTANT size_t | TYPE_SIZE |
![]() | |
ipool (char *p_buffer_, uint32_t item_size_, uint32_t max_size_) | |
Constructor. | |
~ipool () | |
Destructor. | |
|
inline |
Allocate an object from the pool. Uses the default constructor. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned. Static asserts if the specified type is too large for the pool.
|
inline |
Allocate storage for an object from the pool and create with default. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 1 parameter. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 2 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 3 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 4 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Destroys the object. Undefined behaviour if the pool does not contain a 'U' object derived from 'U'.
p_object | A pointer to the object to be destroyed. |
|
inline |
Releases the object. Undefined behaviour if the pool does not contain a 'U' object derived from 'U'.
p_object | A pointer to the object to be destroyed. |
class etl::pool_ext |
A templated pool implementation that uses a fixed size pool. The storage for the pool is supplied externally.
Public Member Functions | |
pool_ext (typename base_t::element *buffer, size_t size) | |
Constructor. | |
T * | allocate () |
T * | create () |
template<typename T1 > | |
T * | create (const T1 &value1) |
template<typename T1 , typename T2 > | |
T * | create (const T1 &value1, const T2 &value2) |
template<typename T1 , typename T2 , typename T3 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T1 , typename T2 , typename T3 , typename T4 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
template<typename U > | |
void | release (const U *const p_object) |
template<typename U > | |
void | destroy (const U *const p_object) |
![]() | |
generic_pool_ext (element *buffer, size_t size) | |
Constructor. | |
U * | allocate () |
U * | create () |
U * | create (const T1 &value1) |
U * | create (const T1 &value1, const T2 &value2) |
U * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
U * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
void | destroy (const U *const p_object) |
![]() | |
template<typename T > | |
T * | allocate () |
template<typename T > | |
T * | create () |
template<typename T , typename T1 > | |
T * | create (const T1 &value1) |
template<typename T , typename T1 , typename T2 > | |
T * | create (const T1 &value1, const T2 &value2) |
template<typename T , typename T1 , typename T2 , typename T3 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3) |
template<typename T , typename T1 , typename T2 , typename T3 , typename T4 > | |
T * | create (const T1 &value1, const T2 &value2, const T3 &value3, const T4 &value4) |
template<typename T > | |
void | destroy (const T *const p_object) |
void | release (const void *const p_object) |
void | release_all () |
Release all objects in the pool. | |
bool | is_in_pool (const void *const p_object) const |
size_t | max_size () const |
Returns the maximum number of items in the pool. | |
size_t | capacity () const |
Returns the maximum number of items in the pool. | |
size_t | available () const |
Returns the number of free items in the pool. | |
size_t | size () const |
Returns the number of allocated items in the pool. | |
bool | empty () const |
bool | full () const |
Additional Inherited Members | |
![]() | |
typedef etl::aligned_storage< sizeof(element_internal), etl::alignment_of< element_internal >::value >::type | element |
![]() | |
typedef size_t | size_type |
![]() | |
static ETL_CONSTANT size_t | ALIGNMENT |
static ETL_CONSTANT size_t | TYPE_SIZE |
![]() | |
ipool (char *p_buffer_, uint32_t item_size_, uint32_t max_size_) | |
Constructor. | |
~ipool () | |
Destructor. | |
|
inline |
Allocate an object from the pool. Uses the default constructor. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned. Static asserts if the specified type is too large for the pool.
|
inline |
Allocate storage for an object from the pool and create with default. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 1 parameter. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 2 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 3 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Allocate storage for an object from the pool and create with 4 parameters. If asserts or exceptions are enabled and there are no more free items an etl::pool_no_allocation if thrown, otherwise a null pointer is returned.
|
inline |
Destroys the object. Undefined behaviour if the pool does not contain a 'U' object derived from 'U'.
p_object | A pointer to the object to be destroyed. |
|
inline |
Releases the object. Undefined behaviour if the pool does not contain a 'U' object derived from 'U'.
p_object | A pointer to the object to be destroyed. |