Albert
Loading...
Searching...
No Matches
globalqueryhandler.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2024 Manuel Schneider
2// SPDX-License-Identifier: MIT
3
4#pragma once
5#include <albert/rankitem.h>
7#include <memory>
8#include <vector>
9
10namespace albert
11{
12
23{
24public:
31 virtual std::vector<RankItem> handleGlobalQuery(const Query &) = 0;
32
40 virtual std::vector<std::shared_ptr<Item>> handleEmptyQuery();
41
44 void applyUsageScore(std::vector<RankItem>*) const;
45
51 void handleTriggerQuery(Query &) override;
52
53protected:
54
56
57};
58
59}
Abstract global query handler.
Definition globalqueryhandler.h:23
virtual std::vector< RankItem > handleGlobalQuery(const Query &)=0
The query handling function.
virtual std::vector< std::shared_ptr< Item > > handleEmptyQuery()
The empty query handling function.
void handleTriggerQuery(Query &) override
Implements pure virtual handleTriggerQuery(…).
void applyUsageScore(std::vector< RankItem > *) const
Takes rank items and modifies the score according to the users usage.
Common query object.
Definition query.h:28
Abstract trigger query handler.
Definition triggerqueryhandler.h:20
Definition action.h:10