ZUBaseFile.h
Upload User: sfdasf1q
Upload Date: 2021-05-08
Package Size: 99k
Code Size: 1k
Development Platform:

Visual C++

  1. // ZUBaseFile.h: interface for the CZUBaseFile class.
  2. //
  3. // Copyright (C) 2000 Tadeusz Dracz
  4. //////////////////////////////////////////////////////////////////////
  5. #if !defined(AFX_ZUBASEFILE_H__AEA985C0_D813_11D3_B7C7_8E2FB86D3347__INCLUDED_)
  6. #define AFX_ZUBASEFILE_H__AEA985C0_D813_11D3_B7C7_8E2FB86D3347__INCLUDED_
  7. #include "zlib.h"
  8. #include "ZipException.h"
  9. class CPtrList;
  10. #if _MSC_VER > 1000
  11. #pragma once
  12. #endif // _MSC_VER > 1000
  13. // base class for CUnzipFile and CZipFile
  14. class CZUBaseFile  
  15. {
  16. public:
  17. CZUBaseFile();
  18. virtual ~CZUBaseFile();
  19. // specify whether to control memory allocation and freeing by zlib library
  20. // strongly suggested to set it to true (default)
  21. bool m_bDetectZlibMemoryLeaks;
  22. protected:
  23. CPtrList m_list;
  24. void CheckForError(int err);
  25. void ThrowError(int err);
  26. static void myfree(void* opaque, void* address);
  27. static void* myalloc(void* opaque, UINT items, UINT size);
  28. bool IsClosed();
  29. CFile* m_pFile;
  30. bool m_bZipFile;
  31. };
  32. #endif // !defined(AFX_ZUBASEFILE_H__AEA985C0_D813_11D3_B7C7_8E2FB86D3347__INCLUDED_)