AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | List of all members
alexaClientSDK::acsdkManufactory::Manufactory< Exports > Class Template Reference

#include <Manufactory.h>

Public Member Functions

template<typename... Subset>
std::unique_ptr< Manufactory< Subset... > > createSubsetManufactory ()
 
template<typename Type >
Type get ()
 

Static Public Member Functions

template<typename... Parameters>
static std::unique_ptr< Manufactory< Exports... > > create (const Component< Parameters... > &component)
 
template<typename... Superset>
static std::unique_ptr< Manufactory< Exports... > > createSubsetManufactory (const std::shared_ptr< Manufactory< Superset... >> &input)
 

Detailed Description

template<typename... Exports>
class alexaClientSDK::acsdkManufactory::Manufactory< Exports >

Manufactory provides a means of instantiating the interfaces provided by a Component.

Template Parameters
ExportsThe interface(s) that this Manufactory may instantiate.

Member Function Documentation

◆ create()

template<typename... Exports>
template<typename... Parameters>
std::unique_ptr< Manufactory< Exports... > > alexaClientSDK::acsdkManufactory::Manufactory< Exports >::create ( const Component< Parameters... > &  component)
inlinestatic

Create an Manufactory based upon the recipes in Component.

Note that template parameters of Manufactory and Component are used to perform compile time checks that:

  • There are no Import<Type>s in Parameters...
  • All Exports... are included in Parameters...
Template Parameters
Parametersinterfaces provided by Component.
Parameters
componentThe Component to base the Manufactory upon.
Returns
A new Manufactory or nullptr if the Component was invalid.

◆ createSubsetManufactory() [1/2]

template<typename... Exports>
template<typename... Superset>
std::unique_ptr< Manufactory< Exports... > > alexaClientSDK::acsdkManufactory::Manufactory< Exports >::createSubsetManufactory ( const std::shared_ptr< Manufactory< Superset... >> &  input)
static

Create an Manufactory that is a subset of another Manufactory.

Note that template parameters of the this requested and the input Manufactory's are used to perform a compile time check that all types in Exports... are also in Superset...

Template Parameters
Supersettypes provided by the input Manufactory.
Parameters
inputThe Manufactory from which to create a subset Manufactory.
Returns
A new Manufactory or nullptr if the Component was invalid.

◆ createSubsetManufactory() [2/2]

template<typename... Exports>
template<typename... Subset>
std::unique_ptr< Manufactory< Subset... > > alexaClientSDK::acsdkManufactory::Manufactory< Exports >::createSubsetManufactory ( )
inline

Create an Manufactory that is a subset of another Manufactory.

Note that template parameters of the this and the requested Manufactorys are used to perform a compile time check that all types in Subset... are also in Exports...

Template Parameters
Suubsettypes to be provided by the resulting subset Manufactory.
Returns
A new Manufactory or nullptr if the Component was invalid.

◆ get()

template<typename... Exports>
template<typename Type >
Type alexaClientSDK::acsdkManufactory::Manufactory< Exports >::get ( )
inline

Get an instance of the specified Type.

Template Parameters
TypeThe type to get.
Returns
The Type retrieved (or nullptr if instantiation fails).

The documentation for this class was generated from the following files:

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