arsa  2.7
Public Types | Public Member Functions | List of all members
Effekseer::CustomAllocator< T > Struct Template Reference

#include <Effekseer.h>

Public Types

using value_type = T
 

Public Member Functions

 CustomAllocator ()
 
template<class U >
 CustomAllocator (const CustomAllocator< U > &)
 
T * allocate (std::size_t n)
 
void deallocate (T *p, std::size_t n)
 

Detailed Description

template<class T>
struct Effekseer::CustomAllocator< T >

Definition at line 764 of file Effekseer.h.

Member Typedef Documentation

◆ value_type

template<class T >
using Effekseer::CustomAllocator< T >::value_type = T

Definition at line 766 of file Effekseer.h.

Constructor & Destructor Documentation

◆ CustomAllocator() [1/2]

template<class T >
Effekseer::CustomAllocator< T >::CustomAllocator ( )
inline

Definition at line 768 of file Effekseer.h.

768 {}

◆ CustomAllocator() [2/2]

template<class T >
template<class U >
Effekseer::CustomAllocator< T >::CustomAllocator ( const CustomAllocator< U > &  )
inline

Definition at line 770 of file Effekseer.h.

770 {}

Member Function Documentation

◆ allocate()

template<class T >
T* Effekseer::CustomAllocator< T >::allocate ( std::size_t  n)
inline

Definition at line 772 of file Effekseer.h.

772 { return reinterpret_cast<T*>(GetMallocFunc()(sizeof(T) * n)); }
GLdouble n
MallocFunc GetMallocFunc()
get an allocator

◆ deallocate()

template<class T >
void Effekseer::CustomAllocator< T >::deallocate ( T *  p,
std::size_t  n 
)
inline

Definition at line 773 of file Effekseer.h.

773 { GetFreeFunc()(p, sizeof(T) * n); }
GLdouble n
GLfloat GLfloat p
FreeFunc GetFreeFunc()
get a deallocator

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