test: CBufferAllocator class Reference

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# CBufferAllocator Class Reference

`#include <propvar.h>`

List of all members.

## Public Member Functions

| CBufferAllocator (ULONG cbBuffer, VOID *pvBuffer)
VOID * | Allocate (ULONG cbSize)
VOID | Free (VOID *pv)
ULONG | GetFreeSize (VOID)

## Private Attributes

ULONG | _cbFree
VOID * | _pvCur
VOID * | _pvBuffer

## Constructor & Destructor Documentation

CBufferAllocator::CBufferAllocator | ( | ULONG | cbBuffer,
|  | VOID * | pvBuffer
| ) | `[inline]`

Definition at line 220 of file propvar.h.

References _cbFree, _pvBuffer, _pvCur, and PROPASSERT.

    00221     {
    00222         _cbFree = cbBuffer;
    00223         _pvCur = _pvBuffer = pvBuffer;
    00224 #if _X86_       // stack variables on x86 are not aligned
    00225         PROPASSERT(((ULONG) _pvCur & (sizeof(LONG) - 1)) == 0);
    00226 #else // RISC
    00227         PROPASSERT(((ULONG_PTR) _pvCur & (sizeof(LONGLONG) - 1)) == 0);
    00228 #endif // X86/RISC
    00229     }

## Member Function Documentation

VOID* CBufferAllocator::Allocate | ( | ULONG | cbSize | ) |

VOID CBufferAllocator::Free | ( | VOID * | pv | ) | `[inline]`

Definition at line 232 of file propvar.h.

References Free(), and VOID().

Referenced by Free().

    00232 { }

ULONG CBufferAllocator::GetFreeSize | ( | VOID |  | ) | `[inline]`

Definition at line 234 of file propvar.h.

References _cbFree, and GetFreeSize().

Referenced by GetFreeSize().

    00234 { return(_cbFree); }

## Member Data Documentation

ULONG CBufferAllocator::_cbFree`[private]`

| Definition at line 237 of file propvar.h. Referenced by CBufferAllocator(), and GetFreeSize().

VOID* CBufferAllocator::_pvBuffer`[private]`

| Definition at line 239 of file propvar.h. Referenced by CBufferAllocator().

VOID* CBufferAllocator::_pvCur`[private]`

| Definition at line 238 of file propvar.h. Referenced by CBufferAllocator().

The documentation for this class was generated from the following file:

- propvar.h