C++ Client-Side SDK
LaunchDarkly SDK
Public Member Functions | List of all members
launchdarkly::client_side::flag_manager::FlagValueChangeEvent Class Reference

#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)
 

Detailed Description

A notification, for the consumer of the SDK, that a flag value has changed.

Constructor & Destructor Documentation

◆ FlagValueChangeEvent()

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.

Parameters
new_valueThe new value.
old_valueThe old value.

Member Function Documentation

◆ Deleted()

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.

Returns
True if the flag was deleted.

◆ FlagName()

std::string const & launchdarkly::client_side::flag_manager::FlagValueChangeEvent::FlagName ( ) const

The name of the flag that changed.

Returns
The name of the flag.

◆ NewValue()

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.

Returns
The new value.

◆ OldValue()

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.

Returns
The new value.

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