Classes | Public Types | Public Member Functions | Private Attributes | List of all members
art::debugging_allocator< T > Class Template Reference

#include "/cvmfs/nova.opensciencegrid.org/externals/art/v2_13_00/source/art/Persistency/Common/debugging_allocator.h"

Classes

struct  rebind
 

Public Types

typedef std::size_t size_type
 
typedef ptrdiff_t difference_type
 
typedef Tpointer
 
typedef T const * const_pointer
 
typedef Treference
 
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.

52  {
53  return &value;
54  }
const XML_Char int const XML_Char * value
Definition: expat.h:331
template<class T>
const_pointer art::debugging_allocator< T >::address ( const_reference  value) const
inline

Definition at line 57 of file debugging_allocator.h.

58  {
59  return &value;
60  }
const XML_Char int const XML_Char * value
Definition: expat.h:331
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.

References T.

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

Definition at line 76 of file debugging_allocator.h.

References T.

77  {
78  new ((void*)p) T(value);
79  }
const char * p
Definition: xmltok.h:285
const XML_Char int const XML_Char * value
Definition: expat.h:331
double T
Definition: Xdiff_gwt.C:5
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  }
const char * p
Definition: xmltok.h:285
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  }
const char * p
Definition: xmltok.h:285
template<class T>
size_type art::debugging_allocator< T >::max_size ( ) const
throw (
)
inline

Definition at line 63 of file debugging_allocator.h.

References cet::sqlite::max(), and T.

64  {
65  return std::numeric_limits<size_type>::max() / sizeof(T);
66  }
double T
Definition: Xdiff_gwt.C:5
T max(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:68

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: