#ifndef __HeapPool_h
#define __HeapPool_h

#include "HeapBuffer.h"	// For FCHeapBuffer.

/////////////////////////////////////////////////////////////////////////////
// FCHeapPool

struct FCHeapPool
{
	FCHeapPool ();
	DWORD	GetFirstId ();
	DWORD	GetNextId (DWORD dwHeapBufferId);
	DWORD	AppendBuffer (DWORD dwDataSize);
	void	DeleteBuffer (DWORD dwHeapBufferId);
	FCHeapBuffer	GetHeapBuffer (DWORD dwHeapBufferId) const;
	DWORD	GetMemoryBufferSize () const;
	void	ChangeMemoryTypeToFileType (DWORDSet& stBufferId);

protected:
	DWORD	GetFreeId ();

protected:
	vector<BYTE>	m_vHeapTypePool;
	vector<void*>	m_vHeapPool;
	DWORD			m_dwMemoryBufferCount;
}; // struct FCHeapPool.

#endif//__HeapPool_h
