OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
collections.hpp
Go to the documentation of this file.
1 #ifndef COMPONENTS_FILES_COLLECTION_HPP
2 #define COMPONENTS_FILES_COLLECTION_HPP
3 
4 #include <boost/filesystem.hpp>
5 
6 #include "multidircollection.hpp"
7 
8 namespace Files
9 {
11  {
12  public:
13  Collections();
14 
16  Collections(const Files::PathContainer& directories, bool foldCase);
17 
20  const MultiDirCollection& getCollection(const std::string& extension) const;
21 
22  boost::filesystem::path getPath(const std::string& file) const;
28 
29  bool doesExist(const std::string& file) const;
31 
32  const Files::PathContainer& getPaths() const;
33 
34  private:
35  typedef std::map<std::string, MultiDirCollection> MultiDirCollectionContainer;
37 
38  bool mFoldCase;
40  };
41 }
42 
43 #endif
File collection across several directories.
Definition: multidircollection.hpp:50
MultiDirCollectionContainer mCollections
Definition: collections.hpp:39
bool mFoldCase
Definition: collections.hpp:38
boost::filesystem::path getPath(const std::string &file) const
Definition: collections.cpp:35
const MultiDirCollection & getCollection(const std::string &extension) const
Definition: collections.cpp:21
Files::PathContainer mDirectories
Definition: collections.hpp:36
const Files::PathContainer & getPaths() const
Definition: collections.cpp:81
Collections()
Directories are listed with increasing priority.
Definition: collections.cpp:7
Definition: collections.hpp:10
std::map< std::string, MultiDirCollection > MultiDirCollectionContainer
Definition: collections.hpp:35
std::vector< boost::filesystem::path > PathContainer
Definition: gamesettings.hpp:14
bool doesExist(const std::string &file) const
Definition: collections.cpp:58