Unity Scopes API
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 #pragma once
20 
21 #include <unity/util/NonCopyable.h>
22 #include <unity/util/DefinesPtrs.h>
23 #include <string>
24 #include <memory>
25 
26 namespace unity
27 {
28 
29 namespace scopes
30 {
31 
32 namespace internal
33 {
34 class FilterOptionImpl;
35 class OptionSelectorFilterImpl;
36 }
37 
41 class FilterOption final
42 {
43 public:
45  UNITY_DEFINES_PTRS(FilterOption);
46  NONCOPYABLE(FilterOption);
48 
53  std::string id() const;
54 
59  std::string label() const;
60 
62  ~FilterOption();
64 
65 private:
66  FilterOption(std::string const& id, std::string const& label);
67  std::unique_ptr<internal::FilterOptionImpl> p;
68 
69  friend class internal::OptionSelectorFilterImpl;
70 };
71 
72 } // namespace scopes
73 
74 } // namespace unity
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:41
Top-level namespace for all things Unity-related.
Definition: Version.h:49
Definition: ActionMetadata.h:31
std::string id() const
Get the identifier of this filter option.
Definition: FilterOption.cpp:37