Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

90 lines
2.7 KiB

  1. //-----------------------------------------------------------------------------
  2. //
  3. // File: F32Base.H
  4. // Copyright (C) 1994-1997 Microsoft Corporation
  5. // All rights reserved.
  6. //
  7. //
  8. // Declares the abstract base class C32File.
  9. //
  10. // All functions MUST be virtual since this class is passed between
  11. // Win32 parser and the sub parsers.
  12. //
  13. //-----------------------------------------------------------------------------
  14. #ifndef __F32BASE_H
  15. #define __F32BASE_H
  16. class CResObj;
  17. class C32File : public CLFile
  18. {
  19. public:
  20. C32File();
  21. C32File(CFile* pFile);
  22. virtual ~C32File();
  23. virtual FileType GetFileType() = 0;
  24. virtual void GetFileTypeDescription(CLString &) = 0;
  25. virtual BOOL OpenSource(const CFileSpec &fsSourceFile,
  26. CFileException *pExcept, CReporter *pReport = NULL) = 0;
  27. virtual BOOL OpenTarget(const CPascalString &pasFileName,
  28. CFileException *pExcept) = 0;
  29. virtual BOOL GetNextResource(CResObj * &, const CLocUniqueId* pLuid) = 0;
  30. virtual BOOL GetResource(CLocTypeId &typeId, CLocResId &resId,
  31. CLocItem * &pLocItem, DWORD &dwDataSize, void * &pv) = 0;
  32. virtual void PreWriteResource(CResObj * pResObj) = 0;
  33. virtual void PostWriteResource(CResObj * pResObj) = 0;
  34. virtual C32File* NewThis(void) = 0;
  35. virtual BOOL CloseTarget(void) = 0;
  36. virtual C32File * GetSourceFile(void) = 0;
  37. virtual LangId GetLangId(void) = 0;
  38. virtual void SetLangId(LangId langId) = 0;
  39. virtual CodePage GetCodePage(CodePageType cpType)= 0;
  40. virtual CLocItemHandler *GetHandler(void) = 0;
  41. virtual void SetHandler(CLocItemHandler * handler) = 0;
  42. virtual DBID GetMasterDBID(void) = 0;
  43. virtual void SetMasterDBID(DBID id) = 0;
  44. virtual DBID GetFileDBID(void) = 0; // to help with IssueMessage(...)
  45. virtual void SetFileDBID(DBID id) = 0;
  46. virtual BOOL GetFontInfo(Res32FontInfo* pFontInfo) = 0;
  47. //Helper functions
  48. virtual void GetNameOrd(BYTE * &pbBuffer, CLocId *plocId,
  49. BOOL bBigEnded = FALSE) = 0;
  50. virtual void GetString(BYTE * &pbbuffer, CPascalString & pasStr,
  51. BOOL bBigEnded = FALSE) = 0;
  52. virtual DWORD WriteNameOrd(const CLocId &locId,
  53. BOOL bBigEnded = FALSE) = 0;
  54. virtual UINT WriteString(const CPascalString &pstrString,
  55. BOOL bBigEnded = FALSE) = 0;
  56. virtual void SetSubData(ParserId pid, void* pData) = 0;
  57. virtual void* GetSubData(ParserId pid) = 0;
  58. virtual CFile * GetFile(void) = 0;
  59. virtual void ReportProgressIntoResource(int nProgressInBytes) = 0;
  60. enum WordOrder
  61. {
  62. bigEnded,
  63. littleEnded
  64. };
  65. virtual WordOrder GetWordOrder() = 0;
  66. virtual void NoteResourceLanguage(LangId) = 0;
  67. virtual BOOL IsLangMismatch(void) = 0;
  68. // Time release errors in enumerate or generate
  69. virtual void SetDelayedFailure(BOOL) = 0;
  70. virtual BOOL GetDelayedFailure(void) = 0;
  71. void AssertValid(void) const;
  72. };
  73. #endif //__F32BASE_H