|
|
| ipool (T *p_buffer, ibitset &in_use_flags, size_t size) |
| | Constructor.
|
| |
|
| pool_base (size_t max_size) |
| | Constructor.
|
| |
|
|
T * | p_buffer |
| |
|
ibitset & | in_use_flags |
| |
|
size_t | next_free |
| | The position of the next free item in the pool.
|
| |
|
size_t | items_allocated |
| | The number of items allocated.
|
| |
|
const size_t | MAX_SIZE |
| | The maximum number of objects that can be allocated.
|
| |
Allocate an object from the pool. If ETL_THROW_EXCEPTIONS is defined and there are no more free items an etl::pool_no_allocation if thrown, otherwise a nullptr is returned.
- Note
- The state of the object returned is undefined.
template<typename T >
| bool etl::ipool< T >::is_in_pool |
( |
const T & |
object | ) |
const |
|
inline |
Check to see if the object belongs to the pool.
- Parameters
-
| p_object | A pointer to the object to be checked. |
- Returns
- true< > if it does, otherwise false
template<typename T >
| bool etl::ipool< T >::is_in_pool |
( |
const T *const |
p_object | ) |
const |
|
inline |
Check to see if the object belongs to the pool.
- Parameters
-
| p_object | A pointer to the object to be checked. |
- Returns
- true< > if it does, otherwise false
Free an object in the pool. If ETL_THROW_EXCEPTIONS is defined and the object does not belong to this pool then an etl::pool_object_not_in_pool is thrown.
- Parameters
-
| p_object | A pointer to the object to be released. |
template<typename T >
| void etl::ipool< T >::release |
( |
const T *const |
p_object | ) |
|
|
inline |
Free an object in the pool. If ETL_THROW_EXCEPTIONS is defined and the object does not belong to this pool then an etl::pool_object_not_in_pool is thrown.
- Parameters
-
| p_object | A pointer to the object to be released. |
The documentation for this class was generated from the following file: