AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
SettingsManagerBuilderBase.h
Go to the documentation of this file.
1 /*
2  * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License").
5  * You may not use this file except in compliance with the License.
6  * A copy of the License is located at
7  *
8  * http://aws.amazon.com/apache2.0/
9  *
10  * or in the "license" file accompanying this file. This file is distributed
11  * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12  * express or implied. See the License for the specific language governing
13  * permissions and limitations under the License.
14  */
15 #ifndef ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_SETTINGSMANAGERBUILDERBASE_H_
16 #define ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_SETTINGSMANAGERBUILDERBASE_H_
17 
18 #include <tuple>
19 
21 
24 
25 namespace alexaClientSDK {
26 namespace settings {
27 
34 template <class ManagerT>
36 
42 template <typename... SettingsT>
43 class SettingsManagerBuilderBase<settings::SettingsManager<SettingsT...>> {
44 public:
46  template <size_t index>
47  using SettingType = typename std::tuple_element<index, std::tuple<SettingsT...>>::type;
48 
50  template <size_t index>
52 
54  using SettingConfigurations = std::tuple<SettingConfiguration<SettingsT>...>;
55 
57  static constexpr size_t NUMBER_OF_SETTINGS{sizeof...(SettingsT)};
58 
64  virtual std::unique_ptr<settings::SettingsManager<SettingsT...>> build() = 0;
65 
71  const SettingConfigurations getConfigurations() const;
72 
76  virtual ~SettingsManagerBuilderBase() = default;
77 
78 protected:
81 };
82 
83 template <typename... SettingsT>
84 const std::tuple<SettingConfiguration<SettingsT>...> SettingsManagerBuilderBase<
85  SettingsManager<SettingsT...>>::getConfigurations() const {
86  return m_settingConfigs;
87 }
88 
89 } // namespace settings
90 } // namespace alexaClientSDK
91 
92 #endif // ALEXA_CLIENT_SDK_SETTINGS_INCLUDE_SETTINGS_SETTINGSMANAGERBUILDERBASE_H_
Definition: SettingsManager.h:54
typename SettingType< index >::ValueType ValueType
The setting value type kept at index position.
Definition: SettingsManagerBuilderBase.h:51
SettingConfigurations m_settingConfigs
A tuple with all setting configurations.
Definition: SettingsManagerBuilderBase.h:80
std::tuple< SettingConfiguration< SettingsT >... > SettingConfigurations
The tuple holding the settings configuration.
Definition: SettingsManagerBuilderBase.h:54
Definition: SettingsManagerBuilderBase.h:35
static int index
Mock buffer index.
Definition: AndroidSLESMediaQueueTest.cpp:70
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
typename std::tuple_element< index, std::tuple< SettingsT... > >::type SettingType
The setting type kept at index position.
Definition: SettingsManagerBuilderBase.h:47
type
Definition: upload.py:443

AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0