Cogs.Core
Public Types | Public Member Functions | Private Attributes | List of all members
Cogs::Memory::StdAllocator< T > Class Template Reference

Public Types

using value_type = T
 
using pointer = T *
 
using size_type = size_t
 

Public Member Functions

 StdAllocator (Allocator *allocator)
 
template<typename U >
 StdAllocator (const StdAllocator< U > &other)
 
pointer allocate (size_type n)
 
void deallocate (pointer p, size_type n)
 

Private Attributes

Allocatorallocator = Allocator::defaultAllocator()
 

Detailed Description

template<typename T>
class Cogs::Memory::StdAllocator< T >

Definition at line 10 of file StdAllocator.h.

Member Typedef Documentation

◆ pointer

template<typename T >
using Cogs::Memory::StdAllocator< T >::pointer = T *

Definition at line 14 of file StdAllocator.h.

◆ size_type

template<typename T >
using Cogs::Memory::StdAllocator< T >::size_type = size_t

Definition at line 15 of file StdAllocator.h.

◆ value_type

template<typename T >
using Cogs::Memory::StdAllocator< T >::value_type = T

Definition at line 13 of file StdAllocator.h.

Constructor & Destructor Documentation

◆ StdAllocator() [1/2]

template<typename T >
Cogs::Memory::StdAllocator< T >::StdAllocator ( Allocator allocator)
inline

Definition at line 18 of file StdAllocator.h.

◆ StdAllocator() [2/2]

template<typename T >
template<typename U >
Cogs::Memory::StdAllocator< T >::StdAllocator ( const StdAllocator< U > &  other)
inline

Definition at line 21 of file StdAllocator.h.

Member Function Documentation

◆ allocate()

template<typename T >
pointer Cogs::Memory::StdAllocator< T >::allocate ( size_type  n)
inline

Definition at line 23 of file StdAllocator.h.

◆ deallocate()

template<typename T >
void Cogs::Memory::StdAllocator< T >::deallocate ( pointer  p,
size_type  n 
)
inline

Definition at line 28 of file StdAllocator.h.

Friends And Related Function Documentation

◆ StdAllocator

template<typename T >
template<typename U >
friend class StdAllocator
friend

Definition at line 36 of file StdAllocator.h.

Member Data Documentation

◆ allocator

template<typename T >
Allocator* Cogs::Memory::StdAllocator< T >::allocator = Allocator::defaultAllocator()
private

Definition at line 34 of file StdAllocator.h.


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