Navigation
API > API/Plugins > API/Plugins/DisplayCluster
Conditional State (generic state machine)
Manages abstract states based on an abstract input.
[SomeInput] -> [ ? ] -> [SomeState] ^ user provided decision maker
Also calls back on every state change.
StateDataType: Any type representing a state. It must be a copyable and default-constructible type.
InputDataType: The type of input data used to evaluate whether a state transition is required, and if so, which state should be transitioned to.
ContextDataType: The type of context data. This represents local storage provided to the decision-making delegate on each evaluation. This data is never modified internally; its usage is entirely up to the user.
| Name | FConditionalState |
| Type | class |
| Header File | /Engine/Plugins/Runtime/nDisplay/Source/DisplayCluster/Public/Misc/DisplayClusterConditionalState.h |
| Include Path | #include "Misc/DisplayClusterConditionalState.h" |
Syntax
template<typename StateDataType, typename InputDataType, typename ContextDataType>
class FConditionalState
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
| Misc/DisplayClusterConditionalState.h | |||
FConditionalState
(
const StateDataType& InInitialState |
Misc/DisplayClusterConditionalState.h | ||
FConditionalState
(
const StateDataType& InInitialState, |
Misc/DisplayClusterConditionalState.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual ~FConditionalState() |
Misc/DisplayClusterConditionalState.h |
Classes
| Name | Remarks |
|---|---|
| FOnStateChanged | State change eventCalled every time the state is changed |
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FMakeDecisionDelegate | TBaseDelegate_ThreeParams< StateDataType, const StateDataType &, const InputDataType &, ContextDataType & > | Decision making delegate | Misc/DisplayClusterConditionalState.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnMakeDecision | FMakeDecisionDelegate | Misc/DisplayClusterConditionalState.h | ||
| OnStateChanged | FOnStateChanged | Misc/DisplayClusterConditionalState.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ContextData | ContextDataType | User context data | Misc/DisplayClusterConditionalState.h | |
| CurrentState | StateDataType | Tracks current state | Misc/DisplayClusterConditionalState.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void Evaluate
(
const InputDataType& NewInput |
Processes incoming input and evaluates whether the current state should change. | Misc/DisplayClusterConditionalState.h | |
const StateDataType & GetState() |
Access to the current state | Misc/DisplayClusterConditionalState.h |