Line | |
---|
1 | /*! |
---|
2 | * @file new_resource_manager.h |
---|
3 | */ |
---|
4 | |
---|
5 | #ifndef _NEW_RESOURCE_MANAGER_H |
---|
6 | #define _NEW_RESOURCE_MANAGER_H |
---|
7 | |
---|
8 | #include "resource.h" |
---|
9 | #include "filesys/file.h" |
---|
10 | #include "filesys/directory.h" |
---|
11 | |
---|
12 | class NewResourceManager : public BaseObject |
---|
13 | { |
---|
14 | ObjectListDeclaration(NewResourceManager); |
---|
15 | public: |
---|
16 | virtual ~NewResourceManager(); |
---|
17 | /** @returns a Pointer to the only object of this Class */ |
---|
18 | inline static NewResourceManager* getInstance() { if (!singletonRef) singletonRef = new NewResourceManager(); return singletonRef; }; |
---|
19 | |
---|
20 | bool tryDataDir(const std::string& dataDir); |
---|
21 | bool verifyDataDir(const std::string& fileInside); |
---|
22 | |
---|
23 | bool unloadAllByPriority(); |
---|
24 | |
---|
25 | void debug() const; |
---|
26 | |
---|
27 | // utility functions for handling files in and around the data-directory |
---|
28 | static std::string getFullName(const std::string& fileName); |
---|
29 | static bool isInDataDir(const std::string& fileName); |
---|
30 | |
---|
31 | private: |
---|
32 | NewResourceManager(); |
---|
33 | |
---|
34 | private: |
---|
35 | static NewResourceManager* singletonRef; //!< singleton Reference |
---|
36 | |
---|
37 | }; |
---|
38 | |
---|
39 | #endif /* _RESOURCE_MANAGER_H */ |
---|
Note: See
TracBrowser
for help on using the repository browser.