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

The execution paradigm functionality. More...

#include <algorithm>
#include "CoreMinimal.h"
Include dependency graph for Paradigm.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  FParadigmIndicator
 The execution paradigm mark. More...
 
struct  TParadigm< Paradigm >
 A type wrap for the paradigm enumeration. More...
 

Typedefs

using FPoliteParadigm = TParadigm< EParadigm::Polite >
 
using FPoliteSafeParadigm = TParadigm< EParadigm::PoliteSafe >
 
using FHarshSafeParadigm = TParadigm< EParadigm::HarshSafe >
 
using FPoliteUnsafeParadigm = TParadigm< EParadigm::PoliteUnsafe >
 
using FHarshUnsafeParadigm = TParadigm< EParadigm::HarshUnsafe >
 
using FDefaultParadigm = TParadigm< EParadigm::Default >
 
using FDefaultBlueprintParadigm = TParadigm< EParadigm::DefaultBlueprint >
 
using FPortableParadigm = TParadigm< EParadigm::DefaultPortable >
 
template<typename ParadigmT >
using TPoliteParadigm = TParadigm< MakePolite(ParadigmT::Value)>
 Guarantee a paradigm to be polite.
 
template<typename ParadigmT >
using THarshParadigm = TParadigm< MakeHarsh(ParadigmT::Value)>
 Guarantee a paradigm to be harsh.
 
template<EParadigm Paradigm, typename ResultT = EApparatusStatus>
using TEnableIfUnsafe = typename std::enable_if< IsUnsafe(Paradigm), ResultT >::type
 Enable the method in unsafe mode only.
 
template<EParadigm Paradigm, bool Condition, typename ResultT = EApparatusStatus>
using TEnableIfUnsafeOr = typename std::enable_if< IsUnsafe(Paradigm)||Condition, ResultT >::type
 Enable the method in unsafe mode or in case of a condition.
 

Enumerations

enum class  EParadigm {
  None = 0 , Auto = 0 , Polite = 1 , OptionsMask = 0x1 ,
  Internal = 0x1 << 1 , HarshInternal = Internal , InternalHarsh = HarshInternal , PoliteInternal = Polite | Internal ,
  InternalPolite = Internal | Polite , Unsafe = 0x2 << 1 , HarshUnsafe = Unsafe , UnsafeHarsh = HarshUnsafe ,
  PoliteUnsafe = Polite | Unsafe , UnsafePolite = Unsafe | Polite , Safe = 0x3 << 1 , HarshSafe = Safe ,
  SafeHarsh = HarshSafe , PoliteSafe = Polite | Safe , SafePolite = Safe | Polite , LevelMask = 0x3 << 1 ,
  Default = HarshSafe , DefaultInternal = HarshInternal , DefaultPortable = SafePolite , DefaultBlueprint = SafePolite
}
 The type of paradigm for executing. More...
 

Functions

constexpr EParadigm operator+ (const EParadigm A, const EParadigm B)
 Combine two paradigm into a single one.
 
EParadigmoperator+= (EParadigm &A, const EParadigm B)
 Accumulate to a paradigm.
 
template<typename... Ts>
constexpr EParadigm ParadigmCombine (const EParadigm DefaultParadigm=EParadigm::Default)
 Combine all of the supplied paradigm types.
 
constexpr bool IsPolite (const EParadigm Paradigm)
 Check if the paradigm is polite.
 
template<typename ParadigmT >
constexpr bool IsPolite ()
 Check if the paradigm type is polite.
 
constexpr bool IsHarsh (const EParadigm Paradigm)
 Check if the paradigm is harsh.
 
template<typename ParadigmT >
constexpr bool IsHarsh ()
 Check if the paradigm type is harsh.
 
constexpr bool IsInternal (const EParadigm Paradigm)
 Check if the paradigm is internal.
 
template<typename ParadigmT >
constexpr bool IsInternal ()
 Check if the paradigm type is internal.
 
constexpr bool IsUnsafe (const EParadigm Paradigm)
 Check if a paradigm an unsafe one.
 
template<typename ParadigmT >
constexpr bool IsUnsafe ()
 Check if the paradigm type is unsafe.
 
constexpr bool IsSafe (const EParadigm Paradigm)
 Check if a paradigm a safe one.
 
