FastFileManager.h
资源名称:DXGuide.zip [点击查看]
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:1k
源码类别:
DirextX编程
开发平台:
Visual C++
- // Copyright (C) 1998-1999 DXGuide. All Rights Reserved.
- // File: FastFileManager.h
- #ifndef _FASTFILEMANAGER__H
- #define _FASTFILEMANAGER__H
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- #include "PackFileManagerBaseClass.h"
- struct FastFileEntry;
- class CFastFileManager : public CPackFileManagerBaseClass
- {
- friend class CFastFile;
- public:
- enum FastFileHeaderSignature
- {
- FASTFILE_HEADERSIG = 0x46464744L, // "DGFF"
- };
- public:
- CFastFileManager(void);
- virtual ~CFastFileManager();
- public:
- virtual bool Load(LPCTSTR lpszName, bool bResource);
- virtual DWORD GetFileEntries(void) const;
- virtual PackFileManagerType GetPackFileManagerType(void) const;
- public:
- virtual BYTE const* GetBuffer(CPackFileBaseClass* pPackFile);
- virtual void ReleaseBuffer(void);
- protected:
- virtual bool GetFileEntryInfo(LPCTSTR lpszName, CPackFileBaseClass* pFileEntry) const;
- static int AFX_CDECL Compare(const void* p1, const void* p2);
- protected:
- HANDLE m_hFileMapping;
- HANDLE m_hFile;
- LPBYTE m_pBase;
- DWORD m_dwFileEntryCount;
- FastFileEntry* m_aFileEntry;
- };
- #endif // _FASTFILEMANAGER__H