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

#include <PromiseFuturePair.h>

Public Member Functions

 PromiseFuturePair ()
 
void setValue (Type val)
 
bool waitFor (std::chrono::milliseconds timeout)
 
Type getValue ()
 

Detailed Description

template<typename Type>
class alexaClientSDK::avsCommon::utils::PromiseFuturePair< Type >

Template to pair a promise and it's future that can store a value.

Constructor & Destructor Documentation

◆ PromiseFuturePair()

template<typename Type>
alexaClientSDK::avsCommon::utils::PromiseFuturePair< Type >::PromiseFuturePair ( )
inline

Constructor

Member Function Documentation

◆ getValue()

template<typename Type>
Type alexaClientSDK::avsCommon::utils::PromiseFuturePair< Type >::getValue ( )
inline

Retrieved the promised value.

◆ setValue()

template<typename Type>
void alexaClientSDK::avsCommon::utils::PromiseFuturePair< Type >::setValue ( Type  val)
inline

Set the value in promise.

Parameters
valThe value to be set.

◆ waitFor()

template<typename Type>
bool alexaClientSDK::avsCommon::utils::PromiseFuturePair< Type >::waitFor ( std::chrono::milliseconds  timeout)
inline

Wait for promise to be set.

Parameters
timeoutTimeout for waiting for promise to be set.
Returns
True if promise has been set before timeout, otherwise false.

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