C++ Client-Side SDK
LaunchDarkly SDK
|
#include <evaluation_detail.hpp>
Public Member Functions | |
EvaluationDetail (T value, std::optional< std::size_t > variation_index, std::optional< EvaluationReason > reason) | |
EvaluationDetail (enum EvaluationReason::ErrorKind error_kind, T default_value) | |
EvaluationDetail (EvaluationReason reason) | |
T const & | Value () const |
std::optional< std::size_t > | VariationIndex () const |
bool | IsError () const |
std::optional< EvaluationReason > const & | Reason () const |
T const & | operator* () const |
EvaluationDetail contains additional metadata related to a feature flag evaluation. To obtain an instance of EvaluationDetail, use a variation method suffixed with Detail, such as BoolVariationDetail.
T | The primitive variation value, which is limited to bool, int, double, std::string, and launchdarkly::Value. |
launchdarkly::EvaluationDetail< T >::EvaluationDetail | ( | T | value, |
std::optional< std::size_t > | variation_index, | ||
std::optional< EvaluationReason > | reason | ||
) |
Constructs an EvaluationDetail from results of an evaluation.
value | The variation value. |
variation_index | The variation index. |
reason | The reason for the results. |
launchdarkly::EvaluationDetail< T >::EvaluationDetail | ( | enum EvaluationReason::ErrorKind | error_kind, |
T | default_value | ||
) |
Constructs an EvaluationDetail representing an error and a default value.
error_kind | Kind of the error. |
default_value | Default value. |
launchdarkly::EvaluationDetail< T >::EvaluationDetail | ( | EvaluationReason | reason | ) |
Constructs an EvaluationDetail consisting of a reason but no value. This is used when a flag has no appropriate fallback value.
reason | The reason. |
bool launchdarkly::EvaluationDetail< T >::IsError |
T const & launchdarkly::EvaluationDetail< T >::operator* |
std::optional< EvaluationReason > const & launchdarkly::EvaluationDetail< T >::Reason |
T const & launchdarkly::EvaluationDetail< T >::Value |
std::optional< std::size_t > launchdarkly::EvaluationDetail< T >::VariationIndex |