Apparatus Version 1.23
ECS data-oriented workflow for Unreal Engine.
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
ApparatusStatus.h File Reference

The Apparatus status reporting facility. More...

#include <cstddef>
#include "CoreMinimal.h"
#include "UObject/Class.h"
#include "More/type_traits"
#include "ApparatusRuntime.h"
Include dependency graph for ApparatusStatus.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  FCommonOutcome
 A common base class for all outcome types. More...
 
struct  FCommonHarshOutcome
 A common base class for all harsh outcome types. More...
 
struct  FCommonPoliteOutcome
 A common base class for all polite outcome types. More...
 
struct  THarshOutcome< PayloadT >
 Harsh outcome with no status but an optional payload. More...
 
struct  THarshOutcome< PayloadT * >
 Harsh outcome with a pointer-type outcome. More...
 
struct  THarshOutcome< void >
 A harsh outcome with no payload. More...
 
struct  TPoliteOutcome< PayloadT >
 Polite outcome with a status and an optional payload. More...
 
struct  TPoliteOutcome< PayloadT * >
 Polite outcome with a status and a pointer type result. More...
 
struct  TPoliteOutcome< void >
 Polite outcome with a status but no payload. More...
 
class  FApparatusStatus
 The main core-level Apparatus delegates. More...
 
class  FApparatusDelegates
 The main core-level Apparatus delegates. More...
 

Macros

#define AssessCondition(Paradigm, Expr, Status)
 Make sure the check is passing or otherwise either return a status or raise an assertion failure.
 
#define AssessConditionFormat(Paradigm, Expression, Status, Format, ...)
 Make sure the check is passing or otherwise either return a status or raise an assertion failure.
 
#define EnsuredPayload(Outcome)
 Get the payload while ensuring the status of the corresponding outcome is OK().
 
#define EnsuredPayloadf(Outcome, Format, ...)
 Get the payload while ensuring the status is OK().
 
#define EnsureOK(Outcome)
 Ensure the outcome is OK().
 
#define VerifyOK(Outcome)
 Verify the outcome is OK().
 
#define Avoid(Paradigm, Expression)
 Avoid a certain event.
 
#define AvoidFormat(Paradigm, Expression, Format, ...)
 Avoid a certain event.
 
#define AvoidCondition(Paradigm, Expression)
 Avoid a certain state.
 
#define AvoidConditionFormat(Paradigm, Expression, Format, ...)
 Avoid a certain state.
 
#define AvoidError(Paradigm, Expression)
 Avoid an erroneous statement.
 
#define AvoidErrorFormat(Paradigm, Expression, Format, ...)
 Avoid an erroneous statement with a formatting message.
 
#define AvoidErrorCondition(Paradigm, Expression)
 Avoid an erroneous condition.
 
#define AvoidErrorConditionFormat(Paradigm, Expression, Format, ...)
 Avoid an erroneous condition with a formatting message.
 
#define AssessOK(Paradigm, Expression)
 Make sure the statement is successful or otherwise either return its resulting status or just execute it.
 
#define AssessFinalizeOK(Paradigm, Expression, Finalize)
 Make sure the statement is successful or otherwise either return its resulting status or just execute it.
 
#define AssessOKFormat(Paradigm, Expression, Format, ...)
 Make sure the statement is successful or otherwise either return its resulting status or just execute it.
 
#define AssessFinalizeOKf(Paradigm, Expression, Finalize, Format, ...)
 Make sure the statement is successful or otherwise either return its resulting status or just execute it.
 
#define AssessConditionOK(Paradigm, Expression)
 Make sure the statement is successful or otherwise either return its resulting status or just execute it.
 
#define AssessConditionOKf(Paradigm, Expression, Format, ...)
 Make sure the statement is successful or otherwise either return its resulting status or just execute it.
 
#define APPARATUS_STRINGIFY(symbol)   #symbol
 Stringify a symbol.
 
#define iAPPARATUS_REPORT_POSITIVE(Format, ...)
 
#define APPARATUS_REPORT(Status, Format, ...)
 Report a status with a formatted message.
 
#define APPARATUS_REPEAT_REPORT(Status, Format, ...)
 Repeat the report got from a previously called function.
 
#define APPARATUS_REPORT_SUCCESS(Format, ...)
 Report a success status with a formatted message.
 

Typedefs

template<EParadigm Paradigm, typename PayloadT = void>
using TOutcome = typename std::conditional< std::is_void< PayloadT >::value, typename std::conditional< IsPolite(Paradigm), EApparatusStatus, THarshOutcome< void > >::type, typename std::conditional< IsPolite(Paradigm), TPoliteOutcome< PayloadT >, PayloadT >::type >::type
 A general Apparatus function/method outcome.
 
template<typename PayloadT = void>
using TPortableOutcome = TOutcome< EParadigm::DefaultPortable, PayloadT >
 A portable Apparatus outcome used in virtual methods and other compatiblity layers.
 
template<EParadigm Paradigm, bool Condition, typename PayloadT = void>
using TOutcomeIf = typename std::enable_if< Condition, TOutcome< Paradigm, PayloadT > >::type
 A general Apparatus function/method outcome available if a condition is a succeeding one.
 
template<EParadigm Paradigm, typename PayloadT = void>
using TOutcomeIfUnsafe = TEnableIfUnsafe< Paradigm, TOutcome< Paradigm, PayloadT > >
 A general Apparatus function/method outcome available in an unsafe mode only.
 
template<EParadigm Paradigm, bool Condition, typename PayloadT = void>
using TOutcomeIfUnsafeOr = TEnableIfUnsafeOr< Paradigm, Condition, TOutcome< Paradigm, PayloadT > >
 A general Apparatus function/method outcome available in an unsafe mode or under a specific condition.
 

Enumerations

enum class  EApparatusStatus : int8 {
  Noop = 0 , Success = 1 , Reused = 2 , NoItems = 3 ,
  Deferred = 4 , Error = -1 , InvalidArgument = -2 , NullArgument = -3 ,
  OutOfRange = -4 , NoMore = -5 , NotAvailable = -6 , Missing = -7 ,
  InvalidOperation = -8 , InvalidState = -9 , WrongType = -10 , UnsupportedOperation = -11 ,
  NoImplementation = -12 , Conflict = -13 , SanityCheckFailed = -14 , NoPermission = -15 ,
  OutOfLimit = -16 , NoMemory = -17 , FatalError = -18
}
 The general Apparatus operation status type. More...
 

Functions

template<typename T >
constexpr bool IsStatusType ()
 Check if the passed in type is a status.
 
constexpr bool OK (const EApparatusStatus Status)
 Check if the status is a successful one.
 
constexpr bool IsNoop (const EApparatusStatus Status)
 Check if a status is a noop.
 
constexpr EApparatusStatus ToStatus (const EApparatusStatus Status)
 Universal conversion to a status.
 
constexpr EApparatusStatus StatusCombine ()
 Noop.
 
constexpr EApparatusStatus StatusCombine (const EApparatusStatus A)
 Bypass a status.
 
constexpr EApparatusStatus StatusCombine (const EApparatusStatus A, const EApparatusStatus B)
 Combine two statuses deriving a new one based on them.
 
constexpr EApparatusStatus operator+ (const EApparatusStatus A, const EApparatusStatus B)
 Combine two statuses deriving a new one based on them.
 
template<size_t N>
EApparatusStatus StatusCombine (const EApparatusStatus(&Statuses)[N], const EApparatusStatus DefaultStatus=EApparatusStatus::Noop)
 Combine several statuses deriving a new one based on them.
 
EApparatusStatus StatusCombine (std::initializer_list< EApparatusStatus > Statuses, const EApparatusStatus DefaultStatus=EApparatusStatus::Noop)
 Combine several statuses deriving a new one based on them.
 
template<typename... Ts>
constexpr EApparatusStatus StatusCombine (const EApparatusStatus StatusA, const EApparatusStatus StatusB, const Ts... OtherStatuses)
 Combine several statuses deriving a new one based on them.
 
template<size_t N>
EApparatusStatusStatusAccumulate (EApparatusStatus &Status, const EApparatusStatus(&Statuses)[N])
 Accumulate several statuses deriving a new one based on them.
 
EApparatusStatusStatusAccumulate (EApparatusStatus &Status)
 Accumulate several statuses deriving a new one based on them.
 
EApparatusStatusStatusAccumulate (EApparatusStatus &Status, const EApparatusStatus AddStatus)
 Accumulate several statuses deriving a new one based on them.
 
template<typename... Ts>
EApparatusStatusStatusAccumulate (EApparatusStatus &Status, const EApparatusStatus AddStatus, Ts &&... AddStatuses)
 Accumulate several statuses deriving a new one based on them.
 
EApparatusStatusoperator+= (EApparatusStatus &A, const EApparatusStatus B)
 Accumulate a status to an existing status.
 
template<typename PayloadT >
EApparatusStatus operator+= (const EApparatusStatus A, const PayloadT &B)
 Accumulate a payload to an existing status.
 
template<typename PayloadT >
EApparatusStatus operator+= (const PayloadT &A, const EApparatusStatus B)
 Accumulate a status to an existing payload.
 
FString ToString (const EApparatusStatus Status)
 Convert an Apparatus status variable to a string representation.
 
template<typename T >
constexpr bool IsOutcomeType ()
 Check if a type is an outcome.
 
template<typename T >
constexpr bool IsHarshOutcomeType ()
 Check if a type is a harsh outcome.
 
template<typename T >
constexpr bool IsPoliteOutcomeType ()
 Check if a type is a polite outcome.
 
template<typename T >
constexpr bool IsStatusArrayType ()
 
template<typename T >
constexpr bool IsOutcomeArrayType ()
 
template<typename T >
constexpr bool IsPayloadType ()
 Check if a type is a payload.
 
template<typename PayloadT >
constexpr bool OK (const THarshOutcome< PayloadT > &)
 Confirm the harsh outcome to be a successful one.
 
template<typename PayloadT >
constexpr bool OK (const TPoliteOutcome< PayloadT > &Outcome)
 Check if an outcome is be a successful one.
 
template<typename PayloadT >
constexpr bool OK (std::initializer_list< THarshOutcome< PayloadT > > Outcomes)
 Check if all outcomes are OK.
 
template<typename PayloadT >
bool OK (std::initializer_list< TPoliteOutcome< PayloadT > > Outcomes)
 Check if all outcomes are OK.
 
template<typename PayloadT , more::enable_if_t< IsPayloadType< more::flatten_t< PayloadT > >(), int > = 0>
constexpr bool OK (const PayloadT &)
 Any other outcome is considered to be a payload which is also always a valid success.
 
template<typename PayloadT >
constexpr bool IsNoop (const THarshOutcome< PayloadT > &)
 Confirm the harsh outcome to be a successful noop.
 
template<typename PayloadT >
constexpr bool IsNoop (const TPoliteOutcome< PayloadT > &Outcome)
 Check if an outcome is be a successful one.
 
template<typename T , more::enable_if_t< IsPayloadType< more::flatten_t< T > >(), bool > = true>
constexpr bool IsNoop (const T &)
 Any other outcome is considered to be a payload which is never a noop.
 
void GetPayload (const THarshOutcome< void > &)
 Get an empty harsh outcome's payload in a universal manner.
 
void GetPayload (const TPoliteOutcome< void > &)
 Get an empty polite outcome's payload in a universal manner.
 
template<typename PayloadT >
constexpr PayloadT GetPayload (const THarshOutcome< PayloadT > &Outcome)
 Get a harsh outcome's payload in a universal manner.
 
template<typename PayloadT >
constexpr PayloadT GetPayload (const TPoliteOutcome< PayloadT > &Outcome)
 Get a polite outcome's payload in a universal manner.
 
template<typename T , more::enable_if_t< IsPayloadType< more::flatten_t< T > >(), int > = 0>
constexpr bool GetPayload (T &&Payload)
 Any other outcome is considered to be a payload which is just returned.
 
template<EParadigm Paradigm, typename L >
constexpr TOutcome< Paradigm, void > ExecuteWithOutcome (const L &Lambda, void(L::*)(void) const)
 
template<EParadigm Paradigm, typename L , typename PayloadT >
constexpr TOutcome< Paradigm, PayloadT > ExecuteWithOutcome (const L &Lambda, THarshOutcome< PayloadT >(L::*)(void) const)
 
