FastFileManager.h
上传用户:wymy58
上传日期:2007-01-07
资源大小:2086k
文件大小:1k
源码类别:

DirextX编程

开发平台:

Visual C++

  1. // Copyright (C) 1998-1999 DXGuide.  All Rights Reserved.
  2. // File: FastFileManager.h
  3. #ifndef _FASTFILEMANAGER__H
  4. #define _FASTFILEMANAGER__H
  5. #if _MSC_VER >= 1000
  6. #pragma once
  7. #endif // _MSC_VER >= 1000
  8. #include "PackFileManagerBaseClass.h"
  9. struct FastFileEntry;
  10. class CFastFileManager : public CPackFileManagerBaseClass
  11. {
  12. friend class CFastFile;
  13. public:
  14. enum FastFileHeaderSignature
  15. {
  16. FASTFILE_HEADERSIG = 0x46464744L, // "DGFF"
  17. };
  18. public:
  19. CFastFileManager(void);
  20. virtual ~CFastFileManager();
  21. public:
  22. virtual bool Load(LPCTSTR  lpszName, bool  bResource);
  23. virtual DWORD GetFileEntries(void) const;
  24. virtual PackFileManagerType GetPackFileManagerType(void) const;
  25. public:
  26. virtual BYTE const* GetBuffer(CPackFileBaseClass*  pPackFile);
  27. virtual void ReleaseBuffer(void);
  28. protected:
  29. virtual bool GetFileEntryInfo(LPCTSTR  lpszName, CPackFileBaseClass*  pFileEntry) const;
  30. static int AFX_CDECL Compare(const void*  p1, const void*  p2);
  31. protected:
  32. HANDLE m_hFileMapping;
  33. HANDLE m_hFile;
  34. LPBYTE m_pBase;
  35. DWORD m_dwFileEntryCount;
  36. FastFileEntry* m_aFileEntry;
  37. };
  38. #endif // _FASTFILEMANAGER__H