AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
alexaClientSDK::capabilityAgents::system::StateReportGenerator Class Reference

#include <StateReportGenerator.h>

Inheritance diagram for alexaClientSDK::capabilityAgents::system::StateReportGenerator:
Inheritance graph
[legend]

Public Types

template<class SettingsManagerT >
using SettingConfigurations = typename settings::SettingsManagerBuilderBase< SettingsManagerT >::SettingConfigurations
 

Public Member Functions

std::vector< std::string > generateReport ()
 
 StateReportGenerator ()=default
 

Static Public Member Functions

template<class SettingsManagerT >
static avsCommon::utils::Optional< StateReportGeneratorcreate (std::shared_ptr< SettingsManagerT > settingManager, const SettingConfigurations< SettingsManagerT > &configurations)
 

Protected Member Functions

 StateReportGenerator (const std::vector< std::function< std::string()>> &reportFunctions)
 

Detailed Description

This class is responsible for generating a state report for every setting available in a given SettingsManager.

Note
This class is not thread safe.

Member Typedef Documentation

◆ SettingConfigurations

Alias for the SettingsConfigurations of a given SettingsManager.

Template Parameters
SettingsManagerTThe target settings manager type.

Constructor & Destructor Documentation

◆ StateReportGenerator() [1/2]

alexaClientSDK::capabilityAgents::system::StateReportGenerator::StateReportGenerator ( )
default

Default constructor. This should only be used by optional.

◆ StateReportGenerator() [2/2]

alexaClientSDK::capabilityAgents::system::StateReportGenerator::StateReportGenerator ( const std::vector< std::function< std::string()>> &  reportFunctions)
explicitprotected

Constructor (protected for unit tests).

Parameters
reportFunctionsThe collection of report functions used to generate the entire report.

Member Function Documentation

◆ create()

template<class SettingsManagerT >
avsCommon::utils::Optional< StateReportGenerator > alexaClientSDK::capabilityAgents::system::StateReportGenerator::create ( std::shared_ptr< SettingsManagerT >  settingManager,
const SettingConfigurations< SettingsManagerT > &  configurations 
)
static

Create a StateReportGenerator for the given manager with the provided configurations.

Template Parameters
SettingsManagerTThe type of the SettingManager.
Parameters
settingManagerThe manager that exposes the setting states.
configurationsThe configurations which hold the metadata to generate the report.
Returns
An optional with a valid StateReportGenerator if it succeeds; an empty optional otherwise.

◆ generateReport()

std::vector<std::string> alexaClientSDK::capabilityAgents::system::StateReportGenerator::generateReport ( )

Generate a report for each setting.

Returns
The generated reports.

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

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