template<EParadigm Paradigm, typename L , typename PayloadT >
constexpr TOutcome< Paradigm, PayloadT > ExecuteWithOutcome (const L &Lambda, TPoliteOutcome< PayloadT >(L::*)(void) const)
 
template<EParadigm Paradigm, typename L , typename PayloadT >
constexpr TOutcome< Paradigm, PayloadT > ExecuteWithOutcome (const L &Lambda, PayloadT(L::*)(void) const)
 
template<EParadigm Paradigm, typename L >
constexpr TOutcome< Paradigm > ExecuteWithOutcome (const L &Lambda, EApparatusStatus(L::*)(void) const)
 
template<EParadigm Paradigm, typename L >
constexpr auto ExecuteWithOutcome (const L &Lambda)
 
template<typename PayloadT >
FString ToString (const THarshOutcome< PayloadT > &Outcome)
 Convert a harsh outcome to a string representation.
 
template<typename PayloadT >
FString ToString (const TPoliteOutcome< PayloadT > &Outcome)
 Convert a polite outcome to a string representation.
 
template<typename PayloadT >
FString ToString (const PayloadT &Payload)
 Convert a payload to a string representation.
 
template<typename To , typename PayloadT >
constexpr THarshOutcome< To > OutcomeStaticCast (const THarshOutcome< PayloadT > &Outcome)
 Convert a harsh outcome to a status.
 
template<typename To , typename PayloadT >
constexpr TPoliteOutcome< To > OutcomeStaticCast (const TPoliteOutcome< PayloadT > &Outcome)
 Convert a polite outcome to a status.
 
template<typename To , typename PayloadT >
constexpr auto OutcomeStaticCast (PayloadT *const Payload)
 Statically cast a generic payload pointer.
 
template<typename PayloadT >
PayloadT & OutcomeDereference (const THarshOutcome< PayloadT * > &Outcome)
 Convert a harsh outcome to a status.
 
template<typename PayloadT >
PayloadT & OutcomeDereference (const TPoliteOutcome< PayloadT * > &Outcome)
 Convert a polite outcome to a status.
 
template<typename PayloadT >
PayloadT & OutcomeDereference (const THarshOutcome< PayloadT > &Outcome)
 Convert a harsh outcome to a status.
 
template<typename PayloadT >
PayloadT & OutcomeDereference (const TPoliteOutcome< PayloadT > &Outcome)
 Convert a polite outcome to a status.
 
template<typename PayloadT >
PayloadT & OutcomeDereference (PayloadT &Payload)
 Statically cast a generic payload pointer.
 
template<typename PayloadT >
PayloadT & OutcomeDereference (PayloadT *const Payload)
 Statically cast a generic payload pointer.
 
template<typename PayloadT >
constexpr EApparatusStatus ToStatus (const THarshOutcome< PayloadT > &Outcome)
 Convert a harsh outcome to a status.
 
template<typename PayloadT >
constexpr EApparatusStatus ToStatus (const TPoliteOutcome< PayloadT > &Outcome)
 Convert a polite outcome to a status.
 
template<typename PayloadT >
constexpr EApparatusStatus ToStatus (const PayloadT &Outcome)
 Convert a generic payload to a status.
 
EApparatusStatus Report (const EApparatusStatus Status, const TCHAR *InMessage)
 Report a status along with a message.
 
EApparatusStatus Report (const EApparatusStatus Status, const TCHAR *InFormatString, const FStringFormatOrderedArguments &InOrderedArguments)
 Report a status with a formatted message.
 
EApparatusStatus Report (const EApparatusStatus Status, const TCHAR *InFormatString, const FStringFormatNamedArguments &InNamedArguments)
 Report a status with a formatted message.
 
template<EApparatusStatus Status>
EApparatusStatus Report (const TCHAR *InMessage)
 Report a status along with a message.
 
template<EApparatusStatus Status>
EApparatusStatus Report (const TCHAR *InFormatString, const FStringFormatOrderedArguments &InOrderedArguments)
 Report a status with a formatted message.
 
template<EApparatusStatus Status>
EApparatusStatus Report (const TCHAR *InFormatString, const FStringFormatNamedArguments &InNamedArguments)
 Report a status with a formatted message.
 

Variables

template<typename PayloadT , size_t N>
constexpr bool
 Check if all outcomes are OK.
 

Outcome Combining

template<typename T >
using TPayloadTypeSecurity = more::enable_if_t< IsPayloadType< T >(), bool >
 
template<EParadigm Paradigm = EParadigm::SafePolite>
constexpr TOutcome< Paradigm, void > OutcomeCombine ()
 Combine outcomes.
 
constexpr EApparatusStatus OutcomeCombine (const EApparatusStatus Status)
 Combine a single status bypassing it.
 
constexpr EApparatusStatus OutcomeCombine (const EApparatusStatus StatusA, const EApparatusStatus StatusB)
 Combine two statuses as outcomes.
 
template<EParadigm Paradigm = EParadigm::Polite, typename T , more::enable_if_t< IsPayloadType< more::flatten_t< T > >(), bool > = true>
constexpr auto OutcomeCombine (const EApparatusStatus Status, T &&Payload)
 Combine into a polite outcome.
 
template<EParadigm Paradigm = EParadigm::Polite, typename T , TPayloadTypeSecurity< more::flatten_t< T > > = true>
constexpr auto OutcomeCombine (T &&Payload, const EApparatusStatus Status)
 Combine a payload and a status into a polite non-empty outcome.
 
template<EParadigm Paradigm = EParadigm::Polite, typename T = void, more::enable_if_t<!std::is_void< T >::value, int > = 0>
constexpr auto OutcomeCombine (const EApparatusStatus Status, THarshOutcome< T > &&Outcome)
 Combine into a polite outcome.
 
template<EParadigm Paradigm = EParadigm::Polite, typename T = void, more::enable_if_t<!std::is_void< T >::value, int > = 0>
constexpr auto OutcomeCombine (TPoliteOutcome< T > &&Outcome, const EApparatusStatus Status)
 Combine into a polite outcome.
 
template<EParadigm Paradigm = EParadigm::Polite, typename T = void, more::enable_if_t<!std::is_void< T >::value, bool > = true>
constexpr auto OutcomeCombine (const TPoliteOutcome< T > &Outcome, const EApparatusStatus Status)
 Combine a non-empty polite outcome and a status into a non-empty polite outcome.
 
template<EParadigm Paradigm = EParadigm::Polite, typename T = void, more::enable_if_t<!std::is_void< T >::value, int > = 0>
constexpr auto OutcomeCombine (const EApparatusStatus Status, TPoliteOutcome< T > &&Outcome)
 Combine into a polite outcome.
 
template<EParadigm Paradigm = EParadigm::Polite, typename T = void, more::enable_if_t<!std::is_void< T >::value, int > = 0>
constexpr auto OutcomeCombine (const EApparatusStatus Status, const TPoliteOutcome< T > &Outcome)
 Combine into a polite outcome.
 
template<EParadigm Paradigm = EParadigm::Polite, typename T = void, typename std::enable_if< IsPayloadType< more::flatten_t< T > >(), int >::type = 0>
constexpr auto OutcomeCombine (T &&Payload)
 Combine single payload bypassing it.
 
template<EParadigm Paradigm = EParadigm::SafeHarsh, typename A = void, typename B = void, more::enable_if_t<(IsPayloadType< more::flatten_t< A > >()) &&(IsPayloadType< more::flatten_t< B > >()), int > = 0>
constexpr auto OutcomeCombine (A &&PayloadA, B &&PayloadB)
 Combine two payloads as outcomes.
 
template<typename APayloadT , typename T , typename std::enable_if< IsPayloadType< typename more::flatten< APayloadT >::type >() &&std::is_same< more::flatten_t< T >, THarshOutcome< void > >(), int >::type = 0>
constexpr auto OutcomeCombine (APayloadT &&A, T &&B)
 Combine a payload with a harsh empty outcome.
 
template<typename APayloadT , typename BPayloadT , typename std::enable_if< IsPayloadType< more::flatten_t< APayloadT > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (APayloadT &&A, THarshOutcome< BPayloadT > &&B)
 Combine a payload with a harsh non-empty outcome.
 
template<typename APayloadT , typename BPayloadT , typename std::enable_if< IsPayloadType< more::flatten_t< APayloadT > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (APayloadT &&A, const THarshOutcome< BPayloadT > &B)
 Combine a payload with a harsh non-empty one.
 
template<typename APayloadT , typename std::enable_if< IsPayloadType< more::flatten_t< APayloadT > >(), int >::type = 0>
constexpr auto OutcomeCombine (APayloadT &&A, const TPoliteOutcome< void > &B)
 Combine a payload with a polite one.
 
template<typename APayloadT , typename BPayloadT , typename std::enable_if< IsPayloadType< more::flatten_t< APayloadT > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (APayloadT &&A, TPoliteOutcome< BPayloadT > &&B)
 Combine a payload with a polite non-empty one.
 
template<typename APayloadT , typename BPayloadT , typename std::enable_if< IsPayloadType< more::flatten_t< APayloadT > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (APayloadT &&A, const TPoliteOutcome< BPayloadT > &B)
 Combine a payload with a polite non-empty one.
 
template<typename PayloadT >
constexpr auto OutcomeCombine (THarshOutcome< PayloadT > &&Outcome)
 Bypass the harsh outcome.
 
template<typename PayloadT >
constexpr auto OutcomeCombine (const THarshOutcome< PayloadT > &Outcome)
 Bypass the harsh outcome.
 
template<typename T , typename BPayloadT , typename std::enable_if< IsHarshOutcomeType< more::flatten_t< T > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (T &&A, THarshOutcome< BPayloadT > &&B)
 Combine two harsh outcomes into a new harsh outcome.
 
template<typename T , typename BPayloadT , typename std::enable_if< IsHarshOutcomeType< more::flatten_t< T > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (T &&A, const THarshOutcome< BPayloadT > &B)
 Combine two harsh outcomes into a new harsh outcome.
 
template<typename APayloadT , typename T , typename std::enable_if< std::is_same< more::flatten_t< T >, THarshOutcome< void > >::value, int >::type = 0>
constexpr auto OutcomeCombine (const THarshOutcome< APayloadT > &A, T &&B)
 Combine two harsh outcomes with and without a payload into a new harsh outcome.
 
template<typename APayloadT , typename T , typename std::enable_if< std::is_same< more::flatten_t< T >, THarshOutcome< void > >::value, int >::type = 0>
constexpr auto OutcomeCombine (THarshOutcome< APayloadT > &&A, T &&B)
 Combine two harsh outcomes with and without a payload into a new harsh outcome.
 
template<typename APayloadT , typename BPayloadT , typename std::enable_if< std::is_void< APayloadT >::value||!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (const THarshOutcome< APayloadT > &A, TPoliteOutcome< BPayloadT > &&B)
 Combine a harsh outcome with a polite one, producing a polite outcome.
 
template<typename APayloadT , typename BPayloadT , typename std::enable_if< std::is_void< APayloadT >::value||!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (const THarshOutcome< APayloadT > &A, const TPoliteOutcome< BPayloadT > &B)
 Combine a harsh outcome with a polite one, producing a polite outcome.
 
template<typename APayloadT , typename std::enable_if<!std::is_void< APayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (THarshOutcome< APayloadT > &&A, TPoliteOutcome< void > &&B)
 Combine a non-empty harsh outcome with a polite empty one.
 
template<typename APayloadT , typename std::enable_if<!std::is_void< APayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (const THarshOutcome< APayloadT > &A, const TPoliteOutcome< void > &B)
 Combine a non-empty harsh outcome with a polite empty one.
 
template<typename PayloadT >
constexpr auto OutcomeCombine (TPoliteOutcome< PayloadT > &&Outcome)
 Bypass the polite outcome.
 
template<typename PayloadT >
constexpr auto OutcomeCombine (const TPoliteOutcome< PayloadT > &Outcome)
 Bypass the polite outcome.
 
template<typename APayloadT , typename BPayloadT , typename std::enable_if<!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (const TPoliteOutcome< APayloadT > &A, TPoliteOutcome< BPayloadT > &&B)
 Combine two polite outcomes into a new polite outcome while moving the second outcome.
 
