Support Forum       G3D Web Page     
Classes | Public Types | Public Member Functions | List of all members
G3D::G3DAllocator< T > Class Template Reference

Maps the G3D default allocator (System::malloc) to an std::allocator. More...

Classes

struct  rebind
 

Public Types

typedef const T * const_pointer
 
typedef const T & const_reference
 
typedef std::ptrdiff_t difference_type
 
typedef T * pointer
 
typedef T & reference
 
typedef std::size_t size_type
 
typedef T value_type
 

Public Member Functions

 G3DAllocator () throw ()
 
 G3DAllocator (const G3DAllocator &) throw ()
 
template<class U >
 G3DAllocator (const G3DAllocator< U > &) throw ()
 
 ~G3DAllocator () throw ()
 
pointer address (reference value) const
 
const_pointer address (const_reference value) const
 
pointer allocate (size_type num, const void *=0)
 
void construct (pointer p, const T &value)
 
void deallocate (pointer p, size_type num)
 
void destroy (pointer p)
 
size_type max_size () const throw ()
 

Detailed Description

template<class T>
class G3D::G3DAllocator< T >

Maps the G3D default allocator (System::malloc) to an std::allocator.

Referenced Code: Following an example from "The C++ Standard Library - A Tutorial and Reference" by Nicolai M. Josuttis, Addison-Wesley, 1999

Member Typedef Documentation

◆ const_pointer

template<class T >
typedef const T* G3D::G3DAllocator< T >::const_pointer

◆ const_reference

template<class T >
typedef const T& G3D::G3DAllocator< T >::const_reference

◆ difference_type

template<class T >
typedef std::ptrdiff_t G3D::G3DAllocator< T >::difference_type

◆ pointer

template<class T >
typedef T* G3D::G3DAllocator< T >::pointer

◆ reference

template<class T >
typedef T& G3D::G3DAllocator< T >::reference

◆ size_type

template<class T >
typedef std::size_t G3D::G3DAllocator< T >::size_type

◆ value_type

template<class T >
typedef T G3D::G3DAllocator< T >::value_type

Constructor & Destructor Documentation

◆ G3DAllocator() [1/3]

template<class T >
G3D::G3DAllocator< T >::G3DAllocator ( )
throw (
)
inline

◆ G3DAllocator() [2/3]

template<class T >
G3D::G3DAllocator< T >::G3DAllocator ( const G3DAllocator< T > &  )
throw (
)
inline

◆ G3DAllocator() [3/3]

template<class T >
template<class U >
G3D::G3DAllocator< T >::G3DAllocator ( const G3DAllocator< U > &  )
throw (
)
inline

◆ ~G3DAllocator()

template<class T >
G3D::G3DAllocator< T >::~G3DAllocator ( )
throw (
)
inline

Member Function Documentation

◆ address() [1/2]

template<class T >
pointer G3D::G3DAllocator< T >::address ( reference  value) const
inline

◆ address() [2/2]

template<class T >
const_pointer G3D::G3DAllocator< T >::address ( const_reference  value) const
inline

◆ allocate()

template<class T >
pointer G3D::G3DAllocator< T >::allocate ( size_type  num,
const void *  = 0 
)
inline

◆ construct()

template<class T >
void G3D::G3DAllocator< T >::construct ( pointer  p,
const T &  value 
)
inline

◆ deallocate()

template<class T >
void G3D::G3DAllocator< T >::deallocate ( pointer  p,
size_type  num 
)
inline

◆ destroy()

template<class T >
void G3D::G3DAllocator< T >::destroy ( pointer  p)
inline

◆ max_size()

template<class T >
size_type G3D::G3DAllocator< T >::max_size ( ) const
throw (
)
inline

documentation generated on Wed Nov 24 2021 08:01:55 using doxygen 1.8.15