Apparatus Version 1.23
ECS data-oriented workflow for Unreal Engine.
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
TPoliteOutcome< void > Struct Reference

Polite outcome with a status but no payload. More...

#include <ApparatusStatus.h>

Inheritance diagram for TPoliteOutcome< void >:
Inheritance graph
[legend]
Collaboration diagram for TPoliteOutcome< void >:
Collaboration graph
[legend]

Public Types

using PayloadType = void
 The type of the payload, i.e.
 

Public Member Functions

constexpr EApparatusStatus ToStatus () const
 Convert to a status constant.
 
constexpr bool IsNoop () const
 Check if the outcome is a noop.
 
TPoliteOutcomeMapStatus (const EApparatusStatus From, const EApparatusStatus To)
 Map the status from a status to a status.
 
constexpr void GetPayload () const
 Get the non-existent payload.
 
constexpr operator EApparatusStatus () const
 Convert to a status.
 
constexpr bool IsOK () const
 Convert to success state for using in a conditional expression.
 
template<typename OtherPayloadT >
TPoliteOutcomeoperator+= (const THarshOutcome< OtherPayloadT > &)
 Accumulate a harsh outcome.
 
TPoliteOutcomeoperator+= (const EApparatusStatus InStatus)
 
template<typename AnyPayloadT >
TPoliteOutcomeoperator+= (const TPoliteOutcome< AnyPayloadT > &InOutcome)
 Accumulate a polite outcome with any payload.
 
constexpr TPoliteOutcome operator+ (const EApparatusStatus InStatus) const
 
FString ToString () const
 
constexpr TPoliteOutcome ()
 Initialize a default polite pointer outcome using a noop status.
 
constexpr TPoliteOutcome (const EApparatusStatus InStatus)
 Initialize a polite outcome using a status.
 
template<typename AnyPayloadT >
constexpr TPoliteOutcome (const EApparatusStatus InStatus, AnyPayloadT &&)
 Initialize using a status and any type of payload.
 
template<typename AnyPayloadT >
constexpr TPoliteOutcome (AnyPayloadT &&)
 Initialize a polite outcome with an ignored payload.
 
template<typename InPayloadT >
constexpr TPoliteOutcome (const THarshOutcome< InPayloadT > &InOutcome)
 Initialize a polite outcome with a harsh one.
 
template<typename InPayloadT >
constexpr TPoliteOutcome (const TPoliteOutcome< InPayloadT > &InOutcome)
 Initialize a copy of a polite outcome.
 

Static Public Member Functions

static constexpr TPoliteOutcome< void > Success ()
 A constant denoting a successful operation outcome.
 
static constexpr TPoliteOutcome< void > Noop ()
 A constant denoting a successful skip of any actions.
 

Public Attributes

EApparatusStatus Status
 The embedded status of the outcome.
 

Detailed Description

Polite outcome with a status but no payload.

Member Typedef Documentation

◆ PayloadType

using TPoliteOutcome< void >::PayloadType = void

The type of the payload, i.e.

lack of it.

Constructor & Destructor Documentation

◆ TPoliteOutcome() [1/6]

constexpr TPoliteOutcome< void >::TPoliteOutcome ( )
inlineconstexpr

Initialize a default polite pointer outcome using a noop status.

◆ TPoliteOutcome() [2/6]

constexpr TPoliteOutcome< void >::TPoliteOutcome ( const EApparatusStatus  InStatus)
inlineconstexpr

Initialize a polite outcome using a status.

Parameters
InStatusThe status to initialize with.

◆ TPoliteOutcome() [3/6]

template<typename AnyPayloadT >
constexpr TPoliteOutcome< void >::TPoliteOutcome ( const EApparatusStatus  InStatus,
AnyPayloadT &&   
)
inlineconstexpr

Initialize using a status and any type of payload.

Template Parameters
AnyPayloadTThe payload to initialize from. This is used for deduction only and is basically ignored.
Parameters
InStatusThe status to initialize with.

◆ TPoliteOutcome() [4/6]

template<typename AnyPayloadT >
constexpr TPoliteOutcome< void >::TPoliteOutcome ( AnyPayloadT &&  )
inlineconstexpr

