|
Apparatus
Version 1.23
ECS data-oriented workflow for Unreal Engine.
|
Polite outcome with a status and an optional payload. More...
#include <ApparatusStatus.h>


Public Types | |
| using | PayloadType = PayloadT |
| The type of the payload in the outcome. | |
Public Member Functions | |
| constexpr EApparatusStatus | ToStatus () const |
| Convert to a status constant. | |
| constexpr bool | IsNoop () const |
| Check if the outcome is a noop. | |
| TPoliteOutcome & | MapStatus (const EApparatusStatus From, const EApparatusStatus To) |
| Map the status from a status to a status. | |
| PayloadT | GetPayload () const |
| Get the payload. | |
| auto | operator-> () const |
| A non-empty outcomes serves as a pointer to its payload by default. | |
| constexpr const PayloadT & | operator* () const |
| Get a constant reference to a payload. | |
| constexpr PayloadT & | operator* () |
| Get a reference to a payload. | |
| template<typename T > | |
| TPoliteOutcome< T > | StaticCast () |
| Cast the payload statically. | |
| TPoliteOutcome< PayloadT & > | Dereference () |
| Dereference. | |
| constexpr | operator EApparatusStatus () const |
| Convert to a status. | |
| operator PayloadT () const | |
| Convert to a payload. | |
| constexpr bool | IsOK () const |
| Convert to success state for using in a conditional expression. | |
| constexpr bool | operator== (const PayloadT &Other) const |
| constexpr bool | operator!= (const PayloadT &Other) const |
| template<typename InPayloadT > | |
| TPoliteOutcome & | operator+= (const THarshOutcome< InPayloadT > &) |
| Accumulate a harsh outcome with an optional payload. | |
| TPoliteOutcome & | operator+= (const EApparatusStatus InStatus) |
| Accumulate a status within the outcome. | |
| constexpr TPoliteOutcome | operator+ (const EApparatusStatus InStatus) const |
| FString | ToString () const |
Initialization | |
| constexpr | TPoliteOutcome () |
| Initialize a default polite outcome using a noop status and a default payload. | |
| template<typename InPayloadT > | |
| constexpr | TPoliteOutcome (InPayloadT &&InPayload) |
| Initialize a polite outcome with a payload only. | |
| constexpr | TPoliteOutcome (const EApparatusStatus InStatus) |
| Initialize a polite outcome using a status and a default payload. | |
| template<typename InPayloadT > | |
| constexpr | TPoliteOutcome (const EApparatusStatus InStatus, InPayloadT &&InPayload) |
| Initialize a polite outcome using a status and a payload. | |
| template<typename InPayloadT > | |
| constexpr | TPoliteOutcome (THarshOutcome< InPayloadT > &&InOutcome) |
| Initialize a polite outcome using a harsh outcome. | |
| template<typename InPayloadT > | |
| constexpr | TPoliteOutcome (const THarshOutcome< InPayloadT > &InOutcome) |
| Initialize a polite outcome using a harsh outcome. | |
| template<typename InPayloadT > | |
| constexpr | TPoliteOutcome (TPoliteOutcome< InPayloadT > &&InOutcome) |
| Initialize a copy of the polite outcome. | |
| template<typename InPayloadT > | |
| constexpr | TPoliteOutcome (const TPoliteOutcome< InPayloadT > &InOutcome) |
| Initialize a copy of the polite outcome. | |
| template<typename AnyPayloadT , typename InPayloadT > | |
| constexpr | TPoliteOutcome (const THarshOutcome< AnyPayloadT > &InOutcome, InPayloadT &&InPayload) |
| Initialize a polite outcome using a harsh outcome and a payload override. | |
| template<typename AnyPayloadT , typename InPayloadT > | |
| constexpr | TPoliteOutcome (const TPoliteOutcome< AnyPayloadT > &InOutcome, InPayloadT &&InPayload) |
| Initialize a polite outcome using a polite outcome and a payload override. | |
Static Public Member Functions | |
| static constexpr TPoliteOutcome< PayloadT > | Success (const PayloadT &InPayload) |
| A constant denoting a successful operation outcome. | |
| static constexpr TPoliteOutcome< PayloadT > | Noop (const PayloadT &InPayload) |
| A constant denoting a successful skip of any actions. | |
Public Attributes | |
| EApparatusStatus | Status |
| The embedded status of the outcome. | |
| PayloadT | Payload |
| The payload of the outcome. | |
Polite outcome with a status and an optional payload.
| PayloadT | The optional payload type. |
| using TPoliteOutcome< PayloadT >::PayloadType = PayloadT |
The type of the payload in the outcome.
|
inlineconstexpr |
Initialize a default polite outcome using a noop status and a default payload.
|
inlineconstexpr |
Initialize a polite outcome with a payload only.
Initializing an outcome using only its payload is considered to be a valid, successful outcome.
| InPayloadT | The type of the payload to initialize with. |
| InPayload | The payload to initialize with. |
|
inlineconstexpr |
Initialize a polite outcome using a status and a default payload.
| InPayloadT | The type of the payload to override with. |
| InStatus | The status to initialize with. |
|
inlineconstexpr |
Initialize a polite outcome using a status and a payload.
| InPayloadT | The type of the payload to override with. |
| InStatus | The status to initialize from. |
| InPayload | The payload to initialize with. |
|
inlineconstexpr |
Initialize a polite outcome using a harsh outcome.
Moving version.
| InPayloadT | The type of the payload to override with. |
| InOutcome | The outcome to initialize from, while moving its payload. |
|
inlineconstexpr |
Initialize a polite outcome using a harsh outcome.
| InPayloadT | The type of the payload to override with. |
| InOutcome | The outcome to initialize from. |
|
inlineconstexpr |
Initialize a copy of the polite outcome.
Moving version.
| InPayloadT | The type of the payload to move. |
| InOutcome | The outcome to move. |
|
inlineconstexpr |
Initialize a copy of the polite outcome.
| InPayloadT | The type of the payload to copy. |
| InOutcome | The outcome to copy. |
|
inlineconstexpr |
Initialize a polite outcome using a harsh outcome and a payload override.
| AnyPayloadT | The type of the payload |
| InPayloadT | The type of the payload to override with. |
| InOutcome | The outcome to initialize from. This is basically ignored here. |
| InPayload | The payload to initialize with. |
|
inlineconstexpr |
Initialize a polite outcome using a polite outcome and a payload override.
| AnyPayloadT | The type of the payload |
| InPayloadT | The type of the payload to override with. |
| InOutcome | The outcome to initialize from. This is basically ignored here. |
| InPayload | The payload to initialize with. |
|
inline |
Dereference.
|
inline |
Get the payload.
|
inlineconstexpr |
Check if the outcome is a noop.
|
inlineconstexpr |
Convert to success state for using in a conditional expression.
Returns true for successful statuses, false otherwise.
|
inline |
Map the status from a status to a status.
| From | The status to map from. |
| To | The status to map to. |
|
inlinestaticconstexpr |
A constant denoting a successful skip of any actions.
|
inlineconstexpr |
Convert to a status.
This is an explicit conversion for a polite outcome.
|
inline |
Convert to a payload.
|
inlineconstexpr |
|
inlineconstexpr |
Get a reference to a payload.
|
inlineconstexpr |
Get a constant reference to a payload.
|
inlineconstexpr |
|
inline |
Accumulate a status within the outcome.
| InStatus | The status to accumulate. |
|
inline |
Accumulate a harsh outcome with an optional payload.
This is semantically equivalent to accumulating a success status since any harsh outcome is already a success.
| InPayloadT | The payload of the harsh outcome. |
|
inline |
A non-empty outcomes serves as a pointer to its payload by default.
|
inlineconstexpr |
|
inline |
Cast the payload statically.
| The | type to cast to. |
|
inlinestaticconstexpr |
A constant denoting a successful operation outcome.
|
inlineconstexpr |
Convert to a status constant.
|
inline |
| PayloadT TPoliteOutcome< PayloadT >::Payload |
The payload of the outcome.
| EApparatusStatus TPoliteOutcome< PayloadT >::Status |
The embedded status of the outcome.