Class sh::search::SearchManager

class sh::search::SearchManager : public QObject, public sh::base::Singleton

Manager for searches in the filesystem.

Public Functions

std::shared_ptr<sh::search::Search> requestSearch(std::shared_ptr<const sh::filesystem::Eurl> eurl, QString searchconfig, std::shared_ptr<sh::filesystem::FilesystemNode> searchrootnode)

Requests a search.

void removeSearch(std::shared_ptr<sh::search::Search> search)

Removes a search.

std::shared_ptr<sh::search::Search> findSearch(std::shared_ptr<const sh::filesystem::Eurl> eurl)

Returns the Search instance for an eurl for a search root node.

void addFactory(int index, std::shared_ptr<SearchCriterionFactory> f)

Adds a search criterion factory.

QList<std::shared_ptr<SearchCriterionFactory>> factories()

Returns the sorted list of search criterion factories.

~SearchManager()
void doShutdown()

Executes singleton shutdown.

void shutdown()

Shutdown down this singleton.

bool isAlive()

Returns if this singleton is alive (true until its shutdown begins).

Public Static Attributes

const int REGISTER_SEARCHCRITERION_INDEX_CORE = 1000000

Base value for display indexes of core (i.e. very important) search criteria.

Used in SearchManager::addFactory.

const int REGISTER_SEARCHCRITERION_INDEX_NORMAL = 2000000

Base value for display indexes of search criteria with normal importance.

Used in SearchManager::addFactory.

const int REGISTER_SEARCHCRITERION_INDEX_EXOTIC = 3000000

Base value for display indexes of exotic search criteria.

Used in SearchManager::addFactory.

Private Functions

SearchManager()

Private Members

QList<std::shared_ptr<sh::search::Search>> _searches
QList<std::weak_ptr<sh::search::Search>> _weak_searches
QMap<int, std::shared_ptr<SearchCriterionFactory>> _factories