MCRO
C++23 utilities for Unreal Engine.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages Concepts
Observable.Fwd.h File Reference
#include "CoreMinimal.h"
#include "Mcro/FunctionTraits.h"

Go to the source code of this file.

Data Structures

struct  Mcro::Observable::FStatePolicy
 Flags expressing how TState should handle object comparison and lifespan. More...
 
struct  Mcro::Observable::IStateTag
 

Namespaces

namespace  Mcro
 
namespace  Mcro::Observable
 
namespace  Mcro::Observable::Detail
 

Concepts

concept  Mcro::Observable::CState
 Concept constraining given type to a state.
 
concept  Mcro::Observable::Detail::CChangeListenerCandidate
 
concept  Mcro::Observable::CChangeNextOnlyListener
 Concept describing a function which can listen to changes to the current value of a TState only.
 
concept  Mcro::Observable::CChangeNextPreviousListener
 Concept describing a function which can listen to changes to the current and the previous values of a TState.
 
concept  Mcro::Observable::CChangeListener
 Concept describing a function which can be a change listener on a TState.
 

Typedefs

template<typename T >
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.
 
template<typename T >
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.
 
template<typename T >
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.
 
template<typename T , FStatePolicy DefaultPolicy = StatePolicyFor<T>>
using Mcro::Observable::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 Mcro::Observable::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 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.
 
template<typename T , FStatePolicy DefaultPolicy = StatePolicyFor<T>>
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.
 
template<typename T , FStatePolicy DefaultPolicy = StatePolicyFor<T>>
using Mcro::Observable::TStateTS = TState<T, DefaultPolicy.With({.ThreadSafe = true})>
 Convenience alias for thread safe states.
 
using Mcro::Observable::FBool = TState<bool>
 Convenience alias for boolean states.
 
using Mcro::Observable::FBoolTS = TStateTS<bool>
 Convenience alias for thread-safe boolean states.
 

Variables

template<typename T >
constexpr FStatePolicy Mcro::Observable::StatePolicyFor
 
template<>
constexpr FStatePolicy Mcro::Observable::StatePolicyFor< bool > = {.NotifyOnChangeOnly = true, .StorePrevious = false}
 
concept Mcro::Observable::Detail::TFunction_ArgDecay< Function, 0 >
 

Detailed Description

Author
David Mórász
Date
2025

This is a forward declaration for types in Observable.h. Unless the full TState type is used for class member declarations, use this header in other header files.

Definition in file Observable.Fwd.h.