#pragma once

// CBlockDirectory command target

class CBlockItem;

class CBlockDirectory : public CObject
{
	DECLARE_SERIAL(CBlockDirectory);
private:
	CMapStringToOb m_mapDirContent;
	CObList m_listItemContent;
public:
	CBlockDirectory();
	virtual ~CBlockDirectory();
	BOOL InsertBlock(CString strPath, CBlockItem *pItem);
	HANDLE FindFirstDir(CString &strKey, CBlockDirectory*& prDir);
	BOOL FindNextDir(HANDLE hFind, CString &strKey, CBlockDirectory*& prDir);
	BOOL FindClose(HANDLE hFind);

	HANDLE FindFirstItem(CBlockItem*& rpItem);
	BOOL FindNextItem(HANDLE hFind, CBlockItem*& rpItem);

	BOOL Lookup(const CString &strKey, CBlockDirectory*& prDir);
};


