Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Examples  

ost::StackPager Class Reference

The StackPager provides a repository to stash and retrieve working data in last-in-first-out order. last in first out object pager. More...

#include <misc.h>

Inheritance diagram for ost::StackPager::

ost::MemPager List of all members.

Public Methods

 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...


Detailed Description

The StackPager provides a repository to stash and retrieve working data in last-in-first-out order. last in first out object pager.

The use of a mempager to support it's operation allows storage of arbitrary sized objects with no fixed limit.

Author:
David Sugar <dyfet@ostel.com>


Constructor & Destructor Documentation

ost::StackPager::StackPager ( size_t pagesize )
 

Create a lifo pager as a mempager.

Parameters:
pagesize   for memory allocation


Member Function Documentation

void * ost::StackPager::pull ( void )
 

Retrieve next object from stack.

Returns:
object.

void ost::StackPager::purge ( void )
 

Purge the stack of all objects and memory allocations.

Reimplemented from ost::MemPager.

void * ost::StackPager::push ( const char * string )
 

Push a string onto the stack.

Returns:
stack memory location.
Parameters:
string   pointer.

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.


The documentation for this class was generated from the following file:
Generated at Sat May 12 18:59:45 2007 for GNU CommonC++ by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001