yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::gfx::PoolAllocator< T > Class Template Reference

RAII wrapper for memory pool allocations. More...

#include <memory_pool.h>

Public Types

using value_type = T
 
using pointer = T *
 
using const_pointer = const T *
 
using reference = T &
 
using const_reference = const T &
 
using size_type = std::size_t
 
using difference_type = std::ptrdiff_t
 

Public Member Functions

 PoolAllocator ()=default
 
template<typename U >
 PoolAllocator (const PoolAllocator< U > &)
 
pointer allocate (size_type n)
 
void deallocate (pointer p, size_type)
 
template<typename U >
bool operator== (const PoolAllocator< U > &) const
 
template<typename U >
bool operator!= (const PoolAllocator< U > &) const
 

Detailed Description

template<typename T>
class yaze::gfx::PoolAllocator< T >

RAII wrapper for memory pool allocations.

Template Parameters
TType of object to allocate

Definition at line 128 of file memory_pool.h.

Member Typedef Documentation

◆ value_type

template<typename T >
using yaze::gfx::PoolAllocator< T >::value_type = T

Definition at line 130 of file memory_pool.h.

◆ pointer

template<typename T >
using yaze::gfx::PoolAllocator< T >::pointer = T*

Definition at line 131 of file memory_pool.h.

◆ const_pointer

template<typename T >
using yaze::gfx::PoolAllocator< T >::const_pointer = const T*

Definition at line 132 of file memory_pool.h.

◆ reference

template<typename T >
using yaze::gfx::PoolAllocator< T >::reference = T&

Definition at line 133 of file memory_pool.h.

◆ const_reference

template<typename T >
using yaze::gfx::PoolAllocator< T >::const_reference = const T&

Definition at line 134 of file memory_pool.h.

◆ size_type

template<typename T >
using yaze::gfx::PoolAllocator< T >::size_type = std::size_t

Definition at line 135 of file memory_pool.h.

◆ difference_type

template<typename T >
using yaze::gfx::PoolAllocator< T >::difference_type = std::ptrdiff_t

Definition at line 136 of file memory_pool.h.

Constructor & Destructor Documentation

◆ PoolAllocator() [1/2]

template<typename T >
yaze::gfx::PoolAllocator< T >::PoolAllocator ( )
default

◆ PoolAllocator() [2/2]

template<typename T >
template<typename U >
yaze::gfx::PoolAllocator< T >::PoolAllocator ( const PoolAllocator< U > &  )
inline

Definition at line 140 of file memory_pool.h.

Member Function Documentation

◆ allocate()

template<typename T >
pointer yaze::gfx::PoolAllocator< T >::allocate ( size_type  n)
inline

Definition at line 142 of file memory_pool.h.

References yaze::gfx::MemoryPool::Allocate(), and yaze::gfx::MemoryPool::Get().

Here is the call graph for this function:

◆ deallocate()

template<typename T >
void yaze::gfx::PoolAllocator< T >::deallocate ( pointer  p,
size_type   
)
inline

Definition at line 146 of file memory_pool.h.

References yaze::gfx::MemoryPool::Deallocate(), and yaze::gfx::MemoryPool::Get().

Here is the call graph for this function:

◆ operator==()

template<typename T >
template<typename U >
bool yaze::gfx::PoolAllocator< T >::operator== ( const PoolAllocator< U > &  ) const
inline

Definition at line 149 of file memory_pool.h.

◆ operator!=()

template<typename T >
template<typename U >
bool yaze::gfx::PoolAllocator< T >::operator!= ( const PoolAllocator< U > &  ) const
inline

Definition at line 154 of file memory_pool.h.


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