aligned_allocator< T > Class Template Reference

stl compatible allocator to use with with 16 byte aligned types More...

#include <Memory.h>

List of all members.

Classes

struct  rebind

Public Types

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

Public Member Functions

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

Detailed Description

template<class T>
class aligned_allocator< T >

stl compatible allocator to use with with 16 byte aligned types

Example:

 // Matrix4f requires 16 bytes alignment:
 std::map< int, Matrix4f, std::less<int>, aligned_allocator<Matrix4f> > my_map_mat4;
 // Vector3f does not require 16 bytes alignment, no need to use Eigen's allocator:
 std::map< int, Vector3f > my_map_vec3;

Definition at line 340 of file Memory.h.


Member Typedef Documentation

template<class T>
typedef const T* aligned_allocator< T >::const_pointer

Definition at line 346 of file Memory.h.

template<class T>
typedef const T& aligned_allocator< T >::const_reference

Definition at line 348 of file Memory.h.

template<class T>
typedef std::ptrdiff_t aligned_allocator< T >::difference_type

Definition at line 344 of file Memory.h.

template<class T>
typedef T* aligned_allocator< T >::pointer

Definition at line 345 of file Memory.h.

template<class T>
typedef T& aligned_allocator< T >::reference

Definition at line 347 of file Memory.h.

template<class T>
typedef std::size_t aligned_allocator< T >::size_type

Definition at line 343 of file Memory.h.

template<class T>
typedef T aligned_allocator< T >::value_type

Definition at line 349 of file Memory.h.


Constructor & Destructor Documentation

template<class T>
aligned_allocator< T >::aligned_allocator (  )  throw () [inline]

Definition at line 367 of file Memory.h.

template<class T>
aligned_allocator< T >::aligned_allocator ( const aligned_allocator< T > &   )  throw () [inline]

Definition at line 371 of file Memory.h.

template<class T>
template<class U >
aligned_allocator< T >::aligned_allocator ( const aligned_allocator< U > &   )  throw () [inline]

Definition at line 376 of file Memory.h.

template<class T>
aligned_allocator< T >::~aligned_allocator (  )  throw () [inline]

Definition at line 380 of file Memory.h.


Member Function Documentation

template<class T>
const_pointer aligned_allocator< T >::address ( const_reference  value  )  const [inline]

Definition at line 362 of file Memory.h.

template<class T>
pointer aligned_allocator< T >::address ( reference  value  )  const [inline]

Definition at line 357 of file Memory.h.

template<class T>
pointer aligned_allocator< T >::allocate ( size_type  num,
const void *  hint = 0 
) [inline]

Definition at line 389 of file Memory.h.

template<class T>
void aligned_allocator< T >::construct ( pointer  p,
const T value 
) [inline]

Definition at line 395 of file Memory.h.

template<class T>
void aligned_allocator< T >::deallocate ( pointer  p,
size_type   
) [inline]

Definition at line 405 of file Memory.h.

template<class T>
void aligned_allocator< T >::destroy ( pointer  p  )  [inline]

Definition at line 400 of file Memory.h.

template<class T>
size_type aligned_allocator< T >::max_size (  )  const throw () [inline]

Definition at line 384 of file Memory.h.

template<class T>
bool aligned_allocator< T >::operator!= ( const aligned_allocator< T > &  other  )  const [inline]

Definition at line 410 of file Memory.h.

template<class T>
bool aligned_allocator< T >::operator== ( const aligned_allocator< T > &  other  )  const [inline]

Definition at line 413 of file Memory.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines


vcglib
Author(s): Christian Bersch
autogenerated on Fri Jan 11 09:21:31 2013