OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
resources.hpp
Go to the documentation of this file.
1 #ifndef CSM_WOLRD_RESOURCES_H
2 #define CSM_WOLRD_RESOURCES_H
3 
4 #include <string>
5 #include <map>
6 #include <vector>
7 
8 #include "universalid.hpp"
9 
10 namespace VFS
11 {
12  class Manager;
13 }
14 
15 namespace CSMWorld
16 {
17  class Resources
18  {
19  std::map<std::string, int> mIndex;
20  std::vector<std::string> mFiles;
21  std::string mBaseDirectory;
23 
24  public:
25 
27  Resources (const VFS::Manager* vfs, const std::string& baseDirectory, UniversalId::Type type,
28  const char * const *extensions = 0);
29 
30  int getSize() const;
31 
32  std::string getId (int index) const;
33 
34  int getIndex (const std::string& id) const;
35 
36  int searchId (const std::string& id) const;
37 
38  UniversalId::Type getType() const;
39  };
40 }
41 
42 #endif
int getIndex(const std::string &id) const
Definition: resources.cpp:63
Type
Definition: universalid.hpp:40
Resources(const VFS::Manager *vfs, const std::string &baseDirectory, UniversalId::Type type, const char *const *extensions=0)
Definition: resources.cpp:11
std::map< std::string, int > mIndex
Definition: resources.hpp:19
UniversalId::Type mType
Definition: resources.hpp:22
Definition: resources.hpp:17
std::vector< std::string > mFiles
Definition: resources.hpp:20
int searchId(const std::string &id) const
Definition: resources.cpp:78
UniversalId::Type getType() const
Definition: resources.cpp:92
std::string getId(int index) const
Definition: resources.cpp:58
std::string mBaseDirectory
Definition: resources.hpp:21
The main class responsible for loading files from a virtual file system.
Definition: manager.hpp:20
int getSize() const
Definition: resources.cpp:53