Pyrogenesis  trunk
Classes | Public Types | Public Member Functions | Private Attributes | Friends | List of all members
STLAllocator< T, Backend > Class Template Reference

Adapt a 0 A.D. 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

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

Private Attributes

std::shared_ptr< Backend > allocator
 

Friends

template<typename A , class B >
class STLAllocator
 

Detailed Description

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

Adapt a 0 A.D.

-style allocator for usage in STL containers. Use 'Backend' as an underlying allocator.

Member Typedef Documentation

◆ is_always_equal

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

◆ pointer

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

◆ value_type

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

Constructor & Destructor Documentation

◆ STLAllocator() [1/2]

template<typename T, class Backend>
STLAllocator< T, Backend >::STLAllocator ( )
inline

◆ STLAllocator() [2/2]

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

Member Function Documentation

◆ allocate()

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

◆ deallocate()

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

Friends And Related Function Documentation

◆ STLAllocator

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

Member Data Documentation

◆ allocator

template<typename T, class Backend>
std::shared_ptr<Backend> STLAllocator< T, Backend >::allocator
private

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