|
Blender V4.3
|
#include <BLI_pool.hh>
Inherits blender::NonCopyable.
Public Member Functions | |
| ~Pool () | |
| template<typename... ForwardT> | |
| T & | construct (ForwardT &&...value) |
| void | destruct (T &value) |
| int64_t | size () const |
| bool | is_empty () const |
Definition at line 24 of file BLI_pool.hh.
|
inline |
Definition at line 36 of file BLI_pool.hh.
References BLI_assert, and blender::Pool< T, ChunkLen >::size().
|
inline |
Construct an object inside this pool's memory.
Definition at line 45 of file BLI_pool.hh.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), blender::Vector< T, InlineBufferCapacity, Allocator >::last(), blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), ptr, blender::Stack< T, InlineBufferCapacity, Allocator >::push(), and T.
|
inline |
Destroy the given element inside this memory pool. Memory will be reused by next element construction. This invokes undefined behavior if the item is not from this pool.
Definition at line 63 of file BLI_pool.hh.
References blender::Stack< T, InlineBufferCapacity, Allocator >::push().
|
inline |
Returns true when the pool contains no elements, otherwise false.
Definition at line 80 of file BLI_pool.hh.
References blender::Pool< T, ChunkLen >::size().
|
inline |
Return the number of constructed elements in this pool.
Definition at line 72 of file BLI_pool.hh.
References blender::Stack< T, InlineBufferCapacity, Allocator >::size(), and blender::Vector< T, InlineBufferCapacity, Allocator >::size().
Referenced by blender::Pool< T, ChunkLen >::is_empty(), and blender::Pool< T, ChunkLen >::~Pool().