Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

allocator_ref< Value, Allocator > Class Template Reference

Collaboration diagram for allocator_ref< Value, Allocator >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Allocator * get () const
 allocator_ref (Allocator *allocator=0)
template<typename Other>  allocator_ref (const allocator_ref< Other, Allocator > &other)
Value * allocate (size_t n)
void deallocate (void *adrs, size_t n)

Private Attributes

Allocator * allocator_

template<typename Value, typename Allocator>
class allocator_ref< Value, Allocator >


Constructor & Destructor Documentation

template<typename Value, typename Allocator>
allocator_ref< Value, Allocator >::allocator_ref Allocator *  allocator = 0  )  [inline]
 

Definition at line 208 of file test_tree.cpp.

References allocator_ref< Value, Allocator >::allocator_.

00208 : allocator_( allocator ) {}

template<typename Value, typename Allocator>
template<typename Other>
allocator_ref< Value, Allocator >::allocator_ref const allocator_ref< Other, Allocator > &  other  )  [inline]
 

Definition at line 210 of file test_tree.cpp.

References allocator_ref< Value, Allocator >::allocator_.

00210 : allocator_( other.get() ) {}


Member Function Documentation

template<typename Value, typename Allocator>
Value* allocator_ref< Value, Allocator >::allocate size_t  n  )  [inline]
 

Definition at line 211 of file test_tree.cpp.

References allocator_ref< Value, Allocator >::allocator_.

00211                                 {
00212         return reinterpret_cast< Value* >( allocator_->allocate( n ) );
00213     }

template<typename Value, typename Allocator>
void allocator_ref< Value, Allocator >::deallocate void *  adrs,
size_t  n
[inline]
 

Definition at line 214 of file test_tree.cpp.

References allocator_ref< Value, Allocator >::allocator_.

00214                                             {
00215         allocator_->deallocate( adrs, n );
00216     }

template<typename Value, typename Allocator>
Allocator* allocator_ref< Value, Allocator >::get  )  const [inline]
 

Definition at line 203 of file test_tree.cpp.

References allocator_ref< Value, Allocator >::allocator_.

00203 { return allocator_; }


Member Data Documentation

template<typename Value, typename Allocator>
Allocator* allocator_ref< Value, Allocator >::allocator_ [private]
 

Definition at line 201 of file test_tree.cpp.

Referenced by allocator_ref< Value, Allocator >::allocate(), allocator_ref< Value, Allocator >::allocator_ref(), allocator_ref< Value, Allocator >::deallocate(), and allocator_ref< Value, Allocator >::get().


The documentation for this class was generated from the following file:
Generated on Sat Nov 27 15:02:49 2004 for sapling by doxygen 1.3.6