Blender V4.3
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 23 of file guarded_allocator.h.

Member Typedef Documentation

◆ const_pointer

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

Definition at line 28 of file guarded_allocator.h.

◆ const_reference

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

Definition at line 30 of file guarded_allocator.h.

◆ difference_type

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

Definition at line 26 of file guarded_allocator.h.

◆ pointer

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

Definition at line 27 of file guarded_allocator.h.

◆ reference

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

Definition at line 29 of file guarded_allocator.h.

◆ size_type

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

Definition at line 25 of file guarded_allocator.h.

◆ value_type

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

Definition at line 31 of file guarded_allocator.h.

Constructor & Destructor Documentation

◆ GuardedAllocator() [1/3]

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

Definition at line 33 of file guarded_allocator.h.

◆ GuardedAllocator() [2/3]

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

Definition at line 34 of file guarded_allocator.h.

◆ GuardedAllocator() [3/3]

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

Definition at line 97 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 78 of file guarded_allocator.h.

References x.

◆ address() [2/2]

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

Definition at line 73 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 36 of file guarded_allocator.h.

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

◆ deallocate()

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

Definition at line 61 of file guarded_allocator.h.

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

◆ max_size()

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

Definition at line 88 of file guarded_allocator.h.

◆ operator!=()

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

Definition at line 108 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 83 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 99 of file guarded_allocator.h.

◆ operator==()

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

Definition at line 104 of file guarded_allocator.h.

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


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