template<typename APayloadT , typename BPayloadT , typename std::enable_if<!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (const TPoliteOutcome< APayloadT > &A, const TPoliteOutcome< BPayloadT > &B)
 Combine two polite outcomes with payloads into a new polite outcome with a payload.
 
template<typename APayloadT , typename std::enable_if<!std::is_void< APayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (TPoliteOutcome< APayloadT > &&A, const TPoliteOutcome< void > &B)
 Combine two polite outcomes into a new polite outcome with a payload moved from the first argument.
 
template<typename APayloadT , typename std::enable_if<!std::is_void< APayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (const TPoliteOutcome< APayloadT > &A, const TPoliteOutcome< void > &B)
 Combine two polite outcomes into a new polite outcome with a payload copied from the first argument.
 
template<typename T1 , typename T2 , typename std::enable_if< std::is_same< more::flatten_t< T1 >, TPoliteOutcome< void > >::value &&std::is_same< more::flatten_t< T2 >, TPoliteOutcome< void > >::value, int >::type = 0>
constexpr TPoliteOutcome< void > OutcomeCombine (T1 &&A, T2 &&B)
 Combine two empty polite outcomes into a new polite outcome.
 
template<typename APayloadT , typename BPayloadT , typename std::enable_if<!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (const TPoliteOutcome< APayloadT > &A, THarshOutcome< BPayloadT > &&B)
 Combine a polite outcome with a harsh one.
 
template<typename APayloadT , typename BPayloadT , typename std::enable_if<!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine (const TPoliteOutcome< APayloadT > &A, const THarshOutcome< BPayloadT > &B)
 Combine a polite outcome with a harsh one.
 
template<typename APayloadT >
constexpr TPoliteOutcome< APayloadT > OutcomeCombine (TPoliteOutcome< APayloadT > &&A, const THarshOutcome< void > &B)
 Combine a polite empty outcome with a harsh one.
 
template<typename APayloadT >
constexpr auto OutcomeCombine (const TPoliteOutcome< APayloadT > &A, const THarshOutcome< void > &B)
 Combine a polite empty outcome with a harsh one.
 
template<typename OutcomeT1 , typename OutcomeT2 , typename OutcomeT3 , typename... OtherOutcomeTs>
constexpr TOutcomeCombiner< more::flatten_t< OutcomeT1 >, more::flatten_t< OutcomeT2 >, more::flatten_t< OutcomeT3 >, more::flatten_t< OtherOutcomeTs >... >::Type OutcomeCombine (OutcomeT1 &&Outcome1, OutcomeT2 &&Outcome2, OutcomeT3 &&Outcome3, OtherOutcomeTs &&... OtherOutcomes)
 Combine multiple outcomes.
 
template<size_t N>
constexpr THarshOutcome< void > OutcomeCombine (const THarshOutcome< void >(&Outcomes)[N], const THarshOutcome< void > DefaultOutcome=THarshOutcome< void >())
 Combine several outcomes deriving a new one based on them.
 
template<typename PayloadT , size_t N>
THarshOutcome< PayloadT > OutcomeCombine (const THarshOutcome< PayloadT >(&Outcomes)[N], const THarshOutcome< PayloadT > &DefaultOutcome)
 Combine several outcomes deriving a new one based on them.
 
template<typename PayloadT , size_t N>
constexpr THarshOutcome< PayloadT > OutcomeCombine (const THarshOutcome< PayloadT >(&Outcomes)[N], const PayloadT &DefaultPayload)
 Combine several outcomes deriving a new one based on them.
 
template<size_t N>
constexpr EApparatusStatus OutcomeCombine (const EApparatusStatus(&Outcomes)[N], const EApparatusStatus DefaultOutcome=EApparatusStatus::Noop)
 Combine several polite outcomes deriving a new one based on them.
 
template<size_t N>
constexpr TPoliteOutcome< void > OutcomeCombine (const TPoliteOutcome< void >(&Outcomes)[N], const TPoliteOutcome< void > DefaultOutcome=TPoliteOutcome< void >(EApparatusStatus::Noop))
 Combine several polite outcomes deriving a new one based on them.
 
template<typename PayloadT , size_t N>
TPoliteOutcome< PayloadT > OutcomeCombine (const TPoliteOutcome< PayloadT >(&Outcomes)[N], const TPoliteOutcome< PayloadT > &DefaultOutcome)
 Combine several polite outcomes deriving a new one based on them.
 
template<typename PayloadT , size_t N>
TPoliteOutcome< PayloadT > OutcomeCombine (const TPoliteOutcome< PayloadT >(&Outcomes)[N], const PayloadT &DefaultPayload)
 Combine several polite outcomes deriving a new one based on them.
 
THarshOutcome< void > OutcomeCombine (std::initializer_list< THarshOutcome< void > > Outcomes)
 Combine several outcomes deriving a new one based on them.
 
template<typename PayloadT , typename std::enable_if< IsPayloadType< typename more::flatten< PayloadT >::type >(), int >::type = 0>
THarshOutcome< PayloadT > OutcomeCombine (std::initializer_list< THarshOutcome< PayloadT > > Outcomes, const PayloadT &DefaultPayload)
 Combine several outcomes deriving a new one based on them.
 
template<typename PayloadT >
THarshOutcome< PayloadT > OutcomeCombine (std::initializer_list< THarshOutcome< PayloadT > > Outcomes, const THarshOutcome< PayloadT > &DefaultOutcome)
 Combine several outcomes deriving a new one based on them.
 
TPoliteOutcome< void > OutcomeCombine (std::initializer_list< TPoliteOutcome< void > > Outcomes, const EApparatusStatus DefaultStatus=EApparatusStatus::Noop)
 Combine several polite outcomes deriving a new one based on them.
 
template<typename PayloadT >
TPoliteOutcome< PayloadT > OutcomeCombine (std::initializer_list< TPoliteOutcome< PayloadT > > Outcomes, const TPoliteOutcome< PayloadT > &DefaultOutcome)
 Combine several polite outcomes deriving a new one based on them.
 

Detailed Description

The Apparatus status reporting facility.

Macro Definition Documentation

◆ APPARATUS_REPEAT_REPORT

