home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windoware
/
WINDOWARE_1_6.iso
/
source
/
cppwin10
/
cbuffer.hpp
< prev
next >
Wrap
C/C++ Source or Header
|
1991-01-11
|
791b
|
34 lines
/***
CBuffer class header file.
***/
#ifndef CBuffer_INC
#define CBuffer_INC
typedef int (FAR PASCAL *CALLBACK)(LPVOID, LONG);
class CBuffer {
public:
// Create the list object.
CBuffer(WORD nItemSize);
// Append an item to the list.
BOOL AppendItem(LPVOID lpItem);
// Delete an item from the list.
BOOL DeleteItem(WORD Index);
// Return an item from the list.
BOOL GetItem(LPVOID lpItem, WORD Index);
// Do a function call for each item in the list.
void DoForEach(CALLBACK lpFunc, LONG lParam);
// Get the count of items.
WORD GetItemCount(void) { return ItemCount; }
private:
protected: // for later inheritance
~CBuffer() { GlobalFree(hList); }
HANDLE hList;
WORD ItemSize;
WORD ItemCount;
};
#endif