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

#include <Component.h>

Public Member Functions

 ComponentAccumulator ()
 
template<typename... RhsParameters>
 ComponentAccumulator (const ComponentAccumulator< RhsParameters... > &componentAccumulator)
 
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > addUniqueFactory (Type(*factory)(Dependencies...))
 
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > addPrimaryFactory (std::function< Type(Dependencies...)> factory)
 
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > addPrimaryFactory (Type(*factory)(Dependencies...))
 
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > addRequiredFactory (std::function< Type(Dependencies...)> factory)
 
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > addRequiredFactory (Type(*factory)(Dependencies...))
 
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > addRetainedFactory (std::function< Type(Dependencies...)> factory)
 
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > addRetainedFactory (Type(*factory)(Dependencies...))
 
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > addUnloadableFactory (std::function< Type(Dependencies...)> factory)
 
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > addUnloadableFactory (Type(*factory)(Dependencies...))
 
template<typename Type >
ComponentAccumulator< Type, Parameters... > addInstance (Type instance)
 
template<typename Type >
ComponentAccumulator< internal::MakeOptional< Type >, Parameters... > makeImportOptional ()
 
template<typename... SubComponentParameters>
ComponentAccumulator< SubComponentParameters..., Parameters... > addComponent (const Component< SubComponentParameters... > &component)
 

Detailed Description

template<typename... Parameters>
class alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >

ComponentAccumulator is a builder style helper class that is used to accumulate the set of types that will be exported and imported by a component as well as how instances of exported types will be provided.

Template Parameters
ParametersThe types potentially exported by the accumulating component as well as any types required by the accumulating component (tagged via Import<Type>).

Constructor & Destructor Documentation

◆ ComponentAccumulator() [1/2]

Create an ComponentAccumulator with no exports or imports.

◆ ComponentAccumulator() [2/2]

template<typename... Parameters>
template<typename... RhsParameters>
alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::ComponentAccumulator ( const ComponentAccumulator< RhsParameters... > &  componentAccumulator)
inline

Copy constructor.

Template Parameters
RhsParametersThe exports and imports of the source and result ComponentAccumulator.
Parameters
componentAccumulatorThe ComponentAccumulator to copy.

Member Function Documentation

◆ addComponent()

template<typename... Parameters>
template<typename... SubComponentParameters>
ComponentAccumulator< SubComponentParameters..., Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addComponent ( const Component< SubComponentParameters... > &  component)
inline

Add the declarations from a Component to this ComponentAccumulator.

Template Parameters
SubComponentParametersThe Parameters... defining the type of Component whose declarations are to be added.
Parameters
componentThe Componment whose declarations are to be added.
Returns
Return a new ComponentAccumulator whose type includes the additional exports and imports.

◆ addInstance()

template<typename... Parameters>
template<typename Type >
ComponentAccumulator< Type, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addInstance ( Type  instance)
inline

Declare an specific instance as the source of instances of Type.

Template Parameters
TypeThe type for which an instance is being specified
Parameters
instanceThe instance that will be used to satisfy requests for the type Type.
Returns
Return a new ComponentAccumulator whose type includes the additional exports

◆ addPrimaryFactory() [1/2]

template<typename... Parameters>
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addPrimaryFactory ( std::function< Type(Dependencies...)>  factory)
inline

Add a factory that returns a pointer (std::shared_ptr<> or Annotated<>) to a primary value (i.e. a value that must instantiated before all others).

Template Parameters
TypeThe full type (including std::shared_ptr<> or Annotated<>) returned by the factory.
DependenciesThe dependencies (arguments) of the factory to be added.
Parameters
factoryThe factory to be added.
Returns
This ComponentAccumulator.

◆ addPrimaryFactory() [2/2]

template<typename... Parameters>
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addPrimaryFactory ( Type(*)(Dependencies...)  factory)
inline

Add a factory that returns a pointer (std::shared_ptr<> or Annotated<>) to a primary value (i.e. a value that must instantiated before all others).

Template Parameters
TypeThe full type (including std::shared_ptr<> or Annotated<>) returned by the factory.
DependenciesThe dependencies (arguments) of the factory to be added.
Parameters
factoryThe factory to be added.
Returns
This ComponentAccumulator.

◆ addRequiredFactory() [1/2]

template<typename... Parameters>
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addRequiredFactory ( std::function< Type(Dependencies...)>  factory)
inline

Add a factory that returns a pointer (std::shared_ptr<> or Annotated<>) to a required value (i.e. a value that must always be instantiated).

Template Parameters
TypeThe full type (including std::shared_ptr<> or Annotated<>) returned by the factory.
DependenciesThe dependencies (arguments) of the factory to be added.
Parameters
factoryThe factory to be added.
Returns
This ComponentAccumulator.

◆ addRequiredFactory() [2/2]

template<typename... Parameters>
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addRequiredFactory ( Type(*)(Dependencies...)  factory)
inline

Add a factory that returns a pointer (std::shared_ptr<> or Annotated<>) to a required value (i.e. a value that must always be instantiated).

Template Parameters
TypeThe full type (including std::shared_ptr<> or Annotated<>) returned by the factory.
DependenciesThe dependencies (arguments) of the factory to be added.
Parameters
factoryThe factory to be added.
Returns
This ComponentAccumulator.

◆ addRetainedFactory() [1/2]

template<typename... Parameters>
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addRetainedFactory ( std::function< Type(Dependencies...)>  factory)
inline

Add a factory that returns a pointer (std::shared_ptr<> or Annotated<>) to a retained value (i.e. a value that must retained once instantiated).

Template Parameters
TypeThe full type (including std::shared_ptr<> or Annotated<>) returned by the factory.
DependenciesThe dependencies (arguments) of the factory to be added.
Parameters
factoryThe factory to be added.
Returns
This ComponentAccumulator.

◆ addRetainedFactory() [2/2]

template<typename... Parameters>
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addRetainedFactory ( Type(*)(Dependencies...)  factory)
inline

Add a factory that returns a pointer (std::shared_ptr<> or Annotated<>) to a retained value (i.e. a value that must retained once instantiated).

Template Parameters
TypeThe full type (including std::shared_ptr<> or Annotated<>) returned by the factory.
DependenciesThe dependencies (arguments) of the factory to be added.
Parameters
factoryThe factory to be added.
Returns
This ComponentAccumulator.

◆ addUniqueFactory()

template<typename... Parameters>
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addUniqueFactory ( Type(*)(Dependencies...)  factory)
inline

Add a factory that returns a std::unique_ptr value.

Template Parameters
TypeThe full type (including std::unique_ptr<>) returned by the factory.
DependenciesThe dependencies (arguments) of the factory to be added.
Parameters
factoryThe factory to be added.
Returns
This ComponentAccumulator.

◆ addUnloadableFactory() [1/2]

template<typename... Parameters>
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addUnloadableFactory ( std::function< Type(Dependencies...)>  factory)
inline

Add a factory that returns a pointer (std::shared_ptr<> or Annotated<>) to an unloadable value (i.e. a value that may be released when all references to it are cleared).

Template Parameters
TypeThe full type (including std::shared_ptr<> or Annotated<>) returned by the factory.
DependenciesThe dependencies (arguments) of the factory to be added.
Parameters
factoryThe factory to be added.
Returns
This ComponentAccumulator.

◆ addUnloadableFactory() [2/2]

template<typename... Parameters>
template<typename Type , typename... Dependencies>
ComponentAccumulator< Import< internal::RemoveCvref_t< Dependencies > >..., Type, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::addUnloadableFactory ( Type(*)(Dependencies...)  factory)
inline

Add a factory that returns a pointer (std::shared_ptr<> or Annotated<>) to an unloadable value (i.e. a value that may be released when all references to it are cleared).

Template Parameters
TypeThe full type (including std::shared_ptr<> or Annotated<>) returned by the factory.
DependenciesThe dependencies (arguments) of the factory to be added.
Parameters
factoryThe factory to be added.
Returns
This ComponentAccumulator.

◆ makeImportOptional()

template<typename... Parameters>
template<typename Type >
ComponentAccumulator< internal::MakeOptional< Type >, Parameters... > alexaClientSDK::acsdkManufactory::ComponentAccumulator< Parameters >::makeImportOptional ( )
inline

Make an import optional for this component accumulator.

Template Parameters
TypeThe type that will be marked as optional.
Returns
Return a new ComponentAccumulator whose type includes the additional exports

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

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