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

array_allocator< BlockSize, NumBlock > Class Template Reference

List of all members.

Public Member Functions

int count () const
 array_allocator ()
void * allocate (size_t n)
void deallocate (void *adrs, size_t n)

Private Attributes

char array_ [BlockSize *NumBlock]
char * cur_
int count_

template<size_t BlockSize, size_t NumBlock>
class array_allocator< BlockSize, NumBlock >


Constructor & Destructor Documentation

template<size_t BlockSize, size_t NumBlock>
array_allocator< BlockSize, NumBlock >::array_allocator  )  [inline]
 

Definition at line 186 of file test_tree.cpp.

References array_allocator< BlockSize, NumBlock >::array_, array_allocator< BlockSize, NumBlock >::count_, and array_allocator< BlockSize, NumBlock >::cur_.

00186                       {
00187         cur_ = array_;
00188         count_ = 0;
00189     }


Member Function Documentation

template<size_t BlockSize, size_t NumBlock>
void* array_allocator< BlockSize, NumBlock >::allocate size_t  n  )  [inline]
 

Definition at line 190 of file test_tree.cpp.

References array_allocator< BlockSize, NumBlock >::count_, and array_allocator< BlockSize, NumBlock >::cur_.

00190                                {
00191         char* result = cur_;
00192         cur_ += BlockSize;
00193         ++count_;
00194         return cur_;
00195     }

template<size_t BlockSize, size_t NumBlock>
int array_allocator< BlockSize, NumBlock >::count  )  const [inline]
 

Definition at line 185 of file test_tree.cpp.

References array_allocator< BlockSize, NumBlock >::count_.

00185 { return count_; }

template<size_t BlockSize, size_t NumBlock>
void array_allocator< BlockSize, NumBlock >::deallocate void *  adrs,
size_t  n
[inline]
 

Definition at line 196 of file test_tree.cpp.

00196 {}


Member Data Documentation

template<size_t BlockSize, size_t NumBlock>
char array_allocator< BlockSize, NumBlock >::array_[ BlockSize * NumBlock ] [private]
 

Definition at line 181 of file test_tree.cpp.

Referenced by array_allocator< BlockSize, NumBlock >::array_allocator().

template<size_t BlockSize, size_t NumBlock>
int array_allocator< BlockSize, NumBlock >::count_ [private]
 

Definition at line 183 of file test_tree.cpp.

Referenced by array_allocator< BlockSize, NumBlock >::allocate(), array_allocator< BlockSize, NumBlock >::array_allocator(), and array_allocator< BlockSize, NumBlock >::count().

template<size_t BlockSize, size_t NumBlock>
char* array_allocator< BlockSize, NumBlock >::cur_ [private]
 

Definition at line 182 of file test_tree.cpp.

Referenced by array_allocator< BlockSize, NumBlock >::allocate(), and array_allocator< BlockSize, NumBlock >::array_allocator().


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