![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AbstractRecipe.h>
Public Types | |
enum | RecipeType { FACTORY, FUNCTION, ADD_INSTANCE } |
enum | CachedInstanceLifecycle { INSTANCE, PRIMARY, RETAINED, REQUIRED, UNIQUE, UNLOADABLE } |
using | ProduceInstanceFunction = void *(*)(std::shared_ptr< AbstractRecipe > recipe, RuntimeManufactory &runtimeManufactory, void *cachedValue) |
using | DeleteInstanceFunction = void(*)(void *) |
Public Member Functions | |
virtual | ~AbstractRecipe ()=default |
virtual bool | isEquivalent (const std::shared_ptr< AbstractRecipe > &recipe) const =0 |
RecipeType | getRecipeType () const |
CachedInstanceLifecycle | getLifecycle () const |
ProduceInstanceFunction | getProduceInstanceFunction () const |
DeleteInstanceFunction | getDeleteInstanceFunction () const |
std::vector< avsCommon::utils::TypeIndex >::const_iterator | begin () const |
std::vector< avsCommon::utils::TypeIndex >::const_iterator | end () const |
Protected Attributes | |
std::vector< avsCommon::utils::TypeIndex > | m_dependencies |
Vector enumerating the dependencies of the interface this AbstractRecipe creates. More... | |
ProduceInstanceFunction | m_produceFunction |
Function pointer that can produce an instance of this type. More... | |
DeleteInstanceFunction | m_deleteFunction |
Function pointer that can delete a cached value of this type. More... | |
RecipeType | m_recipeType |
The RecipeType of this recipe. More... | |
CachedInstanceLifecycle | m_objectLifecycle |
The CachedInstanceLifecycle of a cached instance of this Type. More... | |
The abstract class for 'recipes' for creating instances.
using alexaClientSDK::acsdkManufactory::internal::AbstractRecipe::DeleteInstanceFunction = void (*)(void*) |
Alias for a function pointer that deletes an instance.
void* | The void* to the cached value, if it exists. |
using alexaClientSDK::acsdkManufactory::internal::AbstractRecipe::ProduceInstanceFunction = void* (*)(std::shared_ptr<AbstractRecipe> recipe, RuntimeManufactory& runtimeManufactory, void* cachedValue) |
Alias for a function pointer that produces an instance. Note that this function may not instantiate a new instance, depending on the lifecycle for the object and the cached value passed to this function.
recipe | The AbstractRecipe that can provide the factory or std::function for this type of instance. |
runtimeManufactory | The runtime manufactory that can provide other required instances. |
cachedValue | The previously cached instance, if it exists. For example, a type added as a retained factory may have a cached value; in that case, the cached value should be used instead of creating a new instance. |
The desired lifecycle for the instances cached in the manufactory. This is used for comparing equivalence between AbstractRecipes
.
The type of this AbstractRecipe
. This is used for comparing equivalence between AbstractRecipes
.
|
virtualdefault |
Destructor
|
inline |
Get the start of a vector enumerating the dependencies of the interface this Recipe creates.
|
inline |
Get the end of a vector enumerating the dependencies of the interface this Recipe creates.
|
inline |
Get the DeleteInstanceFunction
for producing an instance of this type.
DeleteInstanceFunction
.
|
inline |
The object lifecycle of AbstractRecipe
.
AbstractRecipe
.
|
inline |
Get the ProduceInstanceFunction
for producing an instance of this type.
ProduceInstanceFunction
.
|
inline |
The type of this instance of AbstractRecipe
.
AbstractRecipe
.
|
pure virtual |
Is this instance of AbstractRecipe
equivalent to the specified recipe.
Recipe | The Recipe to compare with. |
AbstractRecipe
equivalent to the specified recipe.
|
protected |
Function pointer that can delete a cached value of this type.
|
protected |
Vector enumerating the dependencies of the interface this AbstractRecipe
creates.
|
protected |
The CachedInstanceLifecycle
of a cached instance of this Type.
|
protected |
Function pointer that can produce an instance of this type.
|
protected |
The RecipeType
of this recipe.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0