The StackPager provides a repository to stash and retrieve working data in last-in-first-out order.
More...
#include <misc.h>
|
| StackPager (size_t pagesize) |
| Create a lifo pager as a mempager. More...
|
|
void * | push (const void *object, size_t size) |
| Push an arbitrary object onto the stack. More...
|
|
void * | push (const char *string) |
| Push a string onto the stack. More...
|
|
void * | pull (void) |
| Retrieve next object from stack. More...
|
|
void | purge (void) |
| Purge the stack of all objects and memory allocations. More...
|
|
The StackPager provides a repository to stash and retrieve working data in last-in-first-out order.
The use of a mempager to support it's operation allows storage of arbitrary sized objects with no fixed limit.
- Author
- David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m last in first out object pager.
◆ StackPager()
ost::StackPager::StackPager |
( |
size_t |
pagesize | ) |
|
Create a lifo pager as a mempager.
- Parameters
-
pagesize | for memory allocation |
◆ pull()
void* ost::StackPager::pull |
( |
void |
| ) |
|
Retrieve next object from stack.
- Returns
- object.
◆ purge()
void ost::StackPager::purge |
( |
void |
| ) |
|
Purge the stack of all objects and memory allocations.
◆ push() [1/2]
void* ost::StackPager::push |
( |
const void * |
object, |
|
|
size_t |
size |
|
) |
| |
Push an arbitrary object onto the stack.
- Returns
- stack memory location.
- Parameters
-
object | pointer to data |
size | of data. |
◆ push() [2/2]
void* ost::StackPager::push |
( |
const char * |
string | ) |
|
Push a string onto the stack.
- Returns
- stack memory location.
- Parameters
-
The documentation for this class was generated from the following file: