C++ Server-Side SDK
LaunchDarkly SDK
|
#include <attributes.hpp>
Public Member Functions | |
std::string const & | Key () const |
std::string const & | Name () const |
bool | Anonymous () const |
Value const & | CustomAttributes () const |
AttributeReference::SetType const & | PrivateAttributes () const |
launchdarkly::Value const & | Get (launchdarkly::AttributeReference const &ref) const |
Attributes (std::string key, std::optional< std::string > name, bool anonymous, launchdarkly::Value attributes, AttributeReference::SetType private_attributes=AttributeReference::SetType()) | |
Attributes (Attributes const &context)=default | |
Attributes (Attributes &&context)=default | |
Attributes & | operator= (Attributes const &)=default |
Attributes & | operator= (Attributes &&)=default |
Friends | |
std::ostream & | operator<< (std::ostream &out, Attributes const &attrs) |
A collection of attributes that can be present within a context. A multi-context has multiple sets of attributes keyed by their "kind".
|
inline |
Construct a set of attributes. This is used internally by the SDK but is not intended to used by consumers of the SDK.
key | The key for the context. |
name | The name of the context. |
anonymous | If the context is anonymous. |
attributes | Additional attributes for the context. |
private_attributes | A list of attributes that should be private. |
bool launchdarkly::Attributes::Anonymous | ( | ) | const |
Is the context anonymous or not. Defaults to false.
Value const & launchdarkly::Attributes::CustomAttributes | ( | ) | const |
Get the custom attributes as a Value. This value is an kObject type.
|
inline |
std::string const & launchdarkly::Attributes::Key | ( | ) | const |
Get the key for the context.
std::string const & launchdarkly::Attributes::Name | ( | ) | const |
Get the name for the context.
AttributeReference::SetType const & launchdarkly::Attributes::PrivateAttributes | ( | ) | const |
Get a set of the private attributes for the context.