AlexaClientSDK  1.26.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
alexaClientSDK::avsCommon::utils::error::SuccessResult< TValue > Class Template Reference

#include <SuccessResult.h>

Inheritance diagram for alexaClientSDK::avsCommon::utils::error::SuccessResult< TValue >:
Inheritance graph
[legend]
Collaboration diagram for alexaClientSDK::avsCommon::utils::error::SuccessResult< TValue >:
Collaboration graph
[legend]

Public Member Functions

 SuccessResult (bool succeeded, TValue value)
 
bool isSucceeded ()
 
- Public Member Functions inherited from alexaClientSDK::avsCommon::utils::error::Result< bool, TValue >
 Result (bool status, TValue value)
 
 Result (bool status)
 
bool status ()
 
TValue & value ()
 

Static Public Member Functions

static SuccessResult< TValue > success (TValue value)
 
static SuccessResult< TValue > failure ()
 

Protected Member Functions

 SuccessResult (bool succeeded)
 

Detailed Description

template<typename TValue>
class alexaClientSDK::avsCommon::utils::error::SuccessResult< TValue >

Version of Result class assuming status to be either success or failure.

Template Parameters
TValueType of the value associated with the result.

Constructor & Destructor Documentation

◆ SuccessResult() [1/2]

template<typename TValue >
alexaClientSDK::avsCommon::utils::error::SuccessResult< TValue >::SuccessResult ( bool  succeeded,
TValue  value 
)
inline

Constructor with both success status and value provided.

Parameters
succeededSuccess status. True for succes, false for failure.
valueValue to be associated with the result.

◆ SuccessResult() [2/2]

template<typename TValue >
alexaClientSDK::avsCommon::utils::error::SuccessResult< TValue >::SuccessResult ( bool  succeeded)
inlineexplicitprotected

Constructor with only success status provided.

Parameters
succeededSuccess status. True for success, false for failure.

Member Function Documentation

◆ failure()

template<typename TValue >
SuccessResult< TValue > alexaClientSDK::avsCommon::utils::error::SuccessResult< TValue >::failure ( )
inlinestatic

Creates a failed result.

Returns
Failed result.

◆ isSucceeded()

template<typename TValue >
bool alexaClientSDK::avsCommon::utils::error::SuccessResult< TValue >::isSucceeded ( )
inline

Returns true if result status is succeeded, false otherwise.

Returns
True if result status is succeeded, false otherwise.

◆ success()

template<typename TValue >
SuccessResult< TValue > alexaClientSDK::avsCommon::utils::error::SuccessResult< TValue >::success ( TValue  value)
inlinestatic

Creates a succeeded result with a value.

Parameters
valueValue to be associated with the result.
Returns
Succeeded result with a value.

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

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