Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
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 #ifndef UNITY_SCOPES_CATEGORISEDRESULT_H
20 #define UNITY_SCOPES_CATEGORISEDRESULT_H
21 
22 #include <unity/scopes/Result.h>
23 #include <unity/scopes/Category.h>
24 
25 namespace unity
26 {
27 
28 namespace scopes
29 {
30 
31 namespace internal
32 {
33  class CategorisedResultImpl;
34  class ResultReplyObject;
35 }
36 
42 {
43 public:
45  UNITY_DEFINES_PTRS(CategorisedResult);
47 
53  explicit CategorisedResult(Category::SCPtr category);
54 
58  //{@
60  CategorisedResult& operator=(CategorisedResult const& other);
64 
69  void set_category(Category::SCPtr category);
70 
76  Category::SCPtr category() const;
77 
78 private:
79  CategorisedResult(internal::ResultImpl* impl);
80  internal::CategorisedResultImpl* fwd() const;
81 
82  friend class internal::CategorisedResultImpl;
83  friend class internal::ResultReplyObject;
84 };
85 
86 } // namespace scopes
87 
88 } // namespace unity
89 
90 #endif
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:51
Category::SCPtr category() const
Return category of this result. Get the category instance this result belongs to. ...
Definition: CategorisedResult.cpp:65
A result, including the category it belongs to.
Definition: CategorisedResult.h:41