CMS 3D CMS Logo

Classes | Public Types | Public Member Functions | Private Attributes

edm::debugging_allocator< T > Class Template Reference

#include <debugging_allocator.h>

List of all members.

Classes

struct  rebind

Public Types

typedef T const * const_pointer
typedef T const & const_reference
typedef ptrdiff_t difference_type
typedef Tpointer
typedef Treference
typedef size_t size_type
typedef T value_type

Public Member Functions

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

Private Attributes

char dummy

Detailed Description

template<class T>
class edm::debugging_allocator< T >

Definition at line 26 of file debugging_allocator.h.


Member Typedef Documentation

template<class T>
typedef T const* edm::debugging_allocator< T >::const_pointer

Definition at line 32 of file debugging_allocator.h.

template<class T>
typedef T const& edm::debugging_allocator< T >::const_reference

Definition at line 34 of file debugging_allocator.h.

template<class T>
typedef ptrdiff_t edm::debugging_allocator< T >::difference_type

Definition at line 30 of file debugging_allocator.h.

template<class T>
typedef T* edm::debugging_allocator< T >::pointer

Definition at line 31 of file debugging_allocator.h.

template<class T>
typedef T& edm::debugging_allocator< T >::reference

Definition at line 33 of file debugging_allocator.h.

template<class T>
typedef size_t edm::debugging_allocator< T >::size_type

Definition at line 29 of file debugging_allocator.h.

template<class T>
typedef T edm::debugging_allocator< T >::value_type

Definition at line 35 of file debugging_allocator.h.


Constructor & Destructor Documentation

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

Definition at line 40 of file debugging_allocator.h.

: dummy('x') { }
template<class T>
edm::debugging_allocator< T >::debugging_allocator ( debugging_allocator< T > const &  ) throw () [inline]

Definition at line 42 of file debugging_allocator.h.

: dummy('c') { }
template<class T>
template<class U >
edm::debugging_allocator< T >::debugging_allocator ( debugging_allocator< U > const &  ) throw () [inline]

Definition at line 44 of file debugging_allocator.h.

: dummy('u') { }
template<class T>
edm::debugging_allocator< T >::~debugging_allocator ( ) throw () [inline]

Definition at line 46 of file debugging_allocator.h.

{ };

Member Function Documentation

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

Definition at line 48 of file debugging_allocator.h.

References relativeConstraints::value.

{return &value;}
template<class T>
const_pointer edm::debugging_allocator< T >::address ( const_reference  value) const [inline]

Definition at line 50 of file debugging_allocator.h.

References relativeConstraints::value.

{return &value; }    
template<class T>
pointer edm::debugging_allocator< T >::allocate ( size_type  num,
void const *  hint = 0 
) [inline]

Definition at line 54 of file debugging_allocator.h.

References cmsCodeRules::cppFunctionSkipper::operator.

    {
      // allocate objects with global new
      return (pointer)(::operator new(num*sizeof(T)));
    }
template<class T>
void edm::debugging_allocator< T >::construct ( pointer  p,
T const &  value 
) [inline]

Definition at line 60 of file debugging_allocator.h.

{ new((void*)p)T(value); }
template<class T>
void edm::debugging_allocator< T >::deallocate ( pointer  p,
size_type  num 
) [inline]

Definition at line 64 of file debugging_allocator.h.

References cmsCodeRules::cppFunctionSkipper::operator.

{ ::operator delete((void*)p); }
template<class T>
void edm::debugging_allocator< T >::destroy ( pointer  p) [inline]

Definition at line 62 of file debugging_allocator.h.

{ p->~T(); }
template<class T>
size_type edm::debugging_allocator< T >::max_size ( ) const throw () [inline]

Definition at line 52 of file debugging_allocator.h.

References edm::max().

{ return std::numeric_limits<size_type>::max()/sizeof(T); }

Member Data Documentation

template<class T>
char edm::debugging_allocator< T >::dummy [private]

Definition at line 67 of file debugging_allocator.h.