#include <bn_pool.h>
template<typename Type>
bn::ipool class

Base class of bn::pool.

Template parameters
Type Element type.

Can be used as a reference type for all pool containers containing a specific type.

Base classes

template<int MaxElementSize>
class igeneric_pool<sizeof(generic_pool_element<sizeof(Type)>)>
Base class of generic_pool.

Derived classes

template<typename Type, int MaxSize>
class pool
bn::ipool implementation that uses a fixed size buffer.
template<typename Type, int MaxSize>
class pool
bn::ipool implementation that uses a fixed size buffer.
template<typename Type, int MaxSize>
class pool
bn::ipool implementation that uses a fixed size buffer.

Public types

using size_type = typename base_type::size_type
Size type alias.

Constructors, destructors, conversion operators

~ipool() defaulted noexcept
Destructor.
~ipool() noexcept
Destructor.

Public functions

auto contains(const Type& value) const -> bool
Indicates if the given value belongs to the ipool or not.
template<typename... Args>
auto create(Args && ... args) -> Type&
Constructs a value inside of the ipool.
void destroy(Type& value)
Destroys the given value, previously allocated with the create method.

Function documentation

template<typename Type> template<typename... Args>
Type& bn::ipool<Type>::create(Args && ... args)

Constructs a value inside of the ipool.

Parameters
args Parameters of the value to construct.
Returns Reference to the new value.