21 #if !defined(ZIPARCHIVE_BASELIBCOMPRESSOR_DOT_H)
22 #define ZIPARCHIVE_BASELIBCOMPRESSOR_DOT_H
28 #include "ZipExport.h"
30 #include "ZipCollections.h"
33 namespace ZipArchiveLib
54 m_bDetectLibMemoryLeaks =
true;
78 m_bDecompressionDone =
false;
102 static void* _zipalloc(
void* opaque, UINT items, UINT size)
104 void* p =
new char[size * items];
107 CZipPtrList<void*>* list = (CZipPtrList<void*>*) opaque;
122 static void _zipfree(
void* opaque,
void* address)
126 CZipPtrList<void*>* list = (CZipPtrList<void*>*) opaque;
127 CZipPtrListIter iter = list->Find(address);
128 if (list->IteratorValid(iter))
129 list->RemoveAt(iter);
131 delete[] (
char*) address;
149 virtual bool IsCodeErrorOK(
int iErr)
const = 0;
158 void CheckForError(
int iErr)
160 if (!IsCodeErrorOK(iErr))
161 ThrowError(iErr,
true);
172 void SetOpaque(
void** opaque,
const COptions* pOptions);
179 typedef CZipPtrList<void*>::iterator CZipPtrListIter;
181 #if (_MSC_VER > 1000) && (defined ZIP_HAS_DLL)
182 #pragma warning (push)
183 #pragma warning( disable : 4251 ) // needs to have dll-interface to be used by clients of class
186 CZipPtrList<void*> m_list;
188 #if (_MSC_VER > 1000) && (defined ZIP_HAS_DLL)
189 #pragma warning( pop)