Unity Scopes API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
FilterOption.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_FILTEROPTION_H
20 #define UNITY_SCOPES_FILTEROPTION_H
21 
22 #include <unity/util/NonCopyable.h>
23 #include <unity/util/DefinesPtrs.h>
24 #include <string>
25 #include <memory>
26 
27 namespace unity
28 {
29 
30 namespace scopes
31 {
32 
33 namespace internal
34 {
35 class FilterOptionImpl;
36 class OptionSelectorFilterImpl;
37 }
38 
42 class FilterOption final
43 {
44 public:
46  UNITY_DEFINES_PTRS(FilterOption);
47  NONCOPYABLE(FilterOption);
49 
54  std::string id() const;
55 
60  std::string label() const;
61 
63  ~FilterOption();
65 
66 private:
67  FilterOption(std::string const& id, std::string const& label);
68  std::unique_ptr<internal::FilterOptionImpl> p;
69 
70  friend class internal::OptionSelectorFilterImpl;
71 };
72 
73 } // namespace scopes
74 
75 } // namespace unity
76 
77 #endif
std::string label() const
Get the label of this filter option.
Definition: FilterOption.cpp:42
Holds definition of filter option for OptionSelectorFilter.
Definition: FilterOption.h:42
std::string id() const
Get the identifier of this filter option.
Definition: FilterOption.cpp:37