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

A harsh outcome with no payload. More...

#include <ApparatusStatus.h>

Inheritance diagram for THarshOutcome< void >:
Inheritance graph
[legend]
Collaboration diagram for THarshOutcome< 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.
 
THarshOutcomeMapStatus (const EApparatusStatus From, const EApparatusStatus To)
 Map the status from a status to a status.
 
constexpr void GetPayload () const
 Get the in-existent payload.
 
constexpr operator EApparatusStatus () const
 Convert to a successful status.
 
constexpr bool IsOK () const
 Convert to successful state for using in a conditional expression.
 
THarshOutcomeoperator+= (const THarshOutcome &)
 
THarshOutcomeoperator+= (const EApparatusStatus InStatus)
 
THarshOutcome operator+ (const EApparatusStatus InStatus) const
 
FString ToString () const
 
constexpr THarshOutcome ()
 
template<typename InPayloadT >
constexpr THarshOutcome (const InPayloadT &InPayload)
 Any payload received is considered to be a harsh success.
 
 THarshOutcome (const EApparatusStatus InStatus)
 Convert a status to a harsh outcome.
 
template<typename InPayloadT >
 THarshOutcome (const TPoliteOutcome< InPayloadT > &InOutcome)
 Convert from a polite outcome.
 

Static Public Member Functions

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

Detailed Description

A harsh outcome with no payload.


Member Typedef Documentation

◆ PayloadType

using THarshOutcome< void >::PayloadType = void

The type of the payload, i.e.

lack of it.

Constructor & Destructor Documentation

◆ THarshOutcome() [1/4]

constexpr THarshOutcome< void >::THarshOutcome ( )
inlineconstexpr

◆ THarshOutcome() [2/4]

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

Any payload received is considered to be a harsh success.

This basically means that an empty harsh outcome can be initialized with any type of value.

Template Parameters
InPayloadTThe type of the other payload.
Parameters
InPayloadThe payload itself. This is just being ignored.

◆ THarshOutcome() [3/4]

THarshOutcome< void >::THarshOutcome ( const EApparatusStatus  InStatus)
inline

Convert a status to a harsh outcome.

Any successful status is considered to be a valid harsh outcome.

Parameters
InStatusThe status to convert. Must be a successful one.

◆ THarshOutcome() [4/4]

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

Convert from a polite outcome.

Will assert the outcome is a successful one. Any incoming payload will be just ignored.

Template Parameters
InPayloadTThe type of the other payload.
Parameters
InOutcomeThe polite outcome to convert from. Checked to be a successful one.

Member Function Documentation

◆ GetPayload()

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

Get the in-existent payload.

◆ IsNoop()

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

Check if the outcome is a noop.

◆ IsOK()

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

Convert to successful state for using in a conditional expression.

This always return true, since every harsh result is already a success.

Returns
The state of examination.

◆ MapStatus()

THarshOutcome & THarshOutcome< 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 THarshOutcome< void > THarshOutcome< void >::Noop ( )
inlinestaticconstexpr

A constant denoting a successful skip of any actions.

◆ operator EApparatusStatus()

constexpr THarshOutcome< void >::operator EApparatusStatus ( ) const
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.

◆ operator+()

THarshOutcome THarshOutcome< void >::operator+ ( const EApparatusStatus  InStatus) const
inline

◆ operator+=() [1/2]

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

◆ operator+=() [2/2]

THarshOutcome & THarshOutcome< void >::operator+= ( const THarshOutcome< void > &  )
inline

◆ Success()

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

A constant denoting a successful operation outcome.

◆ ToStatus()

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

Convert to a status constant.

Returns
EApparatusStatus::Success Every harsh outcome is considered to be a success by default.

◆ ToString()

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

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