#include <ArrayAllocatorTrivial.h>
Collaboration diagram for PLearn::ArrayAllocatorTrivial< T, SizeBits >:
Public Types | |
typedef ArrayAllocatorTrivial< T, SizeBits > | self |
typedef T | value_type |
typedef size_t | size_type |
typedef ptrdiff_t | difference_type |
typedef T * | pointer |
typedef const T * | const_pointer |
typedef T & | reference |
typedef const T & | const_reference |
typedef unsigned | index_base |
typedef ArrayAllocatorIndex< index_base, SizeBits > | index_type |
Public Member Functions | |
ArrayAllocatorTrivial (unsigned numberObjects) | |
pointer | allocate (size_t n) |
Default copy ctor, dtor, op= Allocate N objects of type T and return a (memory) pointer to it. | |
void | deallocate (pointer p, size_type n) |
"Deallocate" pointer (no-op) | |
void | deallocate (index_type) |
void | resize (size_type newMaxObjs) |
Change the maximum number of objects. | |
size_type | max_size () const |
void | swap (self &) |
Interchange two allocators. | |
index_type | toIndex (pointer p, size_type n) |
Index/pointer conversion. | |
pointer | toPointer (index_type) |
Private Attributes | |
vector< T > | arr |
index_base | free_point |
Definition at line 60 of file ArrayAllocatorTrivial.h.
|
Definition at line 69 of file ArrayAllocatorTrivial.h. |
|
Definition at line 71 of file ArrayAllocatorTrivial.h. |
|
Definition at line 66 of file ArrayAllocatorTrivial.h. |
|
Definition at line 73 of file ArrayAllocatorTrivial.h. |
|
Definition at line 74 of file ArrayAllocatorTrivial.h. |
|
Definition at line 68 of file ArrayAllocatorTrivial.h. |
|
Definition at line 70 of file ArrayAllocatorTrivial.h. |
|
Definition at line 63 of file ArrayAllocatorTrivial.h. |
|
Definition at line 65 of file ArrayAllocatorTrivial.h. Referenced by PLearn::ArrayAllocatorTrivial< T, SizeBits >::max_size(). |
|
Definition at line 64 of file ArrayAllocatorTrivial.h. |
|
Definition at line 111 of file ArrayAllocatorTrivial.h. |
|
Default copy ctor, dtor, op= Allocate N objects of type T and return a (memory) pointer to it.
Definition at line 125 of file ArrayAllocatorTrivial.h. References PLearn::ArrayAllocatorTrivial< T, SizeBits >::arr, PLearn::ArrayAllocatorTrivial< T, SizeBits >::free_point, and PLERROR. |
|
Definition at line 85 of file ArrayAllocatorTrivial.h. |
|
"Deallocate" pointer (no-op)
Definition at line 84 of file ArrayAllocatorTrivial.h. References PLearn::ArrayAllocatorTrivial< T, SizeBits >::deallocate(). Referenced by PLearn::ArrayAllocatorTrivial< T, SizeBits >::deallocate(). |
|
Definition at line 89 of file ArrayAllocatorTrivial.h. References PLearn::ArrayAllocatorTrivial< T, SizeBits >::arr, and PLearn::ArrayAllocatorTrivial< T, SizeBits >::size_type. |
|
Change the maximum number of objects.
Definition at line 117 of file ArrayAllocatorTrivial.h. References PLearn::ArrayAllocatorTrivial< T, SizeBits >::arr, PLearn::ArrayAllocatorTrivial< T, SizeBits >::free_point, PLearn::max(), and PLearn::min(). |
|
Interchange two allocators.
Definition at line 138 of file ArrayAllocatorTrivial.h. References PLearn::ArrayAllocatorTrivial< T, SizeBits >::arr, PLearn::ArrayAllocatorTrivial< T, SizeBits >::free_point, and PLearn::swap(). |
|
Index/pointer conversion.
Definition at line 148 of file ArrayAllocatorTrivial.h. References PLearn::ArrayAllocatorTrivial< T, SizeBits >::arr. |
|
Definition at line 160 of file ArrayAllocatorTrivial.h. References PLearn::ArrayAllocatorTrivial< T, SizeBits >::arr, PLearn::ArrayAllocatorIndex< index_base, SizeBits >::index, and PLearn::ArrayAllocatorIndex< index_base, SizeBits >::isNull(). |
|
|
Definition at line 103 of file ArrayAllocatorTrivial.h. Referenced by PLearn::ArrayAllocatorTrivial< T, SizeBits >::allocate(), PLearn::ArrayAllocatorTrivial< T, SizeBits >::resize(), and PLearn::ArrayAllocatorTrivial< T, SizeBits >::swap(). |