+// ----------------------------------------------------------------------------
+// wxMemoryFSHandlerBase
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_BASE wxMemoryFSHandlerBase : public wxFileSystemHandler
+{
+public:
+ wxMemoryFSHandlerBase();
+ ~wxMemoryFSHandlerBase();
+
+ // Add file to list of files stored in memory. Stored data (bitmap, text or
+ // raw data) will be copied into private memory stream and available under
+ // name "memory:" + filename
+ static void AddFile(const wxString& filename, const wxString& textdata);
+ static void AddFile(const wxString& filename, const void *binarydata, size_t size);
+
+ // Remove file from memory FS and free occupied memory
+ static void RemoveFile(const wxString& filename);
+
+ virtual bool CanOpen(const wxString& location);
+ virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
+ virtual wxString FindFirst(const wxString& spec, int flags = 0);
+ virtual wxString FindNext();
+
+protected:
+ static bool CheckHash(const wxString& filename);
+ static wxHashTable *m_Hash;
+};