LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::debugging_allocator< T > Class Template Reference

#include "debugging_allocator.h"

Classes

struct  rebind
 

Public Types

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

Public Member Functions

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

Private Attributes

char dummy
 

Detailed Description

template<class T>
class art::debugging_allocator< T >

Definition at line 25 of file debugging_allocator.h.

Member Typedef Documentation

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

Definition at line 30 of file debugging_allocator.h.

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

Definition at line 32 of file debugging_allocator.h.

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

Definition at line 28 of file debugging_allocator.h.

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

Definition at line 29 of file debugging_allocator.h.

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

Definition at line 31 of file debugging_allocator.h.

template<class T>
typedef std::size_t art::debugging_allocator< T >::size_type

Definition at line 27 of file debugging_allocator.h.

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

Definition at line 33 of file debugging_allocator.h.

Constructor & Destructor Documentation

template<class T>
art::debugging_allocator< T >::debugging_allocator ( )
throw (
)
inline

Definition at line 40 of file debugging_allocator.h.

template<class T>
art::debugging_allocator< T >::debugging_allocator ( debugging_allocator< T > const &  )
throw (
)
inline

Definition at line 42 of file debugging_allocator.h.

template<class T>
template<class U >
art::debugging_allocator< T >::debugging_allocator ( debugging_allocator< U > const &  )
throw (
)
inline

Definition at line 45 of file debugging_allocator.h.

45  : dummy('u')
46  {}
template<class T>
art::debugging_allocator< T >::~debugging_allocator ( )
throw (
)
inline

Definition at line 48 of file debugging_allocator.h.

48 {};

Member Function Documentation

template<class T>
pointer art::debugging_allocator< T >::address ( reference  value) const
inline

Definition at line 51 of file debugging_allocator.h.

References fhicl::detail::atom::value().

52  {
53  return &value;
54  }
std::string value(boost::any const &)
template<class T>
const_pointer art::debugging_allocator< T >::address ( const_reference  value) const
inline

Definition at line 57 of file debugging_allocator.h.

References fhicl::detail::atom::value().

58  {
59  return &value;
60  }
std::string value(boost::any const &)
template<class T>
pointer art::debugging_allocator< T >::allocate ( size_type  num,
void const *  hint = 0 
)
inline

Definition at line 69 of file debugging_allocator.h.

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

Definition at line 76 of file debugging_allocator.h.

77  {
78  new ((void*)p) T(value);
79  }
std::string value(boost::any const &)
template<class T>
void art::debugging_allocator< T >::deallocate ( pointer  p,
size_type  num 
)
inline

Definition at line 88 of file debugging_allocator.h.

89  {
90  ::operator delete((void*)p);
91  }
template<class T>
void art::debugging_allocator< T >::destroy ( pointer  p)
inline

Definition at line 82 of file debugging_allocator.h.

83  {
84  p->~T();
85  }
template<class T>
size_type art::debugging_allocator< T >::max_size ( ) const
throw (
)
inline

Definition at line 63 of file debugging_allocator.h.

References max.

64  {
65  return std::numeric_limits<size_type>::max() / sizeof(T);
66  }
Int_t max
Definition: plot.C:27

Member Data Documentation

template<class T>
char art::debugging_allocator< T >::dummy
private

Definition at line 94 of file debugging_allocator.h.


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