diff options
author | Max Horn | 2008-09-27 18:32:01 +0000 |
---|---|---|
committer | Max Horn | 2008-09-27 18:32:01 +0000 |
commit | 479e67f2f27f49ae7665cd552acfb55e6192f1ae (patch) | |
tree | 006e8358e2009d7c61efcba93ae68024f113a059 /common/archive.h | |
parent | 3779fc2170d93514735b18f876f39aaf4985b9f0 (diff) | |
download | scummvm-rg350-479e67f2f27f49ae7665cd552acfb55e6192f1ae.tar.gz scummvm-rg350-479e67f2f27f49ae7665cd552acfb55e6192f1ae.tar.bz2 scummvm-rg350-479e67f2f27f49ae7665cd552acfb55e6192f1ae.zip |
Modified Common::SearchSet to take signed integer priorities, for convenience (so that one can add archives with less-than-default priority)
svn-id: r34659
Diffstat (limited to 'common/archive.h')
-rw-r--r-- | common/archive.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/common/archive.h b/common/archive.h index 89ea6a5ce2..0b94858826 100644 --- a/common/archive.h +++ b/common/archive.h @@ -153,7 +153,7 @@ public: */ class SearchSet : public Archive { struct Node { - uint _priority; + int _priority; String _name; ArchivePtr _arc; }; @@ -169,7 +169,7 @@ public: /** * Add a new archive to the searchable set. */ - void add(const String& name, ArchivePtr archive, uint priority = 0); + void add(const String& name, ArchivePtr archive, int priority = 0); /** * Remove an archive from the searchable set. @@ -184,12 +184,12 @@ public: /** * Empties the searchable set. */ - void clear(); + virtual void clear(); /** * Change the order of searches. */ - void setPriority(const String& name, uint priority); + void setPriority(const String& name, int priority); virtual bool hasFile(const String &name); virtual int matchPattern(StringList &list, const String &pattern); @@ -205,6 +205,8 @@ public: class SearchManager : public Singleton<SearchManager>, public SearchSet { public: + SearchManager(); + /** * Add an existing Archive. This is meant to support searching in system-specific * archives, namely the MACOSX/IPHONE bundles. @@ -221,6 +223,10 @@ public: */ void addDirectoryRecursive(const String &name, const String &directory, int depth = 4); + /** + * TODO + */ + virtual void clear(); }; /** Shortcut for accessing the search manager. */ |