Click on the banner to return to the Class Reference home page.

©Copyright 1996 Rogue Wave Software

RWBufferedPageHeap


RWBufferedPageHeapRWVirtualPageHeap

Synopsis

#include <rw/bufpage.h>
(Abstract base class )

Description

This is an abstract base class that represents an abstract page heap buffered through a set of memory buffers. It inherits from the abstract base class RWVirtualPageHeap, which represents an abstract page heap.

RWBufferedPageHeap will supply and maintain a set of memory buffers. Specializing classes should supply the actual physical mechanism to swap pages in and out of these buffers by supplying definitions for the pure virtual functions swapIn(RWHandle, void*) and swapOut(RWHandle, void*).

The specializing class should also supply appropriate definitions for the public functions allocate() and deallocate(RWHandle).

For a sample implementation of a specializing class, see class RWDiskPageHeap.

Persistence

None

Public Constructor

RWBufferedPageHeap(unsigned pgsize, unsigned nbufs=10);

Protected Member Functions

virtual RWBoolean
swapIn(RWHandle h, void* buf)  = 0;
virtual RWBoolean
swapOut(RWHandle, h void* buf) = 0;

Public Member Functions

virtual RWHandle
allocate() = 0;
virtual
~RWBufferedPageHeap();
RWBoolean
isValid();
virtual void
deallocate(RWHandle h);
virtual void
dirty(RWHandle h);
virtual void*
lock(RWHandle h);
virtual void
unlock(RWHandle h);