AlexaClientSDK  3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Static Public Member Functions | List of all members
alexaClientSDK::properties::SimpleMiscStorageUriMapper Class Reference

Generic URI mapper for MiscStorageInterface adapter. More...

#include <MiscStorageAdapter.h>

Inheritance diagram for alexaClientSDK::properties::SimpleMiscStorageUriMapper:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::properties::SimpleMiscStorageUriMapper:
Collaboration graph
[legend]

Public Member Functions

MiscStorageUriMapperInterface methods
bool extractComponentAndTableName (const std::string &configUri, std::string &componentName, std::string &tableName) noexcept override
 Extracts component name and table name from configuration URI. More...
 
- Public Member Functions inherited from alexaClientSDK::properties::MiscStorageUriMapperInterface
virtual ~MiscStorageUriMapperInterface () noexcept=default
 Default destructor. More...
 

Static Public Member Functions

static std::shared_ptr< SimpleMiscStorageUriMappercreate (char sep='/') noexcept
 Creates mapper instance. More...
 

Detailed Description

Generic URI mapper for MiscStorageInterface adapter.

This object converts configuration URI into component name and table name. The object expects that the URI contains only component name and table name separated by a single character. For example, when parsing "component/tableName" URI and using '/' as a separator, the object will return "component" as a component name, and "tableName" as a table name.

See also
createPropertiesFactory()

Member Function Documentation

◆ create()

static std::shared_ptr<SimpleMiscStorageUriMapper> alexaClientSDK::properties::SimpleMiscStorageUriMapper::create ( char  sep = '/')
staticnoexcept

Creates mapper instance.

Parameters
[in]sepSeparator character.
Returns
New object reference or nullptr on error.

◆ extractComponentAndTableName()

bool alexaClientSDK::properties::SimpleMiscStorageUriMapper::extractComponentAndTableName ( const std::string &  configUri,
std::string &  componentName,
std::string &  tableName 
)
overridevirtualnoexcept

Extracts component name and table name from configuration URI.

This method maps configuration URI from PropertiesFactoryInterface into component name and table name for MiscStorageInterface.

This method must be idempotent, and always return the same result for the same input.

Parameters
[in]configUriConfiguration URI.
[out]componentNameComponent.
[out]tableNameTable name.
Returns
True if operation succeeds. If false is returned the state of componentName and tableName is undefined.

Implements alexaClientSDK::properties::MiscStorageUriMapperInterface.


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