Unity Scopes API
ChildScope.h
1 /*
2  * Copyright (C) 2014 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: Marcus Tomlinson <marcus.tomlinson@canonical.com>
17  */
18 
19 #pragma once
20 
21 #include <unity/scopes/ScopeMetadata.h>
22 
23 #include <set>
24 #include <string>
25 #include <vector>
26 
27 namespace unity
28 {
29 
30 namespace scopes
31 {
32 
33 struct ChildScope;
34 
39 typedef std::vector<ChildScope> ChildScopeList;
40 
45 struct ChildScope
46 {
54  ChildScope(std::string const& id,
55  ScopeMetadata const& metadata,
56  bool enabled = true,
57  std::set<std::string> const& keywords = {});
58 
59  std::string id;
61  bool enabled;
62  std::set<std::string> keywords;
63 };
64 
65 } // namespace scopes
66 
67 } // namespace unity
ScopeMetadata metadata
The scope metadata of this child scope.
Definition: ChildScope.h:60
A container for details about an aggregator's child scope.
Definition: ChildScope.h:45
std::set< std::string > keywords
The list of keywords used to aggregate this scope (if any).
Definition: ChildScope.h:62
Holds scope attributes such as name, description, icon etc.
Definition: ScopeMetadata.h:51
bool enabled
Whether this child scope should be aggregated.
Definition: ChildScope.h:61
Top-level namespace for all things Unity-related.
Definition: Version.h:49
std::string id
The scope id of this child scope.
Definition: ChildScope.h:59
ChildScope(std::string const &id, ScopeMetadata const &metadata, bool enabled=true, std::set< std::string > const &keywords={})
Construct a new ChildScope with the specified id, metadata, enabled state and keywords list...
Definition: ChildScope.cpp:28
std::vector< ChildScope > ChildScopeList
A list of child scopes.
Definition: ChildScope.h:33