Unity Scopes API
|
Parameters of a search query. More...
#include <unity/scopes/CannedQuery.h>
Public Member Functions | |
CannedQuery (std::string const &scope_id) | |
Creates a query for given scope with empty query string. | |
CannedQuery (std::string const &scope_id, std::string const &query_str, std::string const &department_id) | |
Creates a query for given scope with specific query string and in given department. | |
void | set_department_id (std::string const &dep_id) |
Sets or updates the department. | |
void | set_query_string (std::string const &query_str) |
Sets or updates the query string. | |
void | set_filter_state (FilterState const &filter_state) |
Sets filter state. | |
std::string | scope_id () const |
Returns the scope identifier of this CannedQuery. More... | |
std::string | department_id () const |
Returns the department id of this CannedQuery. More... | |
std::string | query_string () const |
Returns the query string of this CannedQuery. More... | |
std::string | to_string () const |
Returns a string representation of this CannedQuery object as a URI using scope:// schema. More... | |
FilterState | filter_state () const |
Get state of the filters for this CannedQuery. More... | |
Copy and assignment | |
Copy and assignment operators (move and non-move versions) have the usual value semantics. | |
CannedQuery (CannedQuery const &other) | |
CannedQuery (CannedQuery &&) | |
CannedQuery & | operator= (CannedQuery const &other) |
CannedQuery & | operator= (CannedQuery &&) |
Static Public Member Functions | |
static CannedQuery | from_string () |
Recreates a CannedQuery object from a scope:// URI. More... | |
Parameters of a search query.
Holds all parameters of a search query: the target scope id, query string, department id, and state of the filters. Can be converted to/from scope:// uri schema string.
std::string unity::scopes::CannedQuery::department_id | ( | ) | const |
Returns the department id of this CannedQuery.
FilterState unity::scopes::CannedQuery::filter_state | ( | ) | const |
Get state of the filters for this CannedQuery.
Pass this state to methods of specific filter instances (such as unity::scopes::OptionSelectorFilter::active_options())to examine filter state.
|
static |
Recreates a CannedQuery object from a scope:// URI.
InvalidArgumentException | if the URI cannot be parsed. |
std::string unity::scopes::CannedQuery::query_string | ( | ) | const |
Returns the query string of this CannedQuery.
std::string unity::scopes::CannedQuery::scope_id | ( | ) | const |
Returns the scope identifier of this CannedQuery.
std::string unity::scopes::CannedQuery::to_string | ( | ) | const |
Returns a string representation of this CannedQuery object as a URI using scope:// schema.