Back to index

plt-scheme  4.2.1
Classes | Public Types | Public Member Functions
traceable_allocator< GC_Tp > Class Template Reference

#include <gc_allocator.h>

List of all members.

Classes

struct  rebind

Public Types

typedef size_t size_type
typedef ptrdiff_t difference_type
typedef GC_Tp * pointer
typedef const GC_Tp * const_pointer
typedef GC_Tp & reference
typedef const GC_Tp & const_reference
typedef GC_Tp value_type

Public Member Functions

 traceable_allocator () throw ()
 traceable_allocator (const traceable_allocator &) throw ()
template<class GC_Tp1 >
 traceable_allocator (const traceable_allocator< GC_Tp1 > &) throw ()
 ~traceable_allocator () throw ()
pointer address (reference GC_x) const
const_pointer address (const_reference GC_x) const
GC_Tp * allocate (size_type GC_n, const void *=0)
void deallocate (pointer __p, size_type GC_ATTR_UNUSED GC_n)
size_type max_size () const throw ()
void construct (pointer __p, const GC_Tp &__val)
void destroy (pointer __p)

Detailed Description

template<class GC_Tp>
class traceable_allocator< GC_Tp >

Definition at line 175 of file gc_allocator.h.


Member Typedef Documentation

template<class GC_Tp >
typedef const GC_Tp* traceable_allocator< GC_Tp >::const_pointer

Definition at line 180 of file gc_allocator.h.

template<class GC_Tp >
typedef const GC_Tp& traceable_allocator< GC_Tp >::const_reference

Definition at line 182 of file gc_allocator.h.

template<class GC_Tp >
typedef ptrdiff_t traceable_allocator< GC_Tp >::difference_type

Definition at line 178 of file gc_allocator.h.

template<class GC_Tp >
typedef GC_Tp* traceable_allocator< GC_Tp >::pointer

Definition at line 179 of file gc_allocator.h.

template<class GC_Tp >
typedef GC_Tp& traceable_allocator< GC_Tp >::reference

Definition at line 181 of file gc_allocator.h.

template<class GC_Tp >
typedef size_t traceable_allocator< GC_Tp >::size_type

Definition at line 177 of file gc_allocator.h.

template<class GC_Tp >
typedef GC_Tp traceable_allocator< GC_Tp >::value_type

Definition at line 183 of file gc_allocator.h.


Constructor & Destructor Documentation

template<class GC_Tp >
traceable_allocator< GC_Tp >::traceable_allocator ( ) throw () [inline]

Definition at line 189 of file gc_allocator.h.

{}
template<class GC_Tp >
traceable_allocator< GC_Tp >::traceable_allocator ( const traceable_allocator< GC_Tp > &  ) throw () [inline]

Definition at line 191 of file gc_allocator.h.

{}
template<class GC_Tp >
template<class GC_Tp1 >
traceable_allocator< GC_Tp >::traceable_allocator ( const traceable_allocator< GC_Tp1 > &  ) throw () [inline]

Definition at line 194 of file gc_allocator.h.

{}
template<class GC_Tp >
traceable_allocator< GC_Tp >::~traceable_allocator ( ) throw () [inline]

Definition at line 195 of file gc_allocator.h.

{}

Member Function Documentation

template<class GC_Tp >
pointer traceable_allocator< GC_Tp >::address ( reference  GC_x) const [inline]

Definition at line 197 of file gc_allocator.h.

{ return &GC_x; }
template<class GC_Tp >
const_pointer traceable_allocator< GC_Tp >::address ( const_reference  GC_x) const [inline]

Definition at line 198 of file gc_allocator.h.

{ return &GC_x; }
template<class GC_Tp >
GC_Tp* traceable_allocator< GC_Tp >::allocate ( size_type  GC_n,
const void = 0 
) [inline]

Definition at line 202 of file gc_allocator.h.

                                                   {
    return static_cast<GC_Tp*>(GC_MALLOC_UNCOLLECTABLE(GC_n * sizeof(GC_Tp)));
  }
template<class GC_Tp >
void traceable_allocator< GC_Tp >::construct ( pointer  __p,
const GC_Tp &  __val 
) [inline]

Definition at line 213 of file gc_allocator.h.

{ new(__p) GC_Tp(__val); }
template<class GC_Tp >
void traceable_allocator< GC_Tp >::deallocate ( pointer  __p,
size_type GC_ATTR_UNUSED  GC_n 
) [inline]

Definition at line 207 of file gc_allocator.h.

    { GC_FREE(__p); }
template<class GC_Tp >
void traceable_allocator< GC_Tp >::destroy ( pointer  __p) [inline]

Definition at line 214 of file gc_allocator.h.

{ __p->~GC_Tp(); }
template<class GC_Tp >
size_type traceable_allocator< GC_Tp >::max_size ( ) const throw () [inline]

Definition at line 210 of file gc_allocator.h.

    { return size_t(-1) / sizeof(GC_Tp); }

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