![]() |
MCRO
C++23 utilities for Unreal Engine.
|
Namespaces | |
namespace | Detail |
Data Structures | |
struct | FStatePolicy |
Flags expressing how TState should handle object comparison and lifespan. More... | |
struct | IState |
Public API and base class for TState which shouldn't concern with policy flags or thread safety. More... | |
struct | IStateTag |
struct | TChangeData |
This struct holds the circumstances of the data change. It cannot be moved or copied and its lifespan is managed entirely by TState More... | |
struct | TState |
Storage wrapper for any value which state needs to be tracked or their change needs to be observed. By default, TState is not thread-safe unless EStatePolicy::ThreadSafe policy is active in DefaultPolicy. More... | |
Concepts | |
concept | CState |
Concept constraining given type to a state. | |
concept | CChangeNextOnlyListener |
Concept describing a function which can listen to changes to the current value of a TState only. | |
concept | CChangeNextPreviousListener |
Concept describing a function which can listen to changes to the current and the previous values of a TState. | |
concept | CChangeListener |
Concept describing a function which can be a change listener on a TState. | |
Typedefs | |
template<typename T > | |
using | TStateRef = TSharedRef<IState<T>> |
Convenience alias for shared reference to a base type of TState. Use this in APIs which may modify or get the value of a state declared elsewhere. | |
template<typename T > | |
using | TStatePtr = TSharedPtr<IState<T>> |
Convenience alias for shared pointer to a base type of TState. Use this in APIs which may modify or get the value of a state declared elsewhere. | |
template<typename T > | |
using | TStateWeakPtr = TWeakPtr<IState<T>> |
Convenience alias for weak pointer to a base type of TState. Use this in APIs which may modify or get the value of a state declared elsewhere. | |
template<typename T , FStatePolicy DefaultPolicy = StatePolicyFor<T>> | |
using | TDeclareStateRef = TSharedRef<TState<T, DefaultPolicy>> |
Convenience alias for declaring a state as a shared reference. Use this only as object members. | |
template<typename T , FStatePolicy DefaultPolicy = StatePolicyFor<T>> | |
using | TDeclareStatePtr = TSharedPtr<TState<T, DefaultPolicy>> |
Convenience alias for declaring a state as a shared pointer. Use this only as object members. | |
template<typename T , FStatePolicy DefaultPolicy = StatePolicyFor<T>> | |
using | TDeclareStateTSRef = TSharedRef<TState<T, DefaultPolicy.With({.ThreadSafe = true})>> |
Convenience alias for declaring a thread-safe state as a shared reference. Use this only as object members. | |
template<typename T , FStatePolicy DefaultPolicy = StatePolicyFor<T>> | |
using | TDeclareStateTSPtr = TSharedPtr<TState<T, DefaultPolicy.With({.ThreadSafe = true})>> |
Convenience alias for declaring a thread-safe state as a shared pointer. Use this only as object members. | |
template<typename T , FStatePolicy DefaultPolicy = StatePolicyFor<T>> | |
using | TStateTS = TState<T, DefaultPolicy.With({.ThreadSafe = true})> |
Convenience alias for thread safe states. | |
using | FBool = TState<bool> |
Convenience alias for boolean states. | |
using | FBoolTS = TStateTS<bool> |
Convenience alias for thread-safe boolean states. | |
Functions | |
template<typename LeftValue , CWeaklyEqualityComparableWith< LeftValue > RightValue> | |
bool | operator== (IState< LeftValue > const &left, IState< RightValue > const &right) |
template<typename LeftValue , CPartiallyOrderedWith< LeftValue > RightValue> | |
bool | operator<=> (IState< LeftValue > const &left, IState< RightValue > const &right) |
Variables | |
template<typename T > | |
constexpr FStatePolicy | StatePolicyFor |
template<> | |
constexpr FStatePolicy | StatePolicyFor< bool > = {.NotifyOnChangeOnly = true, .StorePrevious = false} |
using Mcro::Observable::FBool = TState<bool> |
Convenience alias for boolean states.
Definition at line 187 of file Observable.Fwd.h.
using Mcro::Observable::FBoolTS = TStateTS<bool> |
Convenience alias for thread-safe boolean states.
Definition at line 190 of file Observable.Fwd.h.
using Mcro::Observable::TDeclareStatePtr = TSharedPtr<TState<T, DefaultPolicy>> |
Convenience alias for declaring a state as a shared pointer. Use this only as object members.
Definition at line 143 of file Observable.Fwd.h.
using Mcro::Observable::TDeclareStateRef = TSharedRef<TState<T, DefaultPolicy>> |
Convenience alias for declaring a state as a shared reference. Use this only as object members.
Definition at line 139 of file Observable.Fwd.h.
using Mcro::Observable::TDeclareStateTSPtr = TSharedPtr<TState<T, DefaultPolicy.With({.ThreadSafe = true})>> |
Convenience alias for declaring a thread-safe state as a shared pointer. Use this only as object members.
Definition at line 151 of file Observable.Fwd.h.
using Mcro::Observable::TDeclareStateTSRef = TSharedRef<TState<T, DefaultPolicy.With({.ThreadSafe = true})>> |
Convenience alias for declaring a thread-safe state as a shared reference. Use this only as object members.
Definition at line 147 of file Observable.Fwd.h.
using Mcro::Observable::TStatePtr = TSharedPtr<IState<T>> |
Convenience alias for shared pointer to a base type of TState. Use this in APIs which may modify or get the value of a state declared elsewhere.
Definition at line 127 of file Observable.Fwd.h.
using Mcro::Observable::TStateRef = TSharedRef<IState<T>> |
Convenience alias for shared reference to a base type of TState. Use this in APIs which may modify or get the value of a state declared elsewhere.
Definition at line 119 of file Observable.Fwd.h.
using Mcro::Observable::TStateTS = TState<T, DefaultPolicy.With({.ThreadSafe = true})> |
Convenience alias for thread safe states.
Definition at line 184 of file Observable.Fwd.h.
using Mcro::Observable::TStateWeakPtr = TWeakPtr<IState<T>> |
Convenience alias for weak pointer to a base type of TState. Use this in APIs which may modify or get the value of a state declared elsewhere.
Definition at line 135 of file Observable.Fwd.h.
bool Mcro::Observable::operator<=> | ( | IState< LeftValue > const & | left, |
IState< RightValue > const & | right ) |
Definition at line 404 of file Observable.h.
bool Mcro::Observable::operator== | ( | IState< LeftValue > const & | left, |
IState< RightValue > const & | right ) |
Definition at line 398 of file Observable.h.
|
inlineconstexpr |
Definition at line 94 of file Observable.Fwd.h.
|
inlineconstexpr |
Definition at line 102 of file Observable.Fwd.h.