template<typename ParadigmT >
constexpr bool IsSafe ()
 Check if a paradigm type is a safe one.
 
constexpr EParadigm MakePolite (const EParadigm Paradigm)
 Guarantee a paradigm to be polite.
 
constexpr EParadigm MakeSafe (const EParadigm Paradigm)
 Guarantee a paradigm to be safe (or more).
 
constexpr EParadigm MakeUnsafe (const EParadigm Paradigm)
 Guarantee a paradigm to be unsafe (or less).
 
constexpr EParadigm MakeInternal (const EParadigm Paradigm)
 Guarantee a paradigm to be internal.
 
constexpr EParadigm MakeHarsh (const EParadigm Paradigm)
 Guarantee a paradigm to be harsh.
 

Detailed Description

The execution paradigm functionality.

Typedef Documentation

◆ FDefaultBlueprintParadigm

◆ FDefaultParadigm

◆ FHarshSafeParadigm

◆ FHarshUnsafeParadigm

◆ FPoliteParadigm

◆ FPoliteSafeParadigm

◆ FPoliteUnsafeParadigm

◆ FPortableParadigm

◆ TEnableIfUnsafe

template<EParadigm Paradigm, typename ResultT = EApparatusStatus>
using TEnableIfUnsafe = typename std::enable_if<IsUnsafe(Paradigm), ResultT>::type

Enable the method in unsafe mode only.

Template Parameters
ParadigmThe paradigm in question.
ResultTThe type of the return value.

◆ TEnableIfUnsafeOr

template<EParadigm Paradigm, bool Condition, typename ResultT = EApparatusStatus>
using TEnableIfUnsafeOr = typename std::enable_if<IsUnsafe(Paradigm) || Condition, ResultT>::type

Enable the method in unsafe mode or in case of a condition.

Template Parameters
ParadigmThe paradigm in question.
ConditionThe condition to also check for.
ResultTThe type of the return value.

◆ THarshParadigm

template<typename ParadigmT >
using THarshParadigm = TParadigm<MakeHarsh(ParadigmT::Value)>

Guarantee a paradigm to be harsh.

Template Parameters
ParadigmTThe paradigm type to assess.

◆ TPoliteParadigm

template<typename ParadigmT >
using TPoliteParadigm = TParadigm<MakePolite(ParadigmT::Value)>

Guarantee a paradigm to be polite.

Template Parameters
ParadigmTThe paradigm type to assess.

Enumeration Type Documentation

◆ EParadigm

enum class EParadigm
strong

The type of paradigm for executing.

Enumerator
None 

"Not an execution paradigm" identifier.

Also serves the purpose of an automatic paradigm derivation.

Auto 

A mnemonic synonym for EParadigm::None.

Polite 

A flag to return statuses instead of firing assertion failures.

OptionsMask 

The paradigm options mask.

Internal 
HarshInternal 

Harsh internal paradigm.

InternalHarsh 

Internal harsh version.

PoliteInternal 

Polite internal version.

InternalPolite 

Internal polite version.

Unsafe 

Allows for direct access to the data even through non-solid subject handles.

HarshUnsafe 

Harsh unsafe version.

UnsafeHarsh 

Unsafe harsh version.

PoliteUnsafe 

Polite unsafe version.

UnsafePolite 

Unsafe polite version.

Safe 

Disallowing direct data access for non-solid subjects.

HarshSafe 

Harsh safe is just safe.

SafeHarsh 

Safe harsh synonym.

PoliteSafe 

Polite safe synonym.

SafePolite 

Safe polite synonym.

LevelMask 

The safety level mask.

Default 

The default paradigm for public APIs.

DefaultInternal 

The default paradigm for non-public APIs.

DefaultPortable 

The default paradigm for maximum dynamic (virtual) APIs.

DefaultBlueprint 

The default paradigm for Blueprint APIs.

Function Documentation

◆ IsHarsh() [1/2]

template<typename ParadigmT >
constexpr bool IsHarsh ( )
inlineconstexpr

Check if the paradigm type is harsh.

Template Parameters
ParadigmTThe paradigm type to examine.
Returns
The state of examination.

◆ IsHarsh() [2/2]

constexpr bool IsHarsh ( const EParadigm  Paradigm)
inlineconstexpr

