#include <context.hpp>
|
class | ContextBuilder |
|
std::ostream & | operator<< (std::ostream &out, Context const &context) |
|
◆ Attributes()
Attributes const & launchdarkly::Context::Attributes |
( |
std::string const & |
kind | ) |
const |
Get a set of attributes associated with a kind.
Only call this function if you have checked that the kind is present.
- Parameters
-
kind | The kind to get attributes for. |
- Returns
- The attributes if they exist.
◆ CanonicalKey()
std::string const & launchdarkly::Context::CanonicalKey |
( |
| ) |
const |
Get the canonical key for this context.
◆ errors()
std::string const& launchdarkly::Context::errors |
( |
| ) |
|
|
inline |
Get a string containing errors the context encountered during construction.
- Returns
- A string containing errors, or an empty string if there are no errors.
◆ Get()
Get an attribute value by kind and attribute reference. If the kind is not present, or the attribute not present in the kind, then Value::null() will be returned.
- Parameters
-
kind | The kind to get the value for. |
ref | The reference to the desired attribute. |
- Returns
- The attribute Value or a Value representing null.
◆ Kinds()
std::vector< std::string > const & launchdarkly::Context::Kinds |
( |
| ) |
const |
Get the kinds the context contains.
- Returns
- A vector of kinds.
◆ KindsToKeys()
std::map< std::string, std::string > const & launchdarkly::Context::KindsToKeys |
( |
| ) |
const |
Get a collection containing the kinds and their associated keys.
- Returns
- Returns a map of kinds to keys.
◆ Valid()
bool launchdarkly::Context::Valid |
( |
| ) |
const |
|
inline |
Check if a context is valid.
- Returns
- Returns true if the context is valid.
The documentation for this class was generated from the following files:
- /home/runner/work/cpp-sdks/cpp-sdks/libs/common/include/launchdarkly/context.hpp
- /home/runner/work/cpp-sdks/cpp-sdks/libs/common/src/context.cpp