AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Manufactory.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 
16 #ifndef ACSDKMANUFACTORY_MANUFACTORY_H_
17 #define ACSDKMANUFACTORY_MANUFACTORY_H_
18 
19 #include <memory>
20 
23 
24 namespace alexaClientSDK {
25 namespace acsdkManufactory {
26 
32 template <typename... Exports>
33 class Manufactory {
34 public:
47  template <typename... Parameters>
48  static std::unique_ptr<Manufactory<Exports...>> create(const Component<Parameters...>& component);
49 
60  template <typename... Superset>
61  static std::unique_ptr<Manufactory<Exports...>> createSubsetManufactory(
62  const std::shared_ptr<Manufactory<Superset...>>& input);
63 
73  template <typename... Subset>
74  std::unique_ptr<Manufactory<Subset...>> createSubsetManufactory();
75 
82  template <typename Type>
83  Type get();
84 
85 private:
86  // Provide Manufactory<...> access to create(const std::shared_ptr<RuntimeManufactory>&)
87  template <typename... FriendExports>
88  friend class Manufactory;
89 
96  static std::unique_ptr<Manufactory<Exports...>> create(
97  const std::shared_ptr<internal::RuntimeManufactory>& runtimeManufactory);
98 
104  Manufactory(const internal::CookBook& cookBook);
105 
111  Manufactory(const std::shared_ptr<internal::RuntimeManufactory>& runtimeManufactory);
112 
114  std::shared_ptr<internal::RuntimeManufactory> m_runtimeManufactory;
115 };
116 
117 } // namespace acsdkManufactory
118 } // namespace alexaClientSDK
119 
120 #endif // ACSDKMANUFACTORY_MANUFACTORY_H_
121 
friend class Manufactory
Definition: Manufactory.h:88
Whether or not curl logs should be emitted.
Definition: AVSConnectionManager.h:36
static std::unique_ptr< Manufactory< Exports... > > create(const Component< Parameters... > &component)
Definition: Manufactory_imp.h:32
std::unique_ptr< Manufactory< Subset... > > createSubsetManufactory()
Definition: Manufactory_imp.h:74

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