MCRO
C++23 utilities for Unreal Engine.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
Mcro::Observable::FStatePolicy Struct Reference

Flags expressing how TState should handle object comparison and lifespan. More...

#include <Observable.Fwd.h>

Public Member Functions

FORCEINLINE constexpr FStatePolicy With (FStatePolicy const &other) const
 Merge two policy flags.
 
FORCEINLINE constexpr bool IsDefault () const
 Is this instance equivalent to a default constructed one.
 

Data Fields

bool NotifyOnChangeOnly = false
 When the object inside TState is != comparable TState wull only emit change events when the submitted value differs from the existing one.
 
bool AlwaysNotify = false
 Always emit change notification when a value is set on TState and don't attempt to compare them.
 
bool StorePrevious = false
 Store previous value as well. If the value is equality comparable store only when it's changed.
 
bool AlwaysStorePrevious = false
 If the state value is equality comparable, store the previous value even when that's equal to the new value. This flag doesn't do anything unless StorePrevious is also true.
 
bool ThreadSafe = false
 Enable mutexes during modifications, notifications and expose a public read-lock for users of the state.
 

Friends

FORCEINLINE friend constexpr bool operator== (FStatePolicy const &lhs, FStatePolicy const &rhs)
 
FORCEINLINE friend constexpr bool operator!= (FStatePolicy const &lhs, FStatePolicy const &rhs)
 

Detailed Description

Flags expressing how TState should handle object comparison and lifespan.

Definition at line 28 of file Observable.Fwd.h.

Member Function Documentation

◆ IsDefault()

FORCEINLINE constexpr bool Mcro::Observable::FStatePolicy::IsDefault ( ) const
inlineconstexpr

Is this instance equivalent to a default constructed one.

Definition at line 85 of file Observable.Fwd.h.

◆ With()

FORCEINLINE constexpr FStatePolicy Mcro::Observable::FStatePolicy::With ( FStatePolicy const & other) const
inlineconstexpr

Merge two policy flags.

Definition at line 58 of file Observable.Fwd.h.

Friends And Related Symbol Documentation

◆ operator!=

FORCEINLINE friend constexpr bool operator!= ( FStatePolicy const & lhs,
FStatePolicy const & rhs )
friend

Definition at line 79 of file Observable.Fwd.h.

◆ operator==

FORCEINLINE friend constexpr bool operator== ( FStatePolicy const & lhs,
FStatePolicy const & rhs )
friend

Definition at line 69 of file Observable.Fwd.h.

Field Documentation

◆ AlwaysNotify

bool Mcro::Observable::FStatePolicy::AlwaysNotify = false

Always emit change notification when a value is set on TState and don't attempt to compare them.

Definition at line 38 of file Observable.Fwd.h.

◆ AlwaysStorePrevious

bool Mcro::Observable::FStatePolicy::AlwaysStorePrevious = false

If the state value is equality comparable, store the previous value even when that's equal to the new value. This flag doesn't do anything unless StorePrevious is also true.

Definition at line 48 of file Observable.Fwd.h.

◆ NotifyOnChangeOnly

bool Mcro::Observable::FStatePolicy::NotifyOnChangeOnly = false

When the object inside TState is != comparable TState wull only emit change events when the submitted value differs from the existing one.

Definition at line 35 of file Observable.Fwd.h.

◆ StorePrevious

bool Mcro::Observable::FStatePolicy::StorePrevious = false

Store previous value as well. If the value is equality comparable store only when it's changed.

Definition at line 41 of file Observable.Fwd.h.

◆ ThreadSafe

bool Mcro::Observable::FStatePolicy::ThreadSafe = false

Enable mutexes during modifications, notifications and expose a public read-lock for users of the state.

Definition at line 55 of file Observable.Fwd.h.


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