Blender V4.3
blender::Pool< T, ChunkLen > Class Template Reference

#include <BLI_pool.hh>

Inherits blender::NonCopyable.

Public Member Functions

 ~Pool ()
 
template<typename... ForwardT>
Tconstruct (ForwardT &&...value)
 
void destruct (T &value)
 
int64_t size () const
 
bool is_empty () const
 

Detailed Description

template<typename T, int64_t ChunkLen = 64>
class blender::Pool< T, ChunkLen >

Definition at line 24 of file BLI_pool.hh.

Constructor & Destructor Documentation

◆ ~Pool()

template<typename T , int64_t ChunkLen = 64>
blender::Pool< T, ChunkLen >::~Pool ( )
inline

Definition at line 36 of file BLI_pool.hh.

References BLI_assert, and blender::Pool< T, ChunkLen >::size().

Member Function Documentation

◆ construct()

template<typename T , int64_t ChunkLen = 64>
template<typename... ForwardT>
T & blender::Pool< T, ChunkLen >::construct ( ForwardT &&... value)
inline

◆ destruct()

template<typename T , int64_t ChunkLen = 64>
void blender::Pool< T, ChunkLen >::destruct ( T & value)
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().

◆ is_empty()

template<typename T , int64_t ChunkLen = 64>
bool blender::Pool< T, ChunkLen >::is_empty ( ) const
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().

◆ size()

template<typename T , int64_t ChunkLen = 64>
int64_t blender::Pool< T, ChunkLen >::size ( ) const
inline

The documentation for this class was generated from the following file: