]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/fs_arc.h
Don't define __STRICT_ANSI__, we should build both with and without it.
[wxWidgets.git] / include / wx / fs_arc.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: wx/fs_arc.h
3// Purpose: Archive file system
4// Author: Vaclav Slavik, Mike Wetherell
5// Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell
6// Licence: wxWindows licence
7/////////////////////////////////////////////////////////////////////////////
8
9#ifndef _WX_FS_ARC_H_
10#define _WX_FS_ARC_H_
11
12#include "wx/defs.h"
13
14#if wxUSE_FS_ARCHIVE
15
16#include "wx/filesys.h"
17#include "wx/hashmap.h"
18
19WX_DECLARE_STRING_HASH_MAP(int, wxArchiveFilenameHashMap);
20
21//---------------------------------------------------------------------------
22// wxArchiveFSHandler
23//---------------------------------------------------------------------------
24
25class WXDLLIMPEXP_BASE wxArchiveFSHandler : public wxFileSystemHandler
26{
27public:
28 wxArchiveFSHandler();
29 virtual bool CanOpen(const wxString& location);
30 virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
31 virtual wxString FindFirst(const wxString& spec, int flags = 0);
32 virtual wxString FindNext();
33 void Cleanup();
34 virtual ~wxArchiveFSHandler();
35
36private:
37 class wxArchiveFSCache *m_cache;
38 wxFileSystem m_fs;
39
40 // these vars are used by FindFirst/Next:
41 class wxArchiveFSCacheData *m_Archive;
42 struct wxArchiveFSEntry *m_FindEntry;
43 wxString m_Pattern, m_BaseDir, m_ZipFile;
44 bool m_AllowDirs, m_AllowFiles;
45 wxArchiveFilenameHashMap *m_DirsFound;
46
47 wxString DoFind();
48
49 wxDECLARE_NO_COPY_CLASS(wxArchiveFSHandler);
50 DECLARE_DYNAMIC_CLASS(wxArchiveFSHandler)
51};
52
53#endif // wxUSE_FS_ARCHIVE
54
55#endif // _WX_FS_ARC_H_