Initialize a polite outcome with an ignored payload.

Just a payload is considered to be a success.

Template Parameters
AnyPayloadTThe payload to initialize from. This is used for deduction only.

◆ TPoliteOutcome() [5/6]

template<typename InPayloadT >
constexpr TPoliteOutcome< void >::TPoliteOutcome ( const THarshOutcome< InPayloadT > &  InOutcome)
inlineconstexpr

Initialize a polite outcome with a harsh one.

A harsh outcome with any payload is considered to be a success.

Template Parameters
InPayloadTThe type of the other payload. This is used for deduction only.
Parameters
InOutcomeThe outcome to initialize from.

◆ TPoliteOutcome() [6/6]

template<typename InPayloadT >
constexpr TPoliteOutcome< void >::TPoliteOutcome ( const TPoliteOutcome< InPayloadT > &  InOutcome)
inlineconstexpr

Initialize a copy of a polite outcome.

Template Parameters
InPayloadTThe type of the other payload. This is used for deduction only.
Parameters
InOutcomeThe polite outcome to copy.

Member Function Documentation

◆ GetPayload()

constexpr void TPoliteOutcome< void >::GetPayload ( ) const
inlineconstexpr

Get the non-existent payload.

◆ IsNoop()

constexpr bool TPoliteOutcome< void >::IsNoop ( ) const
inlineconstexpr

Check if the outcome is a noop.

◆ IsOK()

constexpr bool TPoliteOutcome< void >::IsOK ( ) const
inlineconstexpr

Convert to success state for using in a conditional expression.

Returns true for successful statuses, false otherwise.

Returns
The state of examination.

◆ MapStatus()

TPoliteOutcome & TPoliteOutcome< void >::MapStatus ( const EApparatusStatus  From,
const EApparatusStatus  To 
)
inline

Map the status from a status to a status.

Parameters
FromThe status to map from.
ToThe status to map to.
Returns
Returns itself.

◆ Noop()

static constexpr TPoliteOutcome< void > TPoliteOutcome< void >::Noop ( )
inlinestaticconstexpr

A constant denoting a successful skip of any actions.

◆ operator EApparatusStatus()

constexpr TPoliteOutcome< void >::operator EApparatusStatus ( ) const
inlineconstexpr

Convert to a status.

This is an explicit conversion for a polite outcome.

Returns
The embedded captured status.

◆ operator+()

constexpr TPoliteOutcome TPoliteOutcome< void >::operator+ ( const EApparatusStatus  InStatus) const
inlineconstexpr

◆ operator+=() [1/3]

TPoliteOutcome & TPoliteOutcome< void >::operator+= ( const EApparatusStatus  InStatus)
inline

◆ operator+=() [2/3]

template<typename OtherPayloadT >
TPoliteOutcome & TPoliteOutcome< void >::operator+= ( const THarshOutcome< OtherPayloadT > &  )
inline

Accumulate a harsh outcome.

This is semantically identical to accumulating with a success status, since every harsh outcome is basically a non-fail.

Template Parameters
OtherPayloadTThe optional payload of the harsh outcome.
Returns
Returns itself as a result.

◆ operator+=() [3/3]

template<typename AnyPayloadT >
TPoliteOutcome & TPoliteOutcome< void >::operator+= ( const TPoliteOutcome< AnyPayloadT > &  InOutcome)
inline

Accumulate a polite outcome with any payload.

Template Parameters
AnyPayloadTThe other payload to accumulate.
Parameters
InOutcomeThe outcome to combine with.
Returns
Returns itself as a result.

◆ Success()

static constexpr TPoliteOutcome< void > TPoliteOutcome< void >::Success ( )
inlinestaticconstexpr

A constant denoting a successful operation outcome.

◆ ToStatus()

constexpr EApparatusStatus TPoliteOutcome< void >::ToStatus ( ) const
inlineconstexpr

Convert to a status constant.

Returns
The embedded captured status.

◆ ToString()

FString TPoliteOutcome< void >::ToString ( ) const
inline

Member Data Documentation

◆ Status

The embedded status of the outcome.


The documentation for this struct was generated from the following file: