Unity Scopes API
CategorisedResult.h
1 /*
2  * Copyright (C) 2013 Canonical Ltd
3  *
4  * This program is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License version 3 as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * Authored by: Pawel Stolowski <pawel.stolowski@canonical.com>
17  */
18 
19 #pragma once
20 
21 #include <unity/scopes/Result.h>
22 #include <unity/scopes/Category.h>
23 
24 namespace unity
25 {
26 
27 namespace scopes
28 {
29 
30 namespace internal
31 {
32  class CategorisedResultImpl;
33  class ResultReplyObject;
34 }
35 
41 {
42 public:
44  UNITY_DEFINES_PTRS(CategorisedResult);
46 
52  explicit CategorisedResult(Category::SCPtr category);
53 
57  //{@
59  CategorisedResult& operator=(CategorisedResult const& other);
63 
68  void set_category(Category::SCPtr category);
69 
75  Category::SCPtr category() const;
76 
77 private:
78  CategorisedResult(internal::ResultImpl* impl);
79  internal::CategorisedResultImpl* fwd() const;
80 
81  friend class internal::CategorisedResultImpl;
82  friend class internal::ResultReplyObject;
83 };
84 
85 } // namespace scopes
86 
87 } // namespace unity
CategorisedResult(Category::SCPtr category)
Creates a CategorisedResult with given category, with all base attributes initially empty...
void set_category(Category::SCPtr category)
Updates the category of this result.
Definition: CategorisedResult.cpp:60
The attributes of a result returned by a Scope.
Definition: Result.h:50
Category::SCPtr category() const
Return category of this result. Get the category instance this result belongs to. ...
Definition: CategorisedResult.cpp:65
Top-level namespace for all things Unity-related.
Definition: Version.h:49
Definition: ActionMetadata.h:31
A result, including the category it belongs to.
Definition: CategorisedResult.h:40