#define APPARATUS_REPEAT_REPORT (   Status,
  Format,
  ... 
)
Value:
{ \
if (!OK(Status)) \
{ \
{ \
UE_LOG(LogApparatus, \
Fatal, \
TEXT("↳: ") Format, \
##__VA_ARGS__); \
} \
else \
{ \
UE_LOG(LogApparatus, \
Error, \
TEXT("↳: ") Format, \
##__VA_ARGS__); \
} \
} \
else \
{ \
iAPPARATUS_REPORT_POSITIVE(TEXT("↳: ") Format, \
##__VA_ARGS__); \
} \
}
constexpr bool OK(const EApparatusStatus Status)
Check if the status is a successful one.
Definition: ApparatusStatus.h:210
@ Error
General error identifier.
@ FatalError
Fatal error, leading to termination of execution.

Repeat the report got from a previously called function.

◆ APPARATUS_REPORT

#define APPARATUS_REPORT (   Status,
  Format,
  ... 
)
Value:
{ \
if (!OK(EApparatusStatus::Status)) \
{ \
if (EApparatusStatus::Status < EApparatusStatus::FatalError) \
{ \
UE_LOG(LogApparatus, \
Fatal, \
APPARATUS_STRINGIFY(Status) ": " Format, \
##__VA_ARGS__); \
} \
else \
{ \
EApparatusStatus::Status, \
FString::Printf(Format, ##__VA_ARGS__)); \
} \
} \
else \
{ \
iAPPARATUS_REPORT_POSITIVE(APPARATUS_STRINGIFY(Status) ": " Format, \
##__VA_ARGS__); \
} \
}
#define APPARATUS_STRINGIFY(symbol)
Stringify a symbol.
Definition: ApparatusStatus.h:5205
static FReportStatusDelegate ReportError
Called to report an error status.
Definition: ApparatusStatus.h:5249

Report a status with a formatted message.

Parameters
StatusThe status to report but without the EApparatusStatus:: prefix.
FormatThe format string to report with.
...The arguments to use within the format string.

◆ APPARATUS_REPORT_SUCCESS

#define APPARATUS_REPORT_SUCCESS (   Format,
  ... 
)
Value:
{ \
APPARATUS_REPORT(Success, Format, ##__VA_ARGS__); \
}
@ Success
Success status.

Report a success status with a formatted message.

◆ APPARATUS_STRINGIFY

#define APPARATUS_STRINGIFY (   symbol)    #symbol

Stringify a symbol.

◆ AssessCondition

#define AssessCondition (   Paradigm,
  Expr,
  Status 
)
Value:
if (IsPolite(Paradigm)) \
{ \
if (!(Expr)) \
{ \
return Status; \
} \
} \
else \
{ \
check(Expr); \
}
constexpr bool IsPolite()
Check if the paradigm type is polite.
Definition: Paradigm.h:315

Make sure the check is passing or otherwise either return a status or raise an assertion failure.

Parameters
ParadigmThe paradigm of the method.
ExprThe expression to evaluate.
StatusThe status to return in case of an error.

◆ AssessConditionFormat

#define AssessConditionFormat (   Paradigm,
  Expression,
  Status,
  Format,
  ... 
)
Value:
if (IsPolite(Paradigm)) \
{ \
if (!(Expression)) \
{ \
return Status; \
} \
} \
else \
{ \
checkf(Expression, Format, ##__VA_ARGS__); \
}

Make sure the check is passing or otherwise either return a status or raise an assertion failure.

Message version.

Parameters
ParadigmThe paradigm of the method.
ExpressionThe expression to evaluate.
StatusThe status to return in case of an error.
FormatThe formatting message to output in case of an error.
...The arguments for the formatting.

◆ AssessConditionOK

#define AssessConditionOK (   Paradigm,
  Expression 
)
Value:
if (IsPolite(Paradigm)) \
{ \
const auto _Outcome##__LINE__ = ExecuteWithOutcome<Paradigm>([&]() \
{ \
return Expression; \
}); \
if (!OK(_Outcome##__LINE__)) \
{ \
return _Outcome##__LINE__; \
} \
} \
else \
{ \
check(OK(Expression)); \
}

Make sure the statement is successful or otherwise either return its resulting status or just execute it.

Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.

◆ AssessConditionOKf

#define AssessConditionOKf (   Paradigm,
  Expression,
  Format,
  ... 
)
Value:
if (IsPolite(Paradigm)) \
{ \
const auto _Outcome##__LINE__ = ExecuteWithOutcome<Paradigm>([&]() \
{ \
return Expression; \
}); \
if (!OK(_Outcome##__LINE__)) \
{ \
return _Outcome##__LINE__; \
} \
} \
else \
{ \
checkf(OK(Expression), Format, ##__VA_ARGS__); \
}

Make sure the statement is successful or otherwise either return its resulting status or just execute it.

Textural formatting version.

Parameters
ParadigmA paradigm to assess under.
ExpressionThe expression to assess.
FormatThe formatting message. Uses standard % formatting.
...The arguments for the message being formatted.

◆ AssessFinalizeOK

#define AssessFinalizeOK (   Paradigm,
  Expression,
  Finalize 
)
Value:
if (IsPolite(Paradigm)) \
{ \
const auto _Outcome##__LINE__ = ExecuteWithOutcome<Paradigm>([&]() \
{ \
return Expression; \
}); \
if (!OK(_Outcome##__LINE__)) \
{ \
Finalize; \
return _Outcome##__LINE__; \
} \
} \
else \
{ \
verify(OK(Expression)); \
}

Make sure the statement is successful or otherwise either return its resulting status or just execute it.

Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.
FinalizeThe statement to finalize with.

◆ AssessFinalizeOKf

#define AssessFinalizeOKf (   Paradigm,
  Expression,
  Finalize,
  Format,
  ... 
)
Value:
if (IsPolite(Paradigm)) \
{ \
const auto _Outcome##__LINE__ = ExecuteWithOutcome<Paradigm>([&]() \
{ \
return Expression; \
}); \
if (!OK(_Outcome##__LINE__)) \
{ \
Finalize; \
return _Outcome##__LINE__; \
} \
} \
else \
{ \
verifyf(OK(Expression), Format, ##__VA_ARGS__); \
}

Make sure the statement is successful or otherwise either return its resulting status or just execute it.

Textural formatting version.

Parameters
ParadigmA paradigm to assess under.
ExpressionThe expression to assess.
FinalizeThe statement to finalize with.
FormatThe formatting message. Uses standard % formatting.
...The arguments for the message being formatted.

◆ AssessOK

#define AssessOK (   Paradigm,
  Expression 
)
Value:
if (IsPolite(Paradigm)) \
{ \
const auto _Outcome##__LINE__ = ExecuteWithOutcome<Paradigm>([&]() \
{ \
return Expression; \
}); \
if (!OK(_Outcome##__LINE__)) \
{ \
return _Outcome##__LINE__; \
} \
} \
else \
{ \
verify(OK(Expression)); \
}

Make sure the statement is successful or otherwise either return its resulting status or just execute it.

Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.

◆ AssessOKFormat

#define AssessOKFormat (   Paradigm,
  Expression,
  Format,
  ... 
)
Value:
if (IsPolite(Paradigm)) \
{ \
const auto _Outcome##__LINE__ = ExecuteWithOutcome<Paradigm>([&]() \
{ \
return Expression; \
}); \
if (!OK(_Outcome##__LINE__)) \
{ \
return _Outcome##__LINE__; \
} \
} \
else \
{ \
verifyf(OK(Expression), Format, ##__VA_ARGS__); \
}

Make sure the statement is successful or otherwise either return its resulting status or just execute it.

Textural formatting version.

Parameters
ParadigmA paradigm to assess under.
ExpressionThe expression to assess.
FormatThe formatting message. Uses standard % formatting.
...The arguments for the message being formatted.

◆ Avoid

#define Avoid (   Paradigm,
  Expression 
)
Value:
[&]() \
{ \
if (IsPolite(Paradigm)) \
{ \
return Expression; \
} \
else \
{ \
verify(!(Expression)); \
return false; \
} \
}()

Avoid a certain event.

Performs a verify() and returns false, if the paradigm is harsh.

Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.
Returns
The state of assessment.

◆ AvoidCondition

#define AvoidCondition (   Paradigm,
  Expression 
)
Value:
[&]() \
{ \
if (IsPolite(Paradigm)) \
{ \
return Expression; \
} \
else \
{ \
check(!(Expression)); \
return false; \
} \
}()

Avoid a certain state.

Performs a check() and returns false, if the paradigm is harsh.

Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.
Returns
The state of assessment.

◆ AvoidConditionFormat

#define AvoidConditionFormat (   Paradigm,
  Expression,
  Format,
  ... 
)
Value:
[&]() \
{ \
if (IsPolite(Paradigm)) \
{ \
return Expression; \
} \
else \
{ \
checkf(!(Expression), Format, ##__VA_ARGS__); \
return false; \
} \
}()

Avoid a certain state.

Performs a check() and returns false, if the paradigm is harsh.

Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.
FormatThe formatting message. Uses standard % formatting.
...The arguments for the message being formatted.
Returns
The state of assessment.

◆ AvoidError

#define AvoidError (   Paradigm,
  Expression 
)
Value:
[&]() \
{ \
if (IsPolite(Paradigm)) \
{ \
const auto _Outcome##__LINE__ = ExecuteWithOutcome<Paradigm>([&]() \
{ \
return Expression; \
}); \
if (!OK(_Outcome##__LINE__)) \
{ \
GApparatusLastError = ToStatus(_Outcome##__LINE__); \
return true; \
} \
return false; \
} \
else \
{ \
verify(OK(Expression)); \
return false; \
} \
}()
constexpr EApparatusStatus ToStatus(const EApparatusStatus Status)
Universal conversion to a status.
Definition: ApparatusStatus.h:228

Avoid an erroneous statement.

Performs a verify() and returns false, if the paradigm is harsh.

Warning
This macro is only for Apparatus-compatible APIs.
Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.
Returns
The state of assessment.

◆ AvoidErrorCondition

#define AvoidErrorCondition (   Paradigm,
  Expression 
)
Value:
[&]() \
{ \
if (IsPolite(Paradigm)) \
{ \
const auto _Outcome##__LINE__ = ExecuteWithOutcome<Paradigm>([&]() \
{ \
return Expression; \
}); \
if (!OK(_Outcome##__LINE__)) \
{ \
GApparatusLastError = ToStatus(_Outcome##__LINE__); \
return true; \
} \
return false; \
} \
else \
{ \
check(OK(Expression)); \
return false; \
} \
}()

Avoid an erroneous condition.

Performs a check() and returns false, if the paradigm is harsh.

Warning
This macro is only for Apparatus-compatible APIs.
Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.
Returns
The state of assessment.

◆ AvoidErrorConditionFormat

#define AvoidErrorConditionFormat (   Paradigm,
  Expression,
  Format,
  ... 
)
Value:
[&]() \
{ \
if (IsPolite(Paradigm)) \
{ \
const auto _Outcome##__LINE__ = ExecuteWithOutcome<Paradigm>([&]() \
{ \
return Expression; \
}); \
if (!OK(_Outcome##__LINE__)) \
{ \
GApparatusLastError = ToStatus(_Outcome##__LINE__); \
return true; \
} \
return false; \
} \
else \
{ \
checkf(OK(Expression), Format, ##__VA_ARGS__); \
return false; \
} \
}()

Avoid an erroneous condition with a formatting message.

Performs a check() and returns false, if the paradigm is harsh.

Warning
This macro is only for Apparatus-compatible APIs.
Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.
FormatThe formatting message. Uses standard % formatting.
...The arguments for the message being formatted.
Returns
The state of assessment.

◆ AvoidErrorFormat

#define AvoidErrorFormat (   Paradigm,
  Expression,
  Format,
  ... 
)
Value:
[&]() \
{ \
if (IsPolite(Paradigm)) \
{ \
const auto _Outcome##__LINE__ = ExecuteWithOutcome<Paradigm>([&]() \
{ \
return Expression; \
}); \
if (!OK(_Outcome##__LINE__)) \
{ \
GApparatusLastError = ToStatus(_Outcome##__LINE__); \
return true; \
} \
return false; \
} \
else \
{ \
verifyf(OK(Expression), Format, ##__VA_ARGS__); \
return false; \
} \
}()

Avoid an erroneous statement with a formatting message.

Performs a verify() and returns false, if the paradigm is harsh.

Warning
This macro is only for Apparatus-compatible APIs.
Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.
FormatThe formatting message. Uses standard % formatting.
...The arguments for the message being formatted.
Returns
The state of assessment.

◆ AvoidFormat

#define AvoidFormat (   Paradigm,
  Expression,
  Format,
  ... 
)
Value:
[&]() \
{ \
if (IsPolite(Paradigm)) \
{ \
return Expression; \
} \
else \
{ \
verifyf(!(Expression), Format, ##__VA_ARGS__); \
return false; \
} \
}()

Avoid a certain event.

Performs a verify() and returns false, if the paradigm is harsh.

Parameters
ParadigmThe paradigm to assess under.
ExpressionThe expression to assess. Guaranteed to be executed only once.
FormatThe formatting message. Uses standard % formatting.
...The arguments for the message being formatted.
Returns
The state of assessment.

◆ EnsuredPayload

#define EnsuredPayload (   Outcome)
Value:
([&]() \
{ \
const auto _Outcome##__LINE__ = (Outcome); \
ensureMsgf(OK(_Outcome##__LINE__), \
TEXT("Ensuring failed: %s"), \
*ToString(_Outcome##__LINE__)); \
return _Outcome##__LINE__.GetPayload(); \
}())
FString ToString(const EApparatusStatus Status)
Convert an Apparatus status variable to a string representation.
Definition: ApparatusStatus.h:442

Get the payload while ensuring the status of the corresponding outcome is OK().

Parameters
OutcomeThe outcome to ensure.

◆ EnsuredPayloadf

#define EnsuredPayloadf (   Outcome,
  Format,
  ... 
)
Value:
([&]() \
{ \
const auto _Outcome##__LINE__ = (Outcome); \
ensureMsgf(OK(_Outcome##__LINE__), \
Format, \
##__VA_ARGS__); \
return _Outcome##__LINE__.GetPayload(); \
}())

Get the payload while ensuring the status is OK().

Formatting version.

Parameters
OutcomeThe outcome to ensure.
FormatThe formatting message. Uses standard % formatting.
...The arguments for the message being formatted.

◆ EnsureOK

#define EnsureOK (   Outcome)
Value:
([&]() \
{ \
const auto _Outcome##__LINE__ = (Outcome); \
return ensureMsgf(OK(_Outcome##__LINE__), \
TEXT("Ensuring has failed: %s"), \
*ToString(_Outcome##__LINE__)); \
}())

Ensure the outcome is OK().

Parameters
OutcomeThe outcome to ensure.

◆ iAPPARATUS_REPORT_POSITIVE

#define iAPPARATUS_REPORT_POSITIVE (   Format,
  ... 
)

◆ VerifyOK

#define VerifyOK (   Outcome)
Value:
([&]() \
{ \
const auto _Outcome##__LINE__ = (Outcome); \
verifyf(OK(_Outcome##__LINE__), \
TEXT("Verifying has failed with error: %s"), \
*ToString(_Outcome##__LINE__)); \
}())

Verify the outcome is OK().

Parameters
OutcomeThe outcome to ensure.

Typedef Documentation

◆ TOutcome

template<EParadigm Paradigm, typename PayloadT = void>
using TOutcome = typename std::conditional< std::is_void<PayloadT>::value, typename std::conditional< IsPolite(Paradigm), EApparatusStatus, THarshOutcome<void> >::type, typename std::conditional< IsPolite(Paradigm), TPoliteOutcome<PayloadT>, PayloadT>::type>::type

A general Apparatus function/method outcome.

The outcome is a special status delivery mechanism.

Note
If the payload is specified (non-void), it will be used as an outcome itself in case of a harsh paradigm.
Template Parameters
ParadigmThe paradigm type in question.
PayloadTThe type of an optional payload to deliver.

◆ TOutcomeIf

template<EParadigm Paradigm, bool Condition, typename PayloadT = void>
using TOutcomeIf = typename std::enable_if<Condition, TOutcome<Paradigm, PayloadT> >::type

A general Apparatus function/method outcome available if a condition is a succeeding one.

Template Parameters
ParadigmThe paradigm type in question.
ConditionThe condition to examine.
PayloadTThe type of an optional payload to deliver.

◆ TOutcomeIfUnsafe

template<EParadigm Paradigm, typename PayloadT = void>
using TOutcomeIfUnsafe = TEnableIfUnsafe<Paradigm, TOutcome<Paradigm, PayloadT> >

A general Apparatus function/method outcome available in an unsafe mode only.

Template Parameters
ParadigmThe paradigm type in question.
PayloadTThe type of an optional payload to deliver.

◆ TOutcomeIfUnsafeOr

template<EParadigm Paradigm, bool Condition, typename PayloadT = void>
using TOutcomeIfUnsafeOr = TEnableIfUnsafeOr<Paradigm, Condition, TOutcome<Paradigm, PayloadT> >

A general Apparatus function/method outcome available in an unsafe mode or under a specific condition.

Template Parameters
ParadigmThe paradigm type in question.
ConditionShould the outcome be enabled still.
PayloadTThe type of an optional payload to deliver.

◆ TPayloadTypeSecurity

template<typename T >
using TPayloadTypeSecurity = more::enable_if_t<IsPayloadType<T>(), bool>

◆ TPortableOutcome

template<typename PayloadT = void>
using TPortableOutcome = TOutcome<EParadigm::DefaultPortable, PayloadT>

A portable Apparatus outcome used in virtual methods and other compatiblity layers.

Template Parameters
PayloadTThe type of an optional payload to deliver.

Enumeration Type Documentation

◆ EApparatusStatus

enum class EApparatusStatus : int8
strong

The general Apparatus operation status type.

Apparatus uses its own status reporting mechanism where applicable. Values greater than or equal to EApparatusStatus::Success are variations of success, lesser than - are errors.

Remarks
Report() functions should be used to report the status.
See also
Report()
Enumerator
Noop 

Nothing was actually performed, but is still considered to be a success.

Success 

Success status.

The "no-error" identifier.

Reused 

The delivered item was actually reused.

NoItems 

Success with no items collected status.

The operation has completed successfully but there were no items gathered.

Deferred 

Deferred action status.

The operation has completed successfully but the actual changes are deferred to happen at some later time.

Error 

General error identifier.

InvalidArgument 

One of the arguments' value was invalid.

NullArgument 

One of the required arguments was NULL.

OutOfRange 

The argument is out of range of allowed values.

NoMore 

No more items available within the stream/iterating or the operation is no longer viable.

NotAvailable 

Some kind of entity is not currently available.

Missing 

Some kind of entity was not found.

InvalidOperation 

The operation is not valid in the current state.

InvalidState 

The current state is invalid (corrupted).

WrongType 
UnsupportedOperation 

The operation seems valid but is currently not supported.

NoImplementation 

The needed implementation for the (virtual) operation is missing.

Conflict 

There is some kind of conflict or contradiction that has prevented the operation to succeed.

SanityCheckFailed 

There is some kind of sanity check that has failed while executing the operation.

NoPermission 

The operation is not permitted due to security reasons.

OutOfLimit 

The limit for some entities has been reached.

NoMemory 

Memory allocation has failed.

FatalError 

Fatal error, leading to termination of execution.

Function Documentation

◆ ExecuteWithOutcome() [1/6]

template<EParadigm Paradigm, typename L >
constexpr auto ExecuteWithOutcome ( const L Lambda)
inlineconstexpr

◆ ExecuteWithOutcome() [2/6]

template<EParadigm Paradigm, typename L >
constexpr TOutcome< Paradigm > ExecuteWithOutcome ( const L Lambda,
EApparatusStatus(L::*)(void) const   
)
inlineconstexpr

◆ ExecuteWithOutcome() [3/6]

template<EParadigm Paradigm, typename L , typename PayloadT >
constexpr TOutcome< Paradigm, PayloadT > ExecuteWithOutcome ( const L Lambda,
PayloadT(L::*)(void) const   
)
inlineconstexpr

◆ ExecuteWithOutcome() [4/6]

template<EParadigm Paradigm, typename L , typename PayloadT >
constexpr TOutcome< Paradigm, PayloadT > ExecuteWithOutcome ( const L Lambda,
THarshOutcome< PayloadT >(L::*)(void) const   
)
inlineconstexpr

◆ ExecuteWithOutcome() [5/6]

template<EParadigm Paradigm, typename L , typename PayloadT >
constexpr TOutcome< Paradigm, PayloadT > ExecuteWithOutcome ( const L Lambda,
TPoliteOutcome< PayloadT >(L::*)(void) const   
)
inlineconstexpr

◆ ExecuteWithOutcome() [6/6]

template<EParadigm Paradigm, typename L >
constexpr TOutcome< Paradigm, void > ExecuteWithOutcome ( const L Lambda,
void(L::*)(void) const   
)
inlineconstexpr

◆ GetPayload() [1/5]

template<typename PayloadT >
constexpr PayloadT GetPayload ( const THarshOutcome< PayloadT > &  Outcome)
inlineconstexpr

Get a harsh outcome's payload in a universal manner.

◆ GetPayload() [2/5]

void GetPayload ( const THarshOutcome< void > &  )
inline

Get an empty harsh outcome's payload in a universal manner.

Note
Does nothing and returns nothing.

◆ GetPayload() [3/5]

template<typename PayloadT >
constexpr PayloadT GetPayload ( const TPoliteOutcome< PayloadT > &  Outcome)
inlineconstexpr

Get a polite outcome's payload in a universal manner.

◆ GetPayload() [4/5]

void GetPayload ( const TPoliteOutcome< void > &  )
inline

Get an empty polite outcome's payload in a universal manner.

Note
Does nothing and returns nothing.

◆ GetPayload() [5/5]

template<typename T , more::enable_if_t< IsPayloadType< more::flatten_t< T > >(), int > = 0>
constexpr bool GetPayload ( T &&  Payload)
inlineconstexpr

Any other outcome is considered to be a payload which is just returned.

◆ IsHarshOutcomeType()

template<typename T >
constexpr bool IsHarshOutcomeType ( )
inlineconstexpr

Check if a type is a harsh outcome.

Template Parameters
TThe type to examine.
Returns
The state of examination.

◆ IsNoop() [1/4]

constexpr bool IsNoop ( const EApparatusStatus  Status)
inlineconstexpr

Check if a status is a noop.

◆ IsNoop() [2/4]

template<typename T , more::enable_if_t< IsPayloadType< more::flatten_t< T > >(), bool > = true>
constexpr bool IsNoop ( const T )
inlineconstexpr

Any other outcome is considered to be a payload which is never a noop.

◆ IsNoop() [3/4]

template<typename PayloadT >
constexpr bool IsNoop ( const THarshOutcome< PayloadT > &  )
inlineconstexpr

Confirm the harsh outcome to be a successful noop.

Harsh outcomes are never considered to be noops.

◆ IsNoop() [4/4]

template<typename PayloadT >
constexpr bool IsNoop ( const TPoliteOutcome< PayloadT > &  Outcome)
inlineconstexpr

Check if an outcome is be a successful one.

◆ IsOutcomeArrayType()

template<typename T >
constexpr bool IsOutcomeArrayType ( )
inlineconstexpr

◆ IsOutcomeType()

template<typename T >
constexpr bool IsOutcomeType ( )
inlineconstexpr

Check if a type is an outcome.

Template Parameters
TThe type to examine.
Returns
The state of examination.

◆ IsPayloadType()

template<typename T >
constexpr bool IsPayloadType ( )
inlineconstexpr

Check if a type is a payload.

Template Parameters
TThe type to examine.
Returns
The state of examination.

◆ IsPoliteOutcomeType()

template<typename T >
constexpr bool IsPoliteOutcomeType ( )
inlineconstexpr

Check if a type is a polite outcome.

Template Parameters
TThe type to examine.
Returns
The state of examination.

◆ IsStatusArrayType()

template<typename T >
constexpr bool IsStatusArrayType ( )
inlineconstexpr

◆ IsStatusType()

template<typename T >
constexpr bool IsStatusType ( )
inlineconstexpr

Check if the passed in type is a status.

Template Parameters
TThe type to check.
Returns
The state of examination.

◆ OK() [1/6]

constexpr bool OK ( const EApparatusStatus  Status)
inlineconstexpr

Check if the status is a successful one.

◆ OK() [2/6]

template<typename PayloadT , more::enable_if_t< IsPayloadType< more::flatten_t< PayloadT > >(), int > = 0>
constexpr bool OK ( const PayloadT &  )
inlineconstexpr

Any other outcome is considered to be a payload which is also always a valid success.

Template Parameters
PayloadTThe type of the payload to examine.

◆ OK() [3/6]

template<typename PayloadT >
constexpr bool OK ( const THarshOutcome< PayloadT > &  )
inlineconstexpr

Confirm the harsh outcome to be a successful one.

Harsh outcomes are always considered to be successful.

◆ OK() [4/6]

template<typename PayloadT >
constexpr bool OK ( const TPoliteOutcome< PayloadT > &  Outcome)
inlineconstexpr

Check if an outcome is be a successful one.

◆ OK() [5/6]

template<typename PayloadT >
constexpr bool OK ( std::initializer_list< THarshOutcome< PayloadT > >  Outcomes)
inlineconstexpr

Check if all outcomes are OK.

Initializer list version.

◆ OK() [6/6]

template<typename PayloadT >
bool OK ( std::initializer_list< TPoliteOutcome< PayloadT > >  Outcomes)
inline

Check if all outcomes are OK.

Initializer list version.

◆ operator+()

constexpr EApparatusStatus operator+ ( const EApparatusStatus  A,
const EApparatusStatus  B 
)
inlineconstexpr

Combine two statuses deriving a new one based on them.

Be warned the the order of evaluation for operator operands is not explicitly defined or guaranteed in C++ so B can be evaluated before A.

◆ operator+=() [1/3]

template<typename PayloadT >
EApparatusStatus operator+= ( const EApparatusStatus  A,
const PayloadT &  B 
)
inline

Accumulate a payload to an existing status.

◆ operator+=() [2/3]

template<typename PayloadT >
EApparatusStatus operator+= ( const PayloadT &  A,
const EApparatusStatus  B 
)
inline

Accumulate a status to an existing payload.

◆ operator+=() [3/3]

EApparatusStatus & operator+= ( EApparatusStatus A,
const EApparatusStatus  B 
)
inline

Accumulate a status to an existing status.

◆ OutcomeCombine() [1/52]

template<EParadigm Paradigm = EParadigm::SafePolite>
constexpr TOutcome< Paradigm, void > OutcomeCombine ( )
inlineconstexpr

Combine outcomes.

Zero arguments version.

Template Parameters
ParadigmThe paradigm to work under.
Returns
The resulting outcome. Just calls the default constructor.

◆ OutcomeCombine() [2/52]

template<EParadigm Paradigm = EParadigm::SafeHarsh, typename A = void, typename B = void, more::enable_if_t<(IsPayloadType< more::flatten_t< A > >()) &&(IsPayloadType< more::flatten_t< B > >()), int > = 0>
constexpr auto OutcomeCombine ( A &&  PayloadA,
B &&  PayloadB 
)
inlineconstexpr

Combine two payloads as outcomes.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
PayloadAThe first payload to combine.
PayloadBThe second payload to combine.
Returns
The resulting outcome. Just passes by the second payload.

◆ OutcomeCombine() [3/52]

template<typename APayloadT , typename BPayloadT , typename std::enable_if< IsPayloadType< more::flatten_t< APayloadT > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( APayloadT &&  A,
const THarshOutcome< BPayloadT > &  B 
)
inlineconstexpr

Combine a payload with a harsh non-empty one.

Template Parameters
APayloadTThe first outcome payload type.
Parameters
AThe first payload to combine.
BThe second outcome to combine.
Returns
The resulting harsh outcome. Basically returns the second argument.

◆ OutcomeCombine() [4/52]

template<typename APayloadT , typename BPayloadT , typename std::enable_if< IsPayloadType< more::flatten_t< APayloadT > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( APayloadT &&  A,
const TPoliteOutcome< BPayloadT > &  B 
)
inlineconstexpr

Combine a payload with a polite non-empty one.

Template Parameters
APayloadTThe first outcome payload type.
Parameters
AThe first payload to combine.
BThe second outcome to combine.
Returns
The resulting polite outcome. Basically returns the second argument.

◆ OutcomeCombine() [5/52]

template<typename APayloadT , typename std::enable_if< IsPayloadType< more::flatten_t< APayloadT > >(), int >::type = 0>
constexpr auto OutcomeCombine ( APayloadT &&  A,
const TPoliteOutcome< void > &  B 
)
inlineconstexpr

Combine a payload with a polite one.

Template Parameters
APayloadTThe first outcome payload type.
Parameters
AThe first payload to combine.
BThe second outcome to combine.
Returns
The resulting polite outcome. Basically the same as the first argument, since every harsh result is considered to be a success.

◆ OutcomeCombine() [6/52]

template<typename APayloadT , typename T , typename std::enable_if< IsPayloadType< typename more::flatten< APayloadT >::type >() &&std::is_same< more::flatten_t< T >, THarshOutcome< void > >(), int >::type = 0>
constexpr auto OutcomeCombine ( APayloadT &&  A,
T &&  B 
)
inlineconstexpr

Combine a payload with a harsh empty outcome.

Template Parameters
APayloadTThe first outcome payload type.
THarsh outcome type.
Parameters
AThe first payload to combine.
BThe second outcome to combine.
Returns
The resulting harsh outcome. Basically the same as the first argument, since every harsh result is considered to be a success.

◆ OutcomeCombine() [7/52]

template<typename APayloadT , typename BPayloadT , typename std::enable_if< IsPayloadType< more::flatten_t< APayloadT > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( APayloadT &&  A,
THarshOutcome< BPayloadT > &&  B 
)
inlineconstexpr

Combine a payload with a harsh non-empty outcome.

Moving version.

Template Parameters
APayloadTThe first outcome payload type.
Parameters
AThe first payload to combine.
BThe second outcome to combine.
Returns
The resulting harsh outcome. Basically returns the second argument.

◆ OutcomeCombine() [8/52]

template<typename APayloadT , typename BPayloadT , typename std::enable_if< IsPayloadType< more::flatten_t< APayloadT > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( APayloadT &&  A,
TPoliteOutcome< BPayloadT > &&  B 
)
inlineconstexpr

Combine a payload with a polite non-empty one.

Moving version.

Template Parameters
APayloadTThe first outcome payload type.
Parameters
AThe first payload to combine.
BThe second outcome to combine.
Returns
The resulting polite outcome. Basically returns the second argument.

◆ OutcomeCombine() [9/52]

constexpr EApparatusStatus OutcomeCombine ( const EApparatusStatus  Status)
inlineconstexpr

Combine a single status bypassing it.

Parameters
StatusThe status to bypass.
Returns
The resulting status. Just passes by the argument.

◆ OutcomeCombine() [10/52]

template<EParadigm Paradigm = EParadigm::Polite, typename T = void, more::enable_if_t<!std::is_void< T >::value, int > = 0>
constexpr auto OutcomeCombine ( const EApparatusStatus  Status,
const TPoliteOutcome< T > &  Outcome 
)
inlineconstexpr

Combine into a polite outcome.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
StatusThe status to combine.
OutcomeThe payload to combine with.
Returns
The resulting polite outcome. Just combines the status and the payload into a polite outcome..

◆ OutcomeCombine() [11/52]

template<EParadigm Paradigm = EParadigm::Polite, typename T , more::enable_if_t< IsPayloadType< more::flatten_t< T > >(), bool > = true>
constexpr auto OutcomeCombine ( const EApparatusStatus  Status,
T &&  Payload 
)
inlineconstexpr

Combine into a polite outcome.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the payload to combine with.
Parameters
StatusThe status to combine.
PayloadThe payload to combine with.
Returns
The resulting polite outcome. Just combines the status and the payload into a polite outcome..

◆ OutcomeCombine() [12/52]

template<EParadigm Paradigm = EParadigm::Polite, typename T = void, more::enable_if_t<!std::is_void< T >::value, int > = 0>
constexpr auto OutcomeCombine ( const EApparatusStatus  Status,
THarshOutcome< T > &&  Outcome 
)
inlineconstexpr

Combine into a polite outcome.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
StatusThe status to combine.
OutcomeThe payload to combine with.
Returns
The resulting polite outcome. Just combines the status and the payload into a polite outcome..

◆ OutcomeCombine() [13/52]

template<EParadigm Paradigm = EParadigm::Polite, typename T = void, more::enable_if_t<!std::is_void< T >::value, int > = 0>
constexpr auto OutcomeCombine ( const EApparatusStatus  Status,
TPoliteOutcome< T > &&  Outcome 
)
inlineconstexpr

Combine into a polite outcome.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
StatusThe status to combine.
OutcomeThe payload to combine with.
Returns
The resulting polite outcome. Just combines the status and the payload into a polite outcome..

◆ OutcomeCombine() [14/52]

constexpr EApparatusStatus OutcomeCombine ( const EApparatusStatus  StatusA,
const EApparatusStatus  StatusB 
)
inlineconstexpr

Combine two statuses as outcomes.

Parameters
StatusAThe first status to combine.
StatusBThe second status to combine.
Returns
The resulting status combination.

◆ OutcomeCombine() [15/52]

template<size_t N>
constexpr EApparatusStatus OutcomeCombine ( const EApparatusStatus(&)  Outcomes[N],
const EApparatusStatus  DefaultOutcome = EApparatusStatus::Noop 
)
inlineconstexpr

Combine several polite outcomes deriving a new one based on them.

Default outcome empty version.

Template Parameters
NThe number of elements in the array.
Parameters
OutcomesThe array of outcomes to combine.
DefaultOutcomeThe default outcome to be returned, when no outcomes are in the array.
Returns
The combined outcome.

◆ OutcomeCombine() [16/52]

template<typename APayloadT , typename BPayloadT , typename std::enable_if< std::is_void< APayloadT >::value||!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( const THarshOutcome< APayloadT > &  A,
const TPoliteOutcome< BPayloadT > &  B 
)
inlineconstexpr

Combine a harsh outcome with a polite one, producing a polite outcome.

Template Parameters
APayloadTThe payload type of the first outcome. Its payload is ignored. May be a void.
BPayloadTThe payload type of the second outcome.
Parameters
AThe first outcome to combine with. This is ignored here completely.
BThe second outcome to combine.
Returns
The resulting polite outcome. Basically returns the second argument.

◆ OutcomeCombine() [17/52]

template<typename APayloadT , typename std::enable_if<!std::is_void< APayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( const THarshOutcome< APayloadT > &  A,
const TPoliteOutcome< void > &  B 
)
inlineconstexpr

Combine a non-empty harsh outcome with a polite empty one.

Template Parameters
APayloadTThe payload type of the first outcome. May not be a void.
Parameters
AThe first outcome to combine with.
BThe second outcome to combine. This is basically what gets returned.
Returns
The resulting polite outcome getting its status from the second argument.

◆ OutcomeCombine() [18/52]

template<typename APayloadT , typename T , typename std::enable_if< std::is_same< more::flatten_t< T >, THarshOutcome< void > >::value, int >::type = 0>
constexpr auto OutcomeCombine ( const THarshOutcome< APayloadT > &  A,
T &&  B 
)
inlineconstexpr

Combine two harsh outcomes with and without a payload into a new harsh outcome.

Copying the first argument version.

Template Parameters
APayloadTThe payload type of the first outcome.
TThe type of the harsh outcome for universal referencing.
Parameters
AThe first outcome to combine with.
BThe second outcome to combine. This one is basically ignored here.
Returns
The resulting harsh outcome. Basically returns the first argument.

◆ OutcomeCombine() [19/52]

template<typename APayloadT , typename BPayloadT , typename std::enable_if< std::is_void< APayloadT >::value||!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( const THarshOutcome< APayloadT > &  A,
TPoliteOutcome< BPayloadT > &&  B 
)
inlineconstexpr

Combine a harsh outcome with a polite one, producing a polite outcome.

Moving the second argument version.

Template Parameters
APayloadTThe payload type of the first outcome. This is ignored here and may be a void.
BPayloadTThe payload type of the second outcome.
Parameters
AThe first outcome to combine while moving it. Its payload is ignored completely while the status is used.
BThe second outcome to combine.
Returns
The resulting polite outcome. Basically returns the second argument.

◆ OutcomeCombine() [20/52]

template<typename PayloadT >
constexpr auto OutcomeCombine ( const THarshOutcome< PayloadT > &  Outcome)
inlineconstexpr

Bypass the harsh outcome.

Template Parameters
PayloadTThe payload type of the outcome.
Parameters
OutcomeThe outcome to bypass.
Returns
The resulting harsh outcome.

◆ OutcomeCombine() [21/52]

template<typename PayloadT , size_t N>
constexpr THarshOutcome< PayloadT > OutcomeCombine ( const THarshOutcome< PayloadT >(&)  Outcomes[N],
const PayloadT &  DefaultPayload 
)
inlineconstexpr

Combine several outcomes deriving a new one based on them.

Default outcome version.

Template Parameters
NThe number of elements in the array.
PayloadTThe type of the payload in the outcomes.
Parameters
OutcomesThe array of outcomes to combine.
DefaultPayloadThe default payload to be returned, when no outcomes are in the array.

◆ OutcomeCombine() [22/52]

template<typename PayloadT , size_t N>
THarshOutcome< PayloadT > OutcomeCombine ( const THarshOutcome< PayloadT >(&)  Outcomes[N],
const THarshOutcome< PayloadT > &  DefaultOutcome 
)
inline

Combine several outcomes deriving a new one based on them.

Default outcome version.

Template Parameters
PayloadTThe type of the payload in the outcomes.
NThe number of elements in the array.
Parameters
OutcomesThe array of outcomes to combine.
DefaultOutcomeThe default outcome to be returned, when no outcomes are in the array.

◆ OutcomeCombine() [23/52]

template<size_t N>
constexpr THarshOutcome< void > OutcomeCombine ( const THarshOutcome< void >(&)  Outcomes[N],
const THarshOutcome< void >  DefaultOutcome = THarshOutcome<void>() 
)
inlineconstexpr

Combine several outcomes deriving a new one based on them.

Default outcome empty version.

Template Parameters
NThe number of elements in the array.
Parameters
OutcomesThe array of outcomes to combine.
DefaultOutcomeThe default outcome to be returned, when no outcomes are in the array.

◆ OutcomeCombine() [24/52]

template<typename APayloadT , typename BPayloadT , typename std::enable_if<!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( const TPoliteOutcome< APayloadT > &  A,
const THarshOutcome< BPayloadT > &  B 
)
inlineconstexpr

Combine a polite outcome with a harsh one.

Template Parameters
APayloadTThe first outcome payload type.
BPayloadTThe second outcome payload type. May not be a void.
Parameters
AThe first outcome to combine.
BThe second outcome to combine.
Returns
The resulting polite outcome. Basically the same as the first argument, since every harsh result is considered to be a success.

◆ OutcomeCombine() [25/52]

template<typename APayloadT >
constexpr auto OutcomeCombine ( const TPoliteOutcome< APayloadT > &  A,
const THarshOutcome< void > &  B 
)
inlineconstexpr

Combine a polite empty outcome with a harsh one.

Template Parameters
APayloadTThe payload type of the second outcome.
Parameters
AThe first outcome to combine.
BThe second outcome to combine.
Returns
The resulting polite outcome. Basically the same as the first argument, since every harsh result is considered to be a success.

◆ OutcomeCombine() [26/52]

template<typename APayloadT , typename BPayloadT , typename std::enable_if<!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( const TPoliteOutcome< APayloadT > &  A,
const TPoliteOutcome< BPayloadT > &  B 
)
inlineconstexpr

Combine two polite outcomes with payloads into a new polite outcome with a payload.

from the second argument.

Template Parameters
APayloadTThe payload type of the first outcome.
BPayloadTThe payload type of the second outcome.
Parameters
AThe first outcome to combine.
BThe second outcome to combine.
Returns
The resulting polite outcome.

◆ OutcomeCombine() [27/52]

template<typename APayloadT , typename std::enable_if<!std::is_void< APayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( const TPoliteOutcome< APayloadT > &  A,
const TPoliteOutcome< void > &  B 
)
inlineconstexpr

Combine two polite outcomes into a new polite outcome with a payload copied from the first argument.

Template Parameters
APayloadTThe payload type of the second outcome.
Parameters
AThe first outcome to combine while copying its payload.
BThe second outcome to combine.
Returns
The resulting polite outcome.

◆ OutcomeCombine() [28/52]

template<typename APayloadT , typename BPayloadT , typename std::enable_if<!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( const TPoliteOutcome< APayloadT > &  A,
THarshOutcome< BPayloadT > &&  B 
)
inlineconstexpr

Combine a polite outcome with a harsh one.

Moving version.

Template Parameters
APayloadTThe first outcome payload type.
BPayloadTThe second outcome payload type. May not be a void.
Parameters
AThe first outcome to combine.
BThe second outcome to combine.
Returns
The resulting polite outcome. Basically the same as the first argument, since every harsh result is considered to be a success.

◆ OutcomeCombine() [29/52]

template<typename APayloadT , typename BPayloadT , typename std::enable_if<!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( const TPoliteOutcome< APayloadT > &  A,
TPoliteOutcome< BPayloadT > &&  B 
)
inlineconstexpr

Combine two polite outcomes into a new polite outcome while moving the second outcome.

Template Parameters
APayloadTThe payload type of the first outcome.
BPayloadTThe payload type of the second outcome.
Parameters
AThe first outcome to combine.
BThe second outcome to combine while moving it.
Returns
The resulting polite outcome.

◆ OutcomeCombine() [30/52]

template<typename PayloadT >
constexpr auto OutcomeCombine ( const TPoliteOutcome< PayloadT > &  Outcome)
inlineconstexpr

Bypass the polite outcome.

Template Parameters
PayloadTThe payload type of the outcome.
Parameters
OutcomeThe outcome to bypass.
Returns
The resulting polite outcome.

◆ OutcomeCombine() [31/52]

template<typename PayloadT , size_t N>
TPoliteOutcome< PayloadT > OutcomeCombine ( const TPoliteOutcome< PayloadT >(&)  Outcomes[N],
const PayloadT &  DefaultPayload 
)
inline

Combine several polite outcomes deriving a new one based on them.

Default outcome version.

Template Parameters
NThe number of elements in the array.
PayloadTThe type of the payload in the outcomes.
Parameters
OutcomesThe array of outcomes to combine.
DefaultPayloadThe default payload to be returned, when no outcomes are in the array.

◆ OutcomeCombine() [32/52]

template<typename PayloadT , size_t N>
TPoliteOutcome< PayloadT > OutcomeCombine ( const TPoliteOutcome< PayloadT >(&)  Outcomes[N],
const TPoliteOutcome< PayloadT > &  DefaultOutcome 
)
inline

Combine several polite outcomes deriving a new one based on them.

Default outcome version.

Template Parameters
NThe number of elements in the array.
PayloadTThe type of the payload in the outcomes.
Parameters
OutcomesThe array of outcomes to combine.
DefaultOutcomeThe default outcome to be returned, when no outcomes are in the array.

◆ OutcomeCombine() [33/52]

template<EParadigm Paradigm = EParadigm::Polite, typename T = void, more::enable_if_t<!std::is_void< T >::value, bool > = true>
constexpr auto OutcomeCombine ( const TPoliteOutcome< T > &  Outcome,
const EApparatusStatus  Status 
)
inlineconstexpr

Combine a non-empty polite outcome and a status into a non-empty polite outcome.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
OutcomeThe payload to combine with.
StatusThe status to combine.
Returns
The resulting polite outcome. Just combines the status and the payload into a polite outcome..

◆ OutcomeCombine() [34/52]

template<size_t N>
constexpr TPoliteOutcome< void > OutcomeCombine ( const TPoliteOutcome< void >(&)  Outcomes[N],
const TPoliteOutcome< void >  DefaultOutcome = TPoliteOutcome<void>(EApparatusStatus::Noop) 
)
inlineconstexpr

Combine several polite outcomes deriving a new one based on them.

Default outcome empty version.

Template Parameters
NThe number of elements in the array.
Parameters
OutcomesThe array of outcomes to combine.
DefaultOutcomeThe default outcome to be returned, when no outcomes are in the array.
Returns
The combined outcome.

◆ OutcomeCombine() [35/52]

template<typename OutcomeT1 , typename OutcomeT2 , typename OutcomeT3 , typename... OtherOutcomeTs>
constexpr TOutcomeCombiner< more::flatten_t< OutcomeT1 >, more::flatten_t< OutcomeT2 >, more::flatten_t< OutcomeT3 >, more::flatten_t< OtherOutcomeTs >... >::Type OutcomeCombine ( OutcomeT1 &&  Outcome1,
OutcomeT2 &&  Outcome2,
OutcomeT3 &&  Outcome3,
OtherOutcomeTs &&...  OtherOutcomes 
)
inlineconstexpr

Combine multiple outcomes.

Note
Arguments are evaluated in an arbitrary order in C++.

This method is recursive and also supports combining on payloads only.

Template Parameters
OutcomeT1The type of the first outcome to combine.
OutcomeT2The type of the second outcome to combine.
OutcomeT3The type of the third outcome to combine.
OtherOutcomeTsOther outcomes to combine.
Parameters
Outcome1The first outcome to combine.
Outcome2The second outcome to combine.
Outcome3The third outcome to combine.
OtherOutcomesOther outcomes to combine.
Returns
The resulting outcome.

◆ OutcomeCombine() [36/52]

template<typename PayloadT , typename std::enable_if< IsPayloadType< typename more::flatten< PayloadT >::type >(), int >::type = 0>
THarshOutcome< PayloadT > OutcomeCombine ( std::initializer_list< THarshOutcome< PayloadT > >  Outcomes,
const PayloadT &  DefaultPayload 
)
inline

Combine several outcomes deriving a new one based on them.

Initializer list with a default payload version.

Template Parameters
PayloadTThe type of the payload in the outcomes.
Parameters
OutcomesThe array of outcomes to combine.
DefaultPayloadThe default payload value, when no outcomes are in the list.
Returns
A combined outcome.

◆ OutcomeCombine() [37/52]

template<typename PayloadT >
THarshOutcome< PayloadT > OutcomeCombine ( std::initializer_list< THarshOutcome< PayloadT > >  Outcomes,
const THarshOutcome< PayloadT > &  DefaultOutcome 
)
inline

Combine several outcomes deriving a new one based on them.

Initializer list with a default outcome version.

Template Parameters
PayloadTThe type of the payload in the outcomes.
Parameters
OutcomesThe array of outcomes to combine.
DefaultOutcomeThe default outcome, when no outcomes are in the list.
Returns

◆ OutcomeCombine() [38/52]

THarshOutcome< void > OutcomeCombine ( std::initializer_list< THarshOutcome< void > >  Outcomes)
inline

Combine several outcomes deriving a new one based on them.

Initializer list version.

Template Parameters
PayloadTThe type of the payload in the outcomes.
Parameters
OutcomesThe array of outcomes to combine. when no outcomes are in the array.
Returns
The resulting harsh outcome.

◆ OutcomeCombine() [39/52]

template<typename PayloadT >
TPoliteOutcome< PayloadT > OutcomeCombine ( std::initializer_list< TPoliteOutcome< PayloadT > >  Outcomes,
const TPoliteOutcome< PayloadT > &  DefaultOutcome 
)
inline

Combine several polite outcomes deriving a new one based on them.

Initializer list with a default outcome version.

Template Parameters
PayloadTThe type of the payload in the outcomes.
Parameters
OutcomesThe array of polite outcomes to combine.
DefaultOutcomeThe default outcome, when no outcomes are in the list.
Returns

◆ OutcomeCombine() [40/52]

TPoliteOutcome< void > OutcomeCombine ( std::initializer_list< TPoliteOutcome< void > >  Outcomes,
const EApparatusStatus  DefaultStatus = EApparatusStatus::Noop 
)
inline

Combine several polite outcomes deriving a new one based on them.

Initializer list version.

Template Parameters
PayloadTThe type of the payload in the outcomes.
Parameters
OutcomesThe array of outcomes to combine. when no outcomes are in the array.
DefaultStatusThe default status to use, when there are no outcomes in the list.
Returns
The resulting harsh outcome.

◆ OutcomeCombine() [41/52]

template<typename T , typename BPayloadT , typename std::enable_if< IsHarshOutcomeType< more::flatten_t< T > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( T &&  A,
const THarshOutcome< BPayloadT > &  B 
)
inlineconstexpr

Combine two harsh outcomes into a new harsh outcome.

Template Parameters
TThe payload type of the first outcome.
BPayloadTThe payload type of the second outcome.
Parameters
AThe first outcome to combine.
BThe second outcome to combine.
Returns
The resulting harsh outcome. Basically returns the second argument.

◆ OutcomeCombine() [42/52]

template<typename T , typename BPayloadT , typename std::enable_if< IsHarshOutcomeType< more::flatten_t< T > >() &&!std::is_void< BPayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( T &&  A,
THarshOutcome< BPayloadT > &&  B 
)
inlineconstexpr

Combine two harsh outcomes into a new harsh outcome.

Moving the second argument version.

Template Parameters
TThe payload type of the first outcome.
BPayloadTThe payload type of the second outcome.
Parameters
AThe first outcome to combine.
BThe second outcome to combine.
Returns
The resulting harsh outcome. Basically moves the second argument.

◆ OutcomeCombine() [43/52]

template<EParadigm Paradigm = EParadigm::Polite, typename T = void, typename std::enable_if< IsPayloadType< more::flatten_t< T > >(), int >::type = 0>
constexpr auto OutcomeCombine ( T &&  Payload)
inlineconstexpr

Combine single payload bypassing it.

Template Parameters
ParadigmThe paradigm to work under.
Returns
The resulting outcome. Just passes by the argument.

◆ OutcomeCombine() [44/52]

template<EParadigm Paradigm = EParadigm::Polite, typename T , TPayloadTypeSecurity< more::flatten_t< T > > = true>
constexpr auto OutcomeCombine ( T &&  Payload,
const EApparatusStatus  Status 
)
constexpr

Combine a payload and a status into a polite non-empty outcome.

Template Parameters
ParadigmThe paradigm to work under.
TThe type of the payload.
Parameters
PayloadThe payload to combine with.
StatusThe status to combine.
Returns
The resulting polite outcome. Just combines the status and the payload into a polite outcome..

◆ OutcomeCombine() [45/52]

template<typename T1 , typename T2 , typename std::enable_if< std::is_same< more::flatten_t< T1 >, TPoliteOutcome< void > >::value &&std::is_same< more::flatten_t< T2 >, TPoliteOutcome< void > >::value, int >::type = 0>
constexpr TPoliteOutcome< void > OutcomeCombine ( T1 &&  A,
T2 &&  B 
)
inlineconstexpr

Combine two empty polite outcomes into a new polite outcome.

Fully empty version.

Parameters
AThe first outcome to combine.
BThe second outcome to combine.
Returns
The resulting polite outcome. The statuses get combined.

◆ OutcomeCombine() [46/52]

template<typename APayloadT , typename T , typename std::enable_if< std::is_same< more::flatten_t< T >, THarshOutcome< void > >::value, int >::type = 0>
constexpr auto OutcomeCombine ( THarshOutcome< APayloadT > &&  A,
T &&  B 
)
inlineconstexpr

Combine two harsh outcomes with and without a payload into a new harsh outcome.

Moving the first argument version.

Template Parameters
APayloadTThe payload type of the first outcome.
TThe type of the harsh outcome for universal referencing.
Parameters
AThe first outcome to combine with.
BThe second outcome to combine. This one is basically ignored here.
Returns
The resulting harsh outcome. Basically returns the first argument.

◆ OutcomeCombine() [47/52]

template<typename APayloadT , typename std::enable_if<!std::is_void< APayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( THarshOutcome< APayloadT > &&  A,
TPoliteOutcome< void > &&  B 
)
inlineconstexpr

Combine a non-empty harsh outcome with a polite empty one.

Moving the first payload version.

Template Parameters
APayloadTThe payload type of the first outcome. May not be a void.
Parameters
AThe first outcome to combine with.
BThe second outcome to combine. This is basically what gets returned.
Returns
The resulting polite outcome getting its status from the second argument.

◆ OutcomeCombine() [48/52]

template<typename PayloadT >
constexpr auto OutcomeCombine ( THarshOutcome< PayloadT > &&  Outcome)
inlineconstexpr

Bypass the harsh outcome.

Moving version.

Template Parameters
PayloadTThe payload type of the outcome.
Parameters
OutcomeThe outcome to bypass.
Returns
The resulting harsh outcome.

◆ OutcomeCombine() [49/52]

template<typename APayloadT >
constexpr TPoliteOutcome< APayloadT > OutcomeCombine ( TPoliteOutcome< APayloadT > &&  A,
const THarshOutcome< void > &  B 
)
inlineconstexpr

Combine a polite empty outcome with a harsh one.

Moving version.

Template Parameters
BPayloadTThe payload type of the second outcome.
Parameters
AThe first outcome to combine.
BThe second outcome to combine.
Returns
The resulting polite outcome. Basically the same as the first argument, since every harsh result is considered to be a success.

◆ OutcomeCombine() [50/52]

template<typename APayloadT , typename std::enable_if<!std::is_void< APayloadT >::value, int >::type = 0>
constexpr auto OutcomeCombine ( TPoliteOutcome< APayloadT > &&  A,
const TPoliteOutcome< void > &  B 
)
inlineconstexpr

Combine two polite outcomes into a new polite outcome with a payload moved from the first argument.

Template Parameters
APayloadTThe payload type of the second outcome.
Parameters
AThe first outcome to combine while moving it.
BThe second outcome to combine.
Returns
The resulting polite outcome.

◆ OutcomeCombine() [51/52]

template<typename PayloadT >
constexpr auto OutcomeCombine ( TPoliteOutcome< PayloadT > &&  Outcome)
inlineconstexpr

Bypass the polite outcome.

Moving version.

Template Parameters
PayloadTThe payload type of the outcome.
Parameters
OutcomeThe outcome to bypass.
Returns
The resulting polite outcome.

◆ OutcomeCombine() [52/52]

template<EParadigm Paradigm = EParadigm::Polite, typename T = void, more::enable_if_t<!std::is_void< T >::value, int > = 0>
constexpr auto OutcomeCombine ( TPoliteOutcome< T > &&  Outcome,
const EApparatusStatus  Status 
)
inlineconstexpr

Combine into a polite outcome.

Template Parameters
ParadigmThe paradigm to work under.
Parameters
StatusThe status to combine.
OutcomeThe payload to combine with.
Returns
The resulting polite outcome. Just combines the status and the payload into a polite outcome..

◆ OutcomeDereference() [1/6]

template<typename PayloadT >
PayloadT & OutcomeDereference ( const THarshOutcome< PayloadT * > &  Outcome)
inline

Convert a harsh outcome to a status.

Template Parameters
PayloadTThe type of the payload of the outcome.
Parameters
OutcomeThe outcome to convert.
Returns
The successful status.

◆ OutcomeDereference() [2/6]

template<typename PayloadT >
PayloadT & OutcomeDereference ( const THarshOutcome< PayloadT > &  Outcome)
inline

Convert a harsh outcome to a status.

Template Parameters
PayloadTThe type of the payload of the outcome.
Parameters
OutcomeThe outcome to convert.
Returns
The successful status.

◆ OutcomeDereference() [3/6]

template<typename PayloadT >
PayloadT & OutcomeDereference ( const TPoliteOutcome< PayloadT * > &  Outcome)
inline

Convert a polite outcome to a status.

Template Parameters
PayloadTThe type of the payload of the outcome.
Parameters
OutcomeThe outcome to convert.
Returns
The outcome status.

◆ OutcomeDereference() [4/6]

template<typename PayloadT >
PayloadT & OutcomeDereference ( const TPoliteOutcome< PayloadT > &  Outcome)
inline

Convert a polite outcome to a status.

Template Parameters
PayloadTThe type of the payload of the outcome.
Parameters
OutcomeThe outcome to convert.
Returns
The outcome status.

◆ OutcomeDereference() [5/6]

template<typename PayloadT >
PayloadT & OutcomeDereference ( PayloadT &  Payload)
inline

Statically cast a generic payload pointer.

Template Parameters
PayloadTThe type of the payload.
Parameters
PayloadThe payload to cast.
Returns
The payload being cast.

◆ OutcomeDereference() [6/6]

template<typename PayloadT >
PayloadT & OutcomeDereference ( PayloadT *const  Payload)
inline

Statically cast a generic payload pointer.

Template Parameters
PayloadTThe type of the payload.
Parameters
PayloadThe payload to cast.
Returns
The payload being cast.

◆ OutcomeStaticCast() [1/3]

template<typename To , typename PayloadT >
constexpr THarshOutcome< To > OutcomeStaticCast ( const THarshOutcome< PayloadT > &  Outcome)
inlineconstexpr

Convert a harsh outcome to a status.

Template Parameters
ToThe type to cast to.
PayloadTThe type of the payload of the outcome.
Parameters
OutcomeThe outcome to convert.
Returns
The successful status.

◆ OutcomeStaticCast() [2/3]

template<typename To , typename PayloadT >
constexpr TPoliteOutcome< To > OutcomeStaticCast ( const TPoliteOutcome< PayloadT > &  Outcome)
inlineconstexpr

Convert a polite outcome to a status.

Template Parameters
ToThe type to cast to.
PayloadTThe type of the payload of the outcome.
Parameters
OutcomeThe outcome to convert.
Returns
The outcome status.

◆ OutcomeStaticCast() [3/3]

template<typename To , typename PayloadT >
constexpr auto OutcomeStaticCast ( PayloadT *const  Payload)
inlineconstexpr

Statically cast a generic payload pointer.

Template Parameters
ToThe type to cast to.
PayloadTThe type of the payload.
Parameters
PayloadThe payload to cast.
Returns
The payload being cast.

◆ Report() [1/6]

EApparatusStatus Report ( const EApparatusStatus  Status,
const TCHAR *  InFormatString,
const FStringFormatNamedArguments &  InNamedArguments 
)
inline

Report a status with a formatted message.

Parameters
StatusThe status to report.
InFormatStringThe format string to report with. Example: "{foo}/{bar}: {baz}"
InNamedArgumentsThe arguments to use within the format string.
Returns
The same status as passed.

◆ Report() [2/6]

EApparatusStatus Report ( const EApparatusStatus  Status,
const TCHAR *  InFormatString,
const FStringFormatOrderedArguments &  InOrderedArguments 
)
inline

Report a status with a formatted message.

Parameters
StatusThe status to report.
InFormatStringThe format string to report with. Example: "{0}/{1}: {2}"
InOrderedArgumentsThe arguments to use within the format string.
Returns
The same status as passed.

◆ Report() [3/6]

EApparatusStatus Report ( const EApparatusStatus  Status,
const TCHAR *  InMessage 
)
inline

Report a status along with a message.

Parameters
StatusThe status to report.
InMessageThe message to report along with the status.
Returns
The same status as passed.

◆ Report() [4/6]

template<EApparatusStatus Status>
EApparatusStatus Report ( const TCHAR *  InFormatString,
const FStringFormatNamedArguments &  InNamedArguments 
)
inline

Report a status with a formatted message.

Templated version.

Template Parameters
StatusThe status to report.
Parameters
InFormatStringThe format string to report with. Example: "{foo}/{bar}: {baz}"
InNamedArgumentsThe arguments to use within the format string.
Returns
The same status as passed.

◆ Report() [5/6]

template<EApparatusStatus Status>
EApparatusStatus Report ( const TCHAR *  InFormatString,
const FStringFormatOrderedArguments &  InOrderedArguments 
)
inline

Report a status with a formatted message.

Templated version.

Template Parameters
StatusThe status to report.
Parameters
InFormatStringThe format string to report with. Example: "{0}/{1}: {2}"
InOrderedArgumentsThe arguments to use within the format string.
Returns
The same status as passed.

◆ Report() [6/6]

template<EApparatusStatus Status>
EApparatusStatus Report ( const TCHAR *  InMessage)
inline

Report a status along with a message.

Templated version.

Template Parameters
StatusThe status to report.
Parameters
InMessageThe message to report along with the status.
Returns
The same status as passed.

◆ StatusAccumulate() [1/4]

EApparatusStatus & StatusAccumulate ( EApparatusStatus Status)
inline

Accumulate several statuses deriving a new one based on them.

Single argument version.

◆ StatusAccumulate() [2/4]

EApparatusStatus & StatusAccumulate ( EApparatusStatus Status,
const EApparatusStatus  AddStatus 
)
inline

Accumulate several statuses deriving a new one based on them.

Two arguments version.

Be warned the the order of evaluation for function arguments is not explicitly defined or guaranteed in C++.

◆ StatusAccumulate() [3/4]

template<typename... Ts>
EApparatusStatus & StatusAccumulate ( EApparatusStatus Status,
const EApparatusStatus  AddStatus,
Ts &&...  AddStatuses 
)
inline

Accumulate several statuses deriving a new one based on them.

Multiple arguments version.

Be warned the the order of evaluation for function arguments is not explicitly defined or guaranteed in C++.

◆ StatusAccumulate() [4/4]

template<size_t N>
EApparatusStatus & StatusAccumulate ( EApparatusStatus Status,
const EApparatusStatus(&)  Statuses[N] 
)
inline

Accumulate several statuses deriving a new one based on them.

◆ StatusCombine() [1/6]

constexpr EApparatusStatus StatusCombine ( )
inlineconstexpr

Noop.

Returns
The resulting noop.

◆ StatusCombine() [2/6]

constexpr EApparatusStatus StatusCombine ( const EApparatusStatus  A)
inlineconstexpr

Bypass a status.

Parameters
AThe first status to bypass.
Returns
The resulting status.

◆ StatusCombine() [3/6]

constexpr EApparatusStatus StatusCombine ( const EApparatusStatus  A,
const EApparatusStatus  B 
)
inlineconstexpr

Combine two statuses deriving a new one based on them.

Be warned the the order of evaluation for function arguments is not explicitly defined or guaranteed in C++, so B can evaluate prior to A.

Parameters
AThe first status to combine.
BThe second status to combine.
Returns
The resulting status.

◆ StatusCombine() [4/6]

template<typename... Ts>
constexpr EApparatusStatus StatusCombine ( const EApparatusStatus  StatusA,
const EApparatusStatus  StatusB,
const Ts...  OtherStatuses 
)
inlineconstexpr

Combine several statuses deriving a new one based on them.

Warning
The order of the evaluation of the function arguments is not explicitly defined or guaranteed in C++.
Note
The function is recursive.

◆ StatusCombine() [5/6]

template<size_t N>
EApparatusStatus StatusCombine ( const EApparatusStatus(&)  Statuses[N],
const EApparatusStatus  DefaultStatus = EApparatusStatus::Noop 
)
inline

Combine several statuses deriving a new one based on them.

Array version.

Template Parameters
NThe number of elements in the array.
Parameters
StatusesThe array of statuses to combine.
DefaultStatusThe default status to be returned, when no statuses are in the array.

◆ StatusCombine() [6/6]

EApparatusStatus StatusCombine ( std::initializer_list< EApparatusStatus Statuses,
const EApparatusStatus  DefaultStatus = EApparatusStatus::Noop 
)
inline

Combine several statuses deriving a new one based on them.

Initializer list version.

Parameters
StatusesThe list of statuses to combine.
DefaultStatusThe default status to be returned, when no statuses are in the array.

◆ ToStatus() [1/4]

constexpr EApparatusStatus ToStatus ( const EApparatusStatus  Status)
inlineconstexpr

Universal conversion to a status.

◆ ToStatus() [2/4]

template<typename PayloadT >
constexpr EApparatusStatus ToStatus ( const PayloadT &  Outcome)
inlineconstexpr

Convert a generic payload to a status.

Template Parameters
PayloadTThe type of the payload.
Parameters
OutcomeThe outcome to convert.
Returns
The successful status.

◆ ToStatus() [3/4]

template<typename PayloadT >
constexpr EApparatusStatus ToStatus ( const THarshOutcome< PayloadT > &  Outcome)
inlineconstexpr

Convert a harsh outcome to a status.

Template Parameters
PayloadTThe type of the payload of the outcome.
Parameters
OutcomeThe outcome to convert.
Returns
The successful status.

◆ ToStatus() [4/4]

template<typename PayloadT >
constexpr EApparatusStatus ToStatus ( const TPoliteOutcome< PayloadT > &  Outcome)
inlineconstexpr

Convert a polite outcome to a status.

Template Parameters
PayloadTThe type of the payload of the outcome.
Parameters
OutcomeThe outcome to convert.
Returns
The outcome status.

◆ ToString() [1/4]

FString ToString ( const EApparatusStatus  Status)
inline

Convert an Apparatus status variable to a string representation.

Parameters
StatusThe status to convert.
Returns
The resulting string representation.

◆ ToString() [2/4]

template<typename PayloadT >
FString ToString ( const PayloadT &  Payload)
inline

Convert a payload to a string representation.

Template Parameters
PayloadTThe type of the payload of the outcome.
Parameters
PayloadThe outcome to convert.
Returns
The textual representation of the outcome.

◆ ToString() [3/4]

template<typename PayloadT >
FString ToString ( const THarshOutcome< PayloadT > &  Outcome)
inline

Convert a harsh outcome to a string representation.

Template Parameters
ParadigmThe paradigm to work under.
PayloadTThe type of the payload of the outcome.
Parameters
OutcomeThe outcome to convert.
Returns
The textual representation of the outcome.

◆ ToString() [4/4]

template<typename PayloadT >
FString ToString ( const TPoliteOutcome< PayloadT > &  Outcome)
inline

Convert a polite outcome to a string representation.

Template Parameters
ParadigmThe paradigm to work under.
PayloadTThe type of the payload of the outcome.
Parameters
OutcomeThe outcome to convert.
Returns
The textual representation of the outcome.

Variable Documentation

◆ bool

template<typename PayloadT , size_t N>
bool
inlineconstexpr
Initial value:
{
return true

Check if all outcomes are OK.

Array version.