PLearn 0.1
|
This type represents an index into the allocated memory, as a bit-field parameterized by the template argument SizeBits. More...
#include <ArrayAllocatorIndex.h>
Public Types | |
typedef IndexBase | index_base |
typedef ArrayAllocatorIndex < IndexBase, SizeBits > | index_type |
Public Member Functions | |
ArrayAllocatorIndex (unsigned the_index, unsigned the_size=0) | |
bool | operator== (index_type other) const |
bool | operator!= (index_type other) const |
bool | isNull () const |
void | swap (index_type &other) |
Public Attributes | |
unsigned | index: 8*sizeof(IndexBase) - SizeBits |
assume that a char contains 8 bits | |
unsigned | size: SizeBits |
This type represents an index into the allocated memory, as a bit-field parameterized by the template argument SizeBits.
Definition at line 52 of file ArrayAllocatorIndex.h.
typedef IndexBase PLearn::ArrayAllocatorIndex< IndexBase, SizeBits >::index_base |
Definition at line 54 of file ArrayAllocatorIndex.h.
typedef ArrayAllocatorIndex<IndexBase,SizeBits> PLearn::ArrayAllocatorIndex< IndexBase, SizeBits >::index_type |
Definition at line 55 of file ArrayAllocatorIndex.h.
PLearn::ArrayAllocatorIndex< IndexBase, SizeBits >::ArrayAllocatorIndex | ( | unsigned | the_index, |
unsigned | the_size = 0 |
||
) | [inline] |
Definition at line 61 of file ArrayAllocatorIndex.h.
bool PLearn::ArrayAllocatorIndex< IndexBase, SizeBits >::isNull | ( | ) | const [inline] |
Definition at line 70 of file ArrayAllocatorIndex.h.
Referenced by PLearn::ArrayAllocator< T, SizeBits >::allocate(), PLearn::ArrayAllocator< T, SizeBits >::deallocate(), PLearn::ArrayAllocatorTrivial< T, SizeBits >::toPointer(), and PLearn::ArrayAllocator< T, SizeBits >::toPointer().
{ return index == 0; }
bool PLearn::ArrayAllocatorIndex< IndexBase, SizeBits >::operator!= | ( | index_type | other | ) | const [inline] |
< don't consider block size
Definition at line 67 of file ArrayAllocatorIndex.h.
{ return index != other.index; }
bool PLearn::ArrayAllocatorIndex< IndexBase, SizeBits >::operator== | ( | index_type | other | ) | const [inline] |
< don't consider block size
Definition at line 64 of file ArrayAllocatorIndex.h.
{ return index == other.index; }
void PLearn::ArrayAllocatorIndex< IndexBase, SizeBits >::swap | ( | index_type & | other | ) | [inline] |
unsigned PLearn::ArrayAllocatorIndex< IndexBase, SizeBits >::index |
assume that a char contains 8 bits
Definition at line 58 of file ArrayAllocatorIndex.h.
Referenced by PLearn::ArrayAllocator< T, SizeBits >::allocate(), PLearn::ArrayAllocator< T, SizeBits >::deallocate(), PLearn::ArrayAllocator< T, SizeBits >::derefIndex(), PLearn::ArrayAllocatorIndex< index_base, SizeBits >::operator!=(), PLearn::ArrayAllocatorIndex< index_base, SizeBits >::operator==(), PLearn::ArrayAllocatorIndex< index_base, SizeBits >::swap(), PLearn::ArrayAllocatorTrivial< T, SizeBits >::toPointer(), and PLearn::ArrayAllocator< T, SizeBits >::toPointer().
unsigned PLearn::ArrayAllocatorIndex< IndexBase, SizeBits >::size |