Check if the paradigm is harsh.

Template Parameters
ParadigmThe paradigm to examine.
Returns
The state of examination.

◆ IsInternal() [1/2]

template<typename ParadigmT >
constexpr bool IsInternal ( )
inlineconstexpr

Check if the paradigm type is internal.

Template Parameters
ParadigmTThe paradigm type to examine.
Returns
Check if the paradigm type is internal.

◆ IsInternal() [2/2]

constexpr bool IsInternal ( const EParadigm  Paradigm)
inlineconstexpr

Check if the paradigm is internal.

Parameters
ParadigmThe paradigm to examine.
Returns
The state of examination.

◆ IsPolite() [1/2]

template<typename ParadigmT >
constexpr bool IsPolite ( )
inlineconstexpr

Check if the paradigm type is polite.

Template Parameters
ParadigmTThe paradigm type to examine.
Returns
The state of examination.

◆ IsPolite() [2/2]

constexpr bool IsPolite ( const EParadigm  Paradigm)
inlineconstexpr

Check if the paradigm is polite.

Template Parameters
ParadigmThe paradigm to examine.
Returns
The state of examination.

◆ IsSafe() [1/2]

template<typename ParadigmT >
constexpr bool IsSafe ( )
inlineconstexpr

Check if a paradigm type is a safe one.

Template Parameters
ParadigmTThe paradigm type to examine.
Returns
The state of examination.

◆ IsSafe() [2/2]

constexpr bool IsSafe ( const EParadigm  Paradigm)
inlineconstexpr

Check if a paradigm a safe one.

Parameters
ParadigmThe paradigm to examine.
Returns
The status of examination.

◆ IsUnsafe() [1/2]

template<typename ParadigmT >
constexpr bool IsUnsafe ( )
inlineconstexpr

Check if the paradigm type is unsafe.

Template Parameters
ParadigmTThe paradigm type to examine.
Returns
The state of examination.

◆ IsUnsafe() [2/2]

constexpr bool IsUnsafe ( const EParadigm  Paradigm)
inlineconstexpr

Check if a paradigm an unsafe one.

Parameters
ParadigmThe paradigm to examine.
Returns
The status of examination.

◆ MakeHarsh()

constexpr EParadigm MakeHarsh ( const EParadigm  Paradigm)
inlineconstexpr

Guarantee a paradigm to be harsh.

Parameters
ParadigmThe paradigm to alter.
Returns
The resulting harsh paradigm.

◆ MakeInternal()

constexpr EParadigm MakeInternal ( const EParadigm  Paradigm)
inlineconstexpr

Guarantee a paradigm to be internal.

Parameters
ParadigmThe paradigm to alter.
Returns
The resulting internal paradigm.

◆ MakePolite()

constexpr EParadigm MakePolite ( const EParadigm  Paradigm)
inlineconstexpr

Guarantee a paradigm to be polite.

Parameters
ParadigmThe paradigm to alter.
Returns
The resulting polite paradigm.

◆ MakeSafe()

constexpr EParadigm MakeSafe ( const EParadigm  Paradigm)
inlineconstexpr

Guarantee a paradigm to be safe (or more).

Parameters
ParadigmThe paradigm to alter.
Returns
The resulting safe paradigm.

◆ MakeUnsafe()

constexpr EParadigm MakeUnsafe ( const EParadigm  Paradigm)
inlineconstexpr

Guarantee a paradigm to be unsafe (or less).

Parameters
ParadigmThe paradigm to alter.
Returns
The resulting unsafe paradigm.

◆ operator+()

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

Combine two paradigm into a single one.

The safest level will get propagated.

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

◆ operator+=()

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

Accumulate to a paradigm.

The safest level will get propagated.

Parameters
AThe first paradigm to combine and receive the result.
BThe second paradigm to accumulate.
Returns
Returns the first operand itself.

◆ ParadigmCombine()

template<typename... Ts>
constexpr EParadigm ParadigmCombine ( const EParadigm  DefaultParadigm = EParadigm::Default)
inlineconstexpr

Combine all of the supplied paradigm types.

Template Parameters
TsThe paradigm types to combine. The non-paradigm types are silently ignored.
Parameters
DefaultParadigmThe default paradigm
Returns
The resulting paradigm.