C++ Client-Side SDK
LaunchDarkly SDK
|
#include <flag_change_event.hpp>
Public Member Functions | |
std::string const & | FlagName () const |
Value const & | NewValue () const |
Value const & | OldValue () const |
bool | Deleted () const |
FlagValueChangeEvent (std::string name, Value new_value, Value old_value) | |
FlagValueChangeEvent (std::string name, Value old_value) | |
A notification, for the consumer of the SDK, that a flag value has changed.
launchdarkly::client_side::flag_manager::FlagValueChangeEvent::FlagValueChangeEvent | ( | std::string | name, |
Value | new_value, | ||
Value | old_value | ||
) |
Construct a flag changed event with a new and old value.
This is a change event for a flag that has not been Deleted.
new_value | The new value. |
old_value | The old value. |
bool launchdarkly::client_side::flag_manager::FlagValueChangeEvent::Deleted | ( | ) | const |
Will be true if the flag was deleted. In which case the NewValue will be of a null type.
std::string const & launchdarkly::client_side::flag_manager::FlagValueChangeEvent::FlagName | ( | ) | const |
The name of the flag that changed.
Value const & launchdarkly::client_side::flag_manager::FlagValueChangeEvent::NewValue | ( | ) | const |
Get the new value. If there was not an new value, because the flag was deleted, then the Value will be of a null type. Check the Deleted method to see if a flag was deleted.
Value const & launchdarkly::client_side::flag_manager::FlagValueChangeEvent::OldValue | ( | ) | const |
Get the old value. If there was not an old value, for instance a newly created flag, then the Value will be of a null type.