Blender  V3.3
Classes | Public Types | Public Member Functions | List of all members
GuardedAllocator< T > Class Template Reference

#include <guarded_allocator.h>

Classes

struct  rebind
 

Public Types

typedef size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef Tpointer
 
typedef const Tconst_pointer
 
typedef Treference
 
typedef const Tconst_reference
 
typedef T value_type
 

Public Member Functions

 GuardedAllocator ()
 
 GuardedAllocator (const GuardedAllocator &)
 
Tallocate (size_t n, const void *hint=0)
 
void deallocate (T *p, size_t n)
 
Taddress (T &x) const
 
const Taddress (const T &x) const
 
GuardedAllocator< T > & operator= (const GuardedAllocator &)
 
size_t max_size () const
 
template<class U >
 GuardedAllocator (const GuardedAllocator< U > &)
 
template<class U >
GuardedAllocatoroperator= (const GuardedAllocator< U > &)
 
bool operator== (GuardedAllocator const &) const
 
bool operator!= (GuardedAllocator const &other) const
 

Detailed Description

template<typename T>
class GuardedAllocator< T >

Definition at line 22 of file guarded_allocator.h.

Member Typedef Documentation

◆ const_pointer

template<typename T >
typedef const T* GuardedAllocator< T >::const_pointer

Definition at line 27 of file guarded_allocator.h.

◆ const_reference

template<typename T >
typedef const T& GuardedAllocator< T >::const_reference

Definition at line 29 of file guarded_allocator.h.

◆ difference_type

template<typename T >
typedef ptrdiff_t GuardedAllocator< T >::difference_type

Definition at line 25 of file guarded_allocator.h.

◆ pointer

template<typename T >
typedef T* GuardedAllocator< T >::pointer

Definition at line 26 of file guarded_allocator.h.

◆ reference

template<typename T >
typedef T& GuardedAllocator< T >::reference

Definition at line 28 of file guarded_allocator.h.

◆ size_type

template<typename T >
typedef size_t GuardedAllocator< T >::size_type

Definition at line 24 of file guarded_allocator.h.

◆ value_type

template<typename T >
typedef T GuardedAllocator< T >::value_type

Definition at line 30 of file guarded_allocator.h.

Constructor & Destructor Documentation

◆ GuardedAllocator() [1/3]

template<typename T >
GuardedAllocator< T >::GuardedAllocator ( )
inline

Definition at line 32 of file guarded_allocator.h.

◆ GuardedAllocator() [2/3]

template<typename T >
GuardedAllocator< T >::GuardedAllocator ( const GuardedAllocator< T > &  )
inline

Definition at line 35 of file guarded_allocator.h.

◆ GuardedAllocator() [3/3]

template<typename T >
template<class U >
GuardedAllocator< T >::GuardedAllocator ( const GuardedAllocator< U > &  )
inline

Definition at line 100 of file guarded_allocator.h.

Member Function Documentation

◆ address() [1/2]

template<typename T >
const T* GuardedAllocator< T >::address ( const T x) const
inline

Definition at line 81 of file guarded_allocator.h.

References x.

◆ address() [2/2]

template<typename T >
T* GuardedAllocator< T >::address ( T x) const
inline

Definition at line 76 of file guarded_allocator.h.

References x.

◆ allocate()

template<typename T >
T* GuardedAllocator< T >::allocate ( size_t  n,
const void hint = 0 
)
inline

Definition at line 39 of file guarded_allocator.h.

References MEM_mallocN_aligned, NULL, size(), T, util_guarded_mem_alloc(), and void.

◆ deallocate()

template<typename T >
void GuardedAllocator< T >::deallocate ( T p,
size_t  n 
)
inline

Definition at line 64 of file guarded_allocator.h.

References free(), MEM_freeN, NULL, T, and util_guarded_mem_free().

◆ max_size()

template<typename T >
size_t GuardedAllocator< T >::max_size ( ) const
inline

Definition at line 91 of file guarded_allocator.h.

◆ operator!=()

template<typename T >
bool GuardedAllocator< T >::operator!= ( GuardedAllocator< T > const &  other) const
inline

Definition at line 113 of file guarded_allocator.h.

References GuardedAllocator< T >::operator==().

◆ operator=() [1/2]

template<typename T >
GuardedAllocator<T>& GuardedAllocator< T >::operator= ( const GuardedAllocator< T > &  )
inline

Definition at line 86 of file guarded_allocator.h.

◆ operator=() [2/2]

template<typename T >
template<class U >
GuardedAllocator& GuardedAllocator< T >::operator= ( const GuardedAllocator< U > &  )
inline

Definition at line 104 of file guarded_allocator.h.

◆ operator==()

template<typename T >
bool GuardedAllocator< T >::operator== ( GuardedAllocator< T > const &  ) const
inline

Definition at line 109 of file guarded_allocator.h.

Referenced by GuardedAllocator< T >::operator!=().


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