Realm C++ SDK Version v2.2.0
Public Attributes | List of all members

realm::PropertyChange< T > Struct Template Reference

#include <notifications.hpp>

Public Attributes

std::string name
 
std::optional< typename decltype(T::schema)::variant_t > old_value
 
std::optional< typename decltype(T::schema)::variant_t > new_value
 

Detailed Description

template<typename T>
struct realm::PropertyChange< T >

Information about a specific property which changed in an realm::object change notification.

Member Data Documentation

◆ name

template<typename T >
std::string realm::PropertyChange< T >::name

The name of the property which changed.

◆ new_value

template<typename T >
std::optional<typename decltype(T::schema)::variant_t> realm::PropertyChange< T >::new_value

The value of the property after the change occurred. This is not supplied for List properties and will always be nil.

◆ old_value

template<typename T >
std::optional<typename decltype(T::schema)::variant_t> realm::PropertyChange< T >::old_value

Value of the property before the change occurred. This is not supplied if the change happened on the same thread as the notification and for List properties.

For object properties this will give the object which was previously linked to, but that object will have its new values and not the values it had before the changes. This means that previousValue may be a deleted object, and you will need to check isInvalidated before accessing any of its properties.


The documentation for this struct was generated from the following file: