Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
ProxyAllocator< T, Backend > Class Template Reference

Proxies allocation to another allocator. More...

#include <STLAllocators.h>

Classes

struct  rebind
 

Public Types

using value_type = T
 
using pointer = T *
 
using is_always_equal = std::false_type
 

Public Member Functions

 ProxyAllocator (Backend &alloc)
 
template<typename V >
 ProxyAllocator (const ProxyAllocator< V, Backend > &proxy)
 
Tallocate (size_t n)
 
void deallocate (T *ptr, const size_t n)
 

Private Attributes

Backend & allocator
 

Friends

template<typename A , class B >
class ProxyAllocator
 

Detailed Description

template<typename T, class Backend>
class ProxyAllocator< T, Backend >

Proxies allocation to another allocator.

This allows a single allocator to serve multiple STL containers.

Member Typedef Documentation

◆ is_always_equal

template<typename T , class Backend >
using ProxyAllocator< T, Backend >::is_always_equal = std::false_type

◆ pointer

template<typename T , class Backend >
using ProxyAllocator< T, Backend >::pointer = T*

◆ value_type

template<typename T , class Backend >
using ProxyAllocator< T, Backend >::value_type = T

Constructor & Destructor Documentation

◆ ProxyAllocator() [1/2]

template<typename T , class Backend >
ProxyAllocator< T, Backend >::ProxyAllocator ( Backend &  alloc)
inline

◆ ProxyAllocator() [2/2]

template<typename T , class Backend >
template<typename V >
ProxyAllocator< T, Backend >::ProxyAllocator ( const ProxyAllocator< V, Backend > &  proxy)
inline

Member Function Documentation

◆ allocate()

template<typename T , class Backend >
T * ProxyAllocator< T, Backend >::allocate ( size_t  n)
inline

◆ deallocate()

template<typename T , class Backend >
void ProxyAllocator< T, Backend >::deallocate ( T ptr,
const size_t  n 
)
inline

Friends And Related Function Documentation

◆ ProxyAllocator

template<typename T , class Backend >
template<typename A , class B >
friend class ProxyAllocator
friend

Member Data Documentation

◆ allocator

template<typename T , class Backend >
Backend& ProxyAllocator< T, Backend >::allocator
private

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