OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
filesystemarchive.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_COMPONENTS_RESOURCE_FILESYSTEMARCHIVE_H
2 #define OPENMW_COMPONENTS_RESOURCE_FILESYSTEMARCHIVE_H
3 
4 #include "archive.hpp"
5 
6 namespace VFS
7 {
8 
9  class FileSystemArchiveFile : public File
10  {
11  public:
12  FileSystemArchiveFile(const std::string& path);
13 
14  virtual Files::IStreamPtr open();
15 
16  private:
17  std::string mPath;
18 
19  };
20 
21  class FileSystemArchive : public Archive
22  {
23  public:
24  FileSystemArchive(const std::string& path);
25 
26  virtual void listResources(std::map<std::string, File*>& out, char (*normalize_function) (char));
27 
28 
29  private:
30  typedef std::map <std::string, FileSystemArchiveFile> index;
32 
34  std::string mPath;
35 
36  };
37 
38 }
39 
40 #endif
FileSystemArchiveFile(const std::string &path)
Definition: filesystemarchive.cpp:55
Definition: filesystemarchive.hpp:9
std::string mPath
Definition: filesystemarchive.hpp:34
bool mBuiltIndex
Definition: filesystemarchive.hpp:33
virtual void listResources(std::map< std::string, File * > &out, char(*normalize_function)(char))
List all resources contained in this archive, and run the resource names through the given normalize ...
Definition: filesystemarchive.cpp:15
Definition: filesystemarchive.hpp:21
Definition: archive.hpp:19
Definition: archive.hpp:11
boost::shared_ptr< std::istream > IStreamPtr
Definition: constrainedfilestream.hpp:20
virtual Files::IStreamPtr open()
Definition: filesystemarchive.cpp:60
index mIndex
Definition: filesystemarchive.hpp:31
FileSystemArchive(const std::string &path)
Definition: filesystemarchive.cpp:8
std::string mPath
Definition: filesystemarchive.hpp:17
std::map< std::string, FileSystemArchiveFile > index
Definition: filesystemarchive.hpp:30