Apparatus
Version 1.23
ECS data-oriented workflow for Unreal Engine.
|
Harsh outcome with a pointer-type outcome. More...
#include <ApparatusStatus.h>
Public Types | |
using | PayloadType = PayloadT * |
The payload pointer type. | |
Public Member Functions | |
constexpr EApparatusStatus | ToStatus () const |
Convert to a status constant. | |
constexpr bool | IsNoop () const |
Check if the outcome is a noop. | |
THarshOutcome & | MapStatus (const EApparatusStatus From, const EApparatusStatus To) |
Map the status from a status to a status. | |
PayloadType | GetPayload () const |
Get the payload of the outcome. | |
constexpr | operator EApparatusStatus () const |
Convert to a successful status. | |
operator PayloadType () const | |
Convert to a payload. | |
template<typename T > | |
THarshOutcome< T > | StaticCast () |
Cast the pointer statically. | |
template<typename T = PayloadT, more::enable_if_t<!std::is_void< std::decay_t< T > >::value, bool > = true> | |
THarshOutcome< T & > | Dereference () |
Dereference. | |
constexpr bool | IsOK () const |
Convert to successful state for using in a conditional expression. | |
template<typename T = PayloadT, typename std::enable_if<!std::is_void< T >::value, int >::type = 0> | |
T * | operator-> () const |
template<typename T = PayloadT, typename std::enable_if<!std::is_void< T >::value, int >::type = 0> | |
T & | operator* () const |
bool | operator== (TYPE_OF_NULLPTR) const |
bool | operator!= (TYPE_OF_NULLPTR) const |
bool | operator== (PayloadT *const Other) const |
bool | operator!= (PayloadT *const Other) const |
bool | operator! () const |
operator bool () const | |
THarshOutcome & | operator+= (const THarshOutcome &) |
THarshOutcome & | operator+= (const EApparatusStatus InStatus) |
THarshOutcome | operator+ (const EApparatusStatus InStatus) const |
FString | ToString () const |
constexpr | THarshOutcome () |
Initialize a default harsh outcome with a payload pointer to copy. | |
template<typename InPayloadT > | |
THarshOutcome (InPayloadT &&InPayload) | |
Initialize a harsh outcome with a payload pointer to copy. | |
template<typename InPayloadT > | |
THarshOutcome (const EApparatusStatus InStatus, const InPayloadT InPayload) | |
Initialize a harsh outcome with a status and a pointer to copy. | |
THarshOutcome (const EApparatusStatus InStatus) | |
Initialize a harsh outcome with a status and a nullptr. | |
template<typename InPayloadT > | |
THarshOutcome (const TPoliteOutcome< InPayloadT * > &InOutcome) | |
Convert from a polite outcome. | |
template<typename AnyPayloadT , typename InPayloadT > | |
constexpr | THarshOutcome (const THarshOutcome< AnyPayloadT > &InOutcome, const InPayloadT InPayload) |
Initialize a harsh outcome using a harsh outcome and a payload override. | |
Static Public Member Functions | |
static constexpr THarshOutcome< PayloadT * > | Success (TYPE_OF_NULLPTR) |
A constant denoting a successful operation outcome. | |
static constexpr THarshOutcome< PayloadT * > | Noop (TYPE_OF_NULLPTR) |
A constant denoting a successful skip of any actions. | |
static constexpr THarshOutcome< PayloadT * > | Success (PayloadT *const InPayload) |
A constant denoting a successful operation outcome. | |
static constexpr THarshOutcome< PayloadT * > | Noop (PayloadT *const InPayload) |
A constant denoting a successful skip of any actions. | |
Public Attributes | |
PayloadT * | Payload |
The payload pointer of the outcome. | |
Harsh outcome with a pointer-type outcome.
PayloadT | The optional payload object to point. |
using THarshOutcome< PayloadT * >::PayloadType = PayloadT* |
The payload pointer type.
|
inlineconstexpr |
Initialize a default harsh outcome with a payload pointer to copy.
|
inline |
Initialize a harsh outcome with a payload pointer to copy.
InPayloadT | The type of the passed-in payload. Must be assignable to the destination pointer type. |
InPayload | The pointer to copy. |
|
inline |
Initialize a harsh outcome with a status and a pointer to copy.
InPayloadT | The type of the passed-in payload. Must be assignable to the destination pointer type. |
InStatus | The status to initialize with. Must be a successful one. |
InPayload | The pointer to copy. Isn't checked for being a nullptr . |
|
inline |
Initialize a harsh outcome with a status and a nullptr.
InStatus | The status to initialize with. Must be a successful one. |
|
inline |
Convert from a polite outcome.
Will assert the outcome is a successful one.
InPayloadT | The type of the passed-in payload pointer type. |
InOutcome | The polite outcome to convert from. |
|
inlineconstexpr |
Initialize a harsh outcome using a harsh outcome and a payload override.
AnyPayloadT | The type of the payload of the incoming harsh outcome. Used for deduction only. |
InPayloadT | The type of the payload to initialize with. |
InOutcome | The outcome to initialize from. This is basically ignored here. |
InPayload | The payload pointer to initialize with. |
|
inline |
Dereference.
|
inline |
Get the payload of the outcome.
|
inlineconstexpr |
Check if the outcome is a noop.
|
inlineconstexpr |
Convert to successful state for using in a conditional expression.
This always return true
, since every harsh result is already a success.
|
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.
|
inlinestaticconstexpr |
A constant denoting a successful skip of any actions.
|
inline |
|
inlineexplicitconstexpr |
Convert to a successful status.
This operation should always be an explicit one for a harsh outcome, since the user should absolutely be aware of what he's actually doing.
|
inline |
Convert to a payload.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Cast the pointer statically.
The | type of the pointer to cast to. |
|
inlinestaticconstexpr |
A constant denoting a successful operation outcome.
|
inlinestaticconstexpr |
A constant denoting a successful operation outcome.
|
inlineconstexpr |
Convert to a status constant.
|
inline |
PayloadT* THarshOutcome< PayloadT * >::Payload |
The payload pointer of the outcome.