Public Types | |
typedef linked_pointer< ObjectPager::member > | iterator |
Convenience typedef for iterative pointer. | |
Public Member Functions | |
ObjectPager::member * | begin (void) |
Get root of pager list. | |
void | clear (void) |
Purge all members and release pager member. | |
unsigned | count (void) |
Get the number of items in the pager string list. | |
operator bool () | |
bool | operator! () |
unsigned | pages (void) |
Get the number of pages that have been allocated from the real heap. | |
size_t | size (void) |
Get the size of a memory page. | |
Protected Member Functions | |
void * | add (void) |
Add object to list. | |
void * | get (unsigned item) |
Get object from list. | |
void * | invalid (void) |
Invalid object. | |
void ** | list (void) |
Gather index list. | |
ObjectPager (size_t objsize, size_t pagesize=256) | |
void * | pop (void) |
Remove element from back of list. | |
void * | pull (void) |
Remove element from front of list. | |
void * | push (void) |
Data Structures | |
class | member |
Definition at line 243 of file memory.h.
void* ucommon::ObjectPager::add | ( | void | ) | [protected] |
Add object to list.
object | to add. |
ObjectPager::member* ucommon::ObjectPager::begin | ( | void | ) | [inline] |
void ucommon::ObjectPager::clear | ( | void | ) |
Purge all members and release pager member.
The list can then be added to again.
unsigned ucommon::ObjectPager::count | ( | void | ) | [inline] |
void* ucommon::ObjectPager::get | ( | unsigned | item | ) | [protected] |
Get object from list.
This is useful when objectpager is passed as a pointer and hence inconvenient for the [] operator.
item | to access. |
void* ucommon::ObjectPager::invalid | ( | void | ) | [protected] |
Invalid object.
..
void** ucommon::ObjectPager::list | ( | void | ) | [protected] |
unsigned ucommon::ObjectPager::pages | ( | void | ) | [inline] |
Get the number of pages that have been allocated from the real heap.
Reimplemented from ucommon::memalloc.
void* ucommon::ObjectPager::pop | ( | void | ) | [protected] |
Remove element from back of list.
Does not release memory.
Reimplemented in ucommon::listof< T, P >.
void* ucommon::ObjectPager::pull | ( | void | ) | [protected] |
Remove element from front of list.
Does not release memory.
Reimplemented in ucommon::listof< T, P >.
size_t ucommon::ObjectPager::size | ( | void | ) | [inline] |
Get the size of a memory page.
Reimplemented from ucommon::memalloc.