Added hasArchive to SearchSet.

svn-id: r34397
This commit is contained in:
Johannes Schickel 2008-09-06 22:09:34 +00:00
parent 6bfa3e274a
commit 093431e88d
2 changed files with 11 additions and 2 deletions

View File

@ -225,6 +225,10 @@ void SearchSet::remove(const String& name) {
}
}
bool SearchSet::hasArchive(const String &name) const {
return (find(name) != _list.end());
}
void SearchSet::clear() {
_list.clear();
}

View File

@ -165,15 +165,20 @@ class SearchSet : public Archive {
public:
/**
* Add a new Archive to the searchable set.
* Add a new archive to the searchable set.
*/
void add(const String& name, ArchivePtr archive, uint priority = 0);
/**
* Remove an Archive from the searchable set.
* Remove an archive from the searchable set.
*/
void remove(const String& name);
/**
* Check if a given archive name is already present.
*/
bool hasArchive(const String &name) const;
/**
* Empties the searchable set.
*/