Apparatus
Version 1.23
ECS data-oriented workflow for Unreal Engine.
|
The scoped Apparatus state manager. More...
#include <Mechanism.h>
Classes | |
struct | TDeferredsApplicator |
A safe applicator for the deferred changes (or deferreds). More... | |
Public Types | |
enum | { InvalidChainId = FChain::InvalidId , FirstChainId = FChain::FirstId } |
typedef FSubjectInfo::MechanismIdType | IdType |
The type of the mechanism identifier. | |
typedef FSubjectInfo::IdType | SubjectIdType |
The type for the unique subject identifiers. | |
Public Member Functions | |
const TSet< ISubjective * > & | GetSubjectives () const |
All of the subjectives currently available and registered. | |
FAdjectiveInfo & | GetAdjective (const int32 Id) |
Get subject information by an identifier. | |
void | FindBeltsMatchingFingerprint (const FFingerprint &Fingerprint, TArray< UBelt * > &OutBelts) |
Get all of the belts matching a fingerprint. | |
void | BootAll () |
Boot all of the halted subjectives currently present in the Mechanism. | |
template<typename IterableT , typename ChainT = FChain, typename FilterT = FFilter, TFilterTypeSecurity< std::decay_t< FilterT > > = true> | |
auto | EnchainIterables (FilterT &&Filter, ChainT &OutChain) |
Enchain multiple iterables with a filter. | |
template<typename IterableT , typename ChainT = FChain, typename FilterT = FFilter, TFilterTypeSecurity< std::decay_t< FilterT > > = true> | |
TSharedRef< ChainT > | EnchainIterables (FilterT &&Filter) |
Enchain multiple iterables with a filter. | |
template<typename ChainT = FChain, typename FilterT = FFilter, TFilterTypeSecurity< std::decay_t< FilterT > > = true> | |
auto | Enchain (FilterT &&Filter, ChainT &OutChain) |
Enchain multiple iterable sequences based on a filter. | |
template<typename ChainT = FChain, typename FilterT = FFilter, TFilterTypeSecurity< std::decay_t< FilterT > > = true> | |
TSharedRef< ChainT > | Enchain (FilterT &&Filter) |
Enchain multiple iterable sequences based on a filter. | |
template<typename FilterT = FFilter, typename... Ts, TFilterTypeSecurity< std::decay_t< FilterT > > = true> | |
void | Enchain (FilterT &&Filter, TArray< TChunkProxy< Ts... > > &OutChunkProxies, const bool bIncludeEmpty=false) |
Enchain the matching chunks into proxies. | |
template<typename FilterT = FFilter> | |
TSharedRef< FSolidChain > | EnchainSolid (FilterT &&Filter) |
Enchain multiple iterable sequences based on a filter, returning a solid chain. | |
template<bool bInSolidity, typename FilterT = FFilter> | |
std::conditional< bInSolidity, TSharedRef< FSolidChain >, TSharedRef< FChain > >::type | EnchainWithSolidity (FilterT &&Filter) |
Enchain subjects using a specific solidity. | |
template<EParadigm Paradigm = EParadigm::DefaultInternal> | |
TOutcome< Paradigm > | ActualizeBelt (ISubjective *const Subjective) |
Update a subjective's belt. | |
template<EParadigm Paradigm = EParadigm::DefaultInternal> | |
TOutcome< Paradigm > | RegisterSubjective (ISubjective *const Subjective) |
Register a subjective within the mechanism. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | UnregisterSubjective (ISubjective *const Subjective) |
Remove a subjective from the mechanism completely. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | UnregisterAllSubjectives () |
Unregister all of the currently registered subjectives. | |
template<typename ChainT = FChain> | |
TSharedRef< ChainT > | ObtainChain (const int32 ChainId) const |
Obtain an embedded chain of a specific identifier. | |
template<typename ChainT = FChain> | |
TSharedRef< ChainT > | ObtainChain () const |
Obtain a chain of a specific type. | |
EApparatusStatus | RegisterMechanical (TScriptInterface< IMechanical > Mechanical) |
Register a mechanical within the mechanism. | |
EApparatusStatus | UnregisterMechanical (TScriptInterface< IMechanical > Mechanical) |
Unregister a mechanical from the mechanism. | |
EApparatusStatus | UnregisterAllMechanicals () |
Unregister all of the currently registered mechanicals. | |
UChunk * | ObtainChunk (const struct FTraitmark &Traitmark, EApparatusStatus &OutStatus, const int32 Capacity=32) |
Find existing or create a new chunk for a traitmark. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, UChunk * > | ObtainChunk (const struct FTraitmark &Traitmark, const int32 Capacity=32) |
Find existing or create a new chunk for a traitmark. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | DespawnAllSubjects () |
Despawn all of the subjects currently available within the mechanism. | |
void | Reset () override |
Reset the mechanism completely, unregistering all of the entities and despawning all of the subjects. | |
bool | IsSolid () const |
Check if the mechanism is currently in the uniform mode preventing any structural changes to its subjects and subjectives. | |
bool | IsLiquid () const |
Check if the mechanism is currently in the mutable mode allowing any structural changes to its subjects and subjectives. | |
bool | IsLocked () const |
Check if the mechanism is currently locked in any manner. | |
AMechanism (const FObjectInitializer &ObjectInitializer) | |
Construct a new mechanism object. | |
Inspection | |
SubjectIdType | SubjectsNum () const |
Get the current number of subjects residing within the mechanism. | |
int32 | SubjectivesNum () const |
Get the current number of effective subjectives in the mechanism. | |
Concurrency | |
bool | IsInConcurrentEnvironment () const |
Check if the mechanism is currently inside a multi-threaded context. | |
Spawning | |
EApparatusStatus | SpawnSubject (FSubjectHandle &OutSubjectHandle, const FTraitmark &Traitmark, const EFlagmark Flagmark=FM_None) |
Spawn a new subject within the mechanism and a chunk of a specific traitmark. | |
EApparatusStatus | SpawnSubject (FSubjectHandle &OutSubjectHandle, FTraitmark &&Traitmark, const EFlagmark Flagmark=FM_None) |
Spawn a new subject within the mechanism and a chunk of a specific traitmark. | |
EApparatusStatus | SpawnSubject (FSubjectHandle &OutSubjectHandle, const EFlagmark Flagmark=FM_None) |
Spawn a new subject within the mechanism. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, FSubjectHandle > | SpawnSubject (const FSubjectRecord &SubjectRecord) |
Spawn a new subject based on a packed subject data record. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, FSubjectHandle > | SpawnSubject (FSubjectRecord &&SubjectRecord) |
Spawn a new subject based on a packed subject data record. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, FSubjectHandle > | SpawnSubject (FSubjectRecord &SubjectRecord) |
Spawn a new subject based on a packed subject data record. | |
FSubjectHandle | SpawnSubject (const FSubjectRecord &SubjectRecord, EApparatusStatus &OutStatus) |
Spawn a new subject within the mechanism based on a record. | |
FSubjectHandle | SpawnSubject (FSubjectRecord &&SubjectRecord, EApparatusStatus &OutStatus) |
Spawn a new subject based on a packed subject data record. | |
FSubjectHandle | SpawnSubject (FSubjectRecord &SubjectRecord, EApparatusStatus &OutStatus) |
Spawn a new subject based on a packed subject data record. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | SpawnSubjectDeferred (const FSubjectRecord &SubjectRecord) |
Spawn a new subject based on a packed subject data record. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | SpawnSubjectDeferred (FSubjectRecord &&SubjectRecord) |
Spawn a new subject based on a packed subject data record. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | SpawnSubjectDeferred (FSubjectRecord &SubjectRecord) |
Spawn a new subject based on a packed subject data record. | |
template<EParadigm Paradigm = EParadigm::Default> | |
auto | SpawnSubject (const EFlagmark Flagmark) |
Spawn a new subject with a flagmark within the mechanism, returning the handle to the caller. | |
template<EParadigm Paradigm, typename... Ts> | |
TOutcome< Paradigm, FSubjectHandle > | SpawnSubject (Ts &&... Traits) |
Spawn a new subject with traits, returning the handle. | |
template<EParadigm Paradigm, typename... Ts> | |
TOutcome< Paradigm, FSubjectHandle > | SpawnSubject (Ts &&... Traits, const EFlagmark Flagmark) |
Spawn a new subject with traits, returning the handle. | |
template<typename... Ts, EParadigm Paradigm = EParadigm::Default> | |
auto | SpawnSubject (Ts &&... Traits) |
Spawn a new subject with traits, returning the handle. | |
template<typename... Ts, EParadigm Paradigm = EParadigm::Default> | |
auto | SpawnSubject (Ts &&... Traits, const EFlagmark Flagmark) |
Spawn a new subject with traits, returning the handle. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm, FSubjectHandle > | SpawnSubject (UScriptStruct *const TraitType, void *const TraitData, const EFlagmark Flagmark=FM_None) |
Spawn a new subject with a typed trait data, returning the handle. | |
Deferred Spawning | |
template<EParadigm Paradigm, typename... Ts> | |
TOutcome< Paradigm > | SpawnSubjectDeferred (Ts &&... Traits) |
Spawn a new subject with traits. | |
template<EParadigm Paradigm, typename... Ts> | |
TOutcome< Paradigm > | SpawnSubjectDeferred (Ts &&... Traits, const EFlagmark Flagmark) |
Spawn a new subject with traits and a flagmark. | |
template<typename... Ts, EParadigm Paradigm = EParadigm::Default> | |
auto | SpawnSubjectDeferred (Ts &&... Traits) |
Spawn a new subject with traits. | |
template<typename... Ts, EParadigm Paradigm = EParadigm::Default> | |
auto | SpawnSubjectDeferred (Ts &&... Traits, const EFlagmark Flagmark) |
Spawn a new subject with traits and a flagmark. | |
Deferreds | |
bool | HasDeferreds () const |
Check if there are any deferreds queued. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | ApplyDeferreds () |
Apply all of the currently pending changes. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TOutcome< Paradigm > | ApplyDeferreds (const EDeferred InFilter) |
Apply a certain kind of the currently pending changes. | |
template<EParadigm Paradigm = EParadigm::Default, typename ContainerT = TArray<EDeferred>> | |
TOutcome< Paradigm > | ApplyDeferreds (const ContainerT &InKinds) |
Apply a subset of the currently pending changes. | |
bool | IsAutomaticDeferredsApplicationPossible () const |
Check if the automatic deferreds application is possible within the current context. | |
template<EParadigm Paradigm = EParadigm::Default> | |
TDeferredsApplicator< Paradigm > | CreateDeferredsApplicator (const EDeferred InFilter=EDeferred::All) |
Create a new deferreds applicator. | |
Collecting | |
template<typename AllocatorT > | |
EApparatusStatus | CollectSubjects (TArray< FSubjectHandle, AllocatorT > &OutSubjects, const FFilter &Filter=FFilter::Default) |
Collect all of the subjects being part of the mechanism. | |
EApparatusStatus | CollectSubjects (USubjectRecordCollection *const OutSubjects, const FFilter &Filter=FFilter::Default, const EFlagmark FlagmarkMask=FM_AllUserLevel) |
Collect the subjects being part of the mechanism. | |
Operating | |
auto | OperatingsNum () const |
Get the number of current operatings happening within the mechanism. | |
void | WaitForOperatingsCompletion () const |
Wait for all the current operatings to be completed within all chains. | |
bool | WaitForOperatingsCompletion (const uint32 WaitTimeMsec, const bool bIgnoreThreadIdleStats=false) const |
Wait for all the current operatings to be completed within all chains. | |
bool | WaitForOperatingsCompletion (const FTimespan &WaitTime, const bool bIgnoreThreadIdleStats=false) const |
Wait for all the current operatings to be completed within all chains. | |
template<typename ChainT = void, typename FilterT = void, typename MechanicT = void, TFilterTypeSecurity< std::decay_t< FilterT > > = true, typename std::enable_if<!std::is_function< MechanicT >::value, bool >::type = true> | |
auto | Operate (FilterT &&Filter, const MechanicT &Mechanic) |
Process the mechanism using a functor mechanic. | |
template<typename ChainT = void, typename FilterT = void, typename MechanicT = void, TFilterTypeSecurity< std::decay_t< FilterT > > = true, typename std::enable_if<!std::is_function< MechanicT >::value, bool >::type = true> | |
auto | Operate (FilterT &&Filter, MechanicT &Mechanic) |
Process the mechanism using a functor mechanic. | |
template<typename ChainT = void, typename FilterT = void, typename FunctionT = void, TFilterTypeSecurity< std::decay_t< FilterT > > = true, typename std::enable_if< std::is_function< FunctionT >::value, bool >::type = true> | |
auto | Operate (FilterT &&Filter, FunctionT *const Mechanic) |
Process the chain using a free function mechanic. | |
template<typename ChainT = void, typename MechanicT = void, typename std::enable_if<!std::is_function< MechanicT >::value, bool >::type = true> | |
auto | Operate (const MechanicT &Mechanic) |
Process the mechanism using a functor mechanic. | |
template<typename ChainT = void, typename MechanicT = void, typename std::enable_if<!std::is_function< MechanicT >::value, bool >::type = true> | |
auto | Operate (MechanicT &Mechanic) |
Process the mechanism using a functor mechanic. | |
template<typename ChainT = void, typename FunctionT = void, typename std::enable_if< std::is_function< FunctionT >::value, bool >::type = true> | |
auto | Operate (FunctionT *const Mechanic) |
Process the chain using a free function mechanic. | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::Auto, typename FilterT = void, typename MechanicT = void, TFilterTypeSecurity< std::decay_t< FilterT > > = true, typename std::enable_if<!std::is_function< MechanicT >::value, bool >::type = true> | |
auto | OperateConcurrently (FilterT &&Filter, const MechanicT &Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true) |
Process the mechanism using a functor mechanic in a threaded manner. | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::Auto, typename FilterT = void, typename MechanicT = void, TFilterTypeSecurity< std::decay_t< FilterT > > = true, typename std::enable_if<!std::is_function< MechanicT >::value, bool >::type = true> | |
auto | OperateConcurrently (FilterT &&Filter, MechanicT &Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true) |
Process the mechanism using a functor mechanic in a threaded manner. | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::Auto, typename FilterT = void, typename FunctionT = void, TFilterTypeSecurity< std::decay_t< FilterT > > = true, typename std::enable_if< std::is_function< FunctionT >::value, bool >::type = true> | |
auto | OperateConcurrently (FilterT &&Filter, FunctionT *const Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true) |
Process the chain using a free function mechanic in a parallel manner. | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::Auto, typename MechanicT = void, typename std::enable_if<!std::is_function< MechanicT >::value, bool >::type = true> | |
auto | OperateConcurrently (const MechanicT &Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true) |
Process the mechanism using a functor mechanic in a threaded manner. | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::Auto, typename MechanicT = void, typename std::enable_if<!std::is_function< MechanicT >::value, bool >::type = true> | |
auto | OperateConcurrently (MechanicT &Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true) |
Process the mechanism using a functor mechanic in a threaded manner. | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::Auto, typename FunctionT = void, typename std::enable_if< std::is_function< FunctionT >::value, bool >::type = true> | |
auto | OperateConcurrently (FunctionT *const Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1, const bool bSync=true) |
Process the chain using a free function mechanic in a parallel manner. | |
Static Public Attributes | |
static constexpr IdType | InvalidId = 0x00 |
Invalid mechanism identifier. | |
static constexpr IdType | FirstId = 0x01 |
The first valid mechanism identifier. | |
static constexpr IdType | LastId = TNumericLimits<IdType>::Max() - 1 |
The last valid mechanism identifier. | |
static constexpr int32 | InstancesMax = LastId - FirstId + 1 |
The maximum possible number of mechanisms within the machine. | |
static constexpr SubjectIdType | InvalidSubjectId = FSubjectInfo::InvalidId |
Invalid subject identifier. | |
static constexpr SubjectIdType | FirstSubjectPlace = FSubjectInfo::FirstPlace |
A first valid subject placement index within the pool. | |
static constexpr SubjectIdType | LastSubjectPlace = FSubjectInfo::LastPlace |
The maximum valid subject placement index within the pool. | |
static constexpr SubjectIdType | SubjectPlacesPerMechanism = FSubjectInfo::PlacesPerMechanismMax |
The maximum number of subjects within the machine. | |
static constexpr int32 | FoundIterablesInlineSize = 32 |
The pre-allocated size of the iterables being searched. | |
Friends | |
struct | FCommonChain |
struct | FSubjectNetworkState |
class | UNetworkBearerComponent |
class | UMachine |
class | IIterable |
template<typename ChunkItT , typename BeltItT , EParadigm Paradigm> | |
struct | TChain |
class | UBelt |
class | UChunk |
class | UApparatusFunctionLibrary |
struct | FSubjectInfo |
struct | FCommonSubjectHandle |
template<typename SubjectHandleT > | |
struct | TChunkIt |
template<typename SubjectHandleT > | |
struct | TBeltIt |
The scoped Apparatus state manager.
This consists of subjects, subjectives and the mechanicals in the current world.
An instance of mechanism is created automatically per each UWorld, when it's needed. You can also instantiate it manually or even place it on the map in the Editor.
The type of the mechanism identifier.
The type for the unique subject identifiers.
anonymous enum |
|
inline |
Construct a new mechanism object.
ObjectInitializer | The object initializer to use. |
|
inline |
Update a subjective's belt.
Should update the belt binding according to the current subjective's details. May actually assign a belt, if it's not yet set.
Paradigm | The paradigm to work under. |
Subjective | The subjective to actualize a belt for. |
|
inline |
Apply all of the currently pending changes.
The deferred application is only possible within the main thread.
Paradigm | The paradigm to work under. |
|
inline |
Apply a subset of the currently pending changes.
The deferred application is only possible within the main thread.
Paradigm | The paradigm to work under. |
InKinds | The list of deferred changes to apply. |
|
inline |
Apply a certain kind of the currently pending changes.
The deferred application is only possible within the main thread.
Paradigm | The paradigm to work under. |
InFilter | The kind of deferreds to apply. |
|
inline |
Boot all of the halted subjectives currently present in the Mechanism.
EApparatusStatus AMechanism::CollectSubjects | ( | TArray< FSubjectHandle, AllocatorT > & | OutSubjects, |
const FFilter & | Filter = FFilter::Default |
||
) |
Collect all of the subjects being part of the mechanism.
OutSubjects
array is not reset. The subjects are added up to it.OutSubjects | The array to store the subjects. |
Filter | The filter used to match the collected subjects. |
EApparatusStatus AMechanism::CollectSubjects | ( | USubjectRecordCollection *const | OutSubjects, |
const FFilter & | Filter = FFilter::Default , |
||
const EFlagmark | FlagmarkMask = FM_AllUserLevel |
||
) |
Collect the subjects being part of the mechanism.
OutSubjects
collection is not reset. The subjects are added up to it.OutSubjects | The collection to store the subjects within. |
Filter | The filter used to match the collected subjects. |
FlagmarkMask | The mask for flags to capture. Only user-level flags are captured by default. |
|
inline |
Create a new deferreds applicator.
Paradigm | The paradigm to work under. |
InFilter | A filter to request an applicator under. |
TOutcome< Paradigm > AMechanism::DespawnAllSubjects | ( | ) |
Despawn all of the subjects currently available within the mechanism.
Paradigm | The paradigm to work under. |
|
inline |
Enchain multiple iterable sequences based on a filter.
ChainT | The type of the chain to enchain within. |
FilterT | The type of the filter to enchain under. |
Filter | The filter to enchain under. |
|
inline |
Enchain multiple iterable sequences based on a filter.
ChainT | The type of the chain to enchain within. |
FilterT | The type of the filter to enchain under. |
[in] | Filter | The filter to enchain under. |
[out] | OutChain | The chain to enchain within. |
|
inline |
Enchain the matching chunks into proxies.
FilterT | The type of filter to enchain with. |
Ts | The types of traits to proxy. |
Filter | The filter to enchain under. |
OutChunkProxies | The chunk proxies array to output to. Those will be the locking ones. |
bIncludeEmpty | Should empty chunks be included? |
|
inline |
Enchain multiple iterables with a filter.
IterableT | The type of iterable to enchain. |
ChainT | The type of chain to enchain with. |
FilterT | The type of the filter to enchain under. |
Filter | The filter to enchain with. |
|
inline |
Enchain multiple iterables with a filter.
IterableT | The type of iterable to enchain. |
ChainT | The type of chain to enchain with. |
FilterT | The type of the filter to enchain under. |
Filter | The filter to enchain with. |
OutChain | The chain to enchain within. |
|
inline |
Enchain multiple iterable sequences based on a filter, returning a solid chain.
Filter | The filter to enchain under. |
|
inline |
Enchain subjects using a specific solidity.
bInSolidity | The solidity to enchain in. |
FilterT | The type of the filter to enchain by. |
|
inline |
Get all of the belts matching a fingerprint.
|
inline |
Get subject information by an identifier.
|
inline |
All of the subjectives currently available and registered.
|
inline |
Check if there are any deferreds queued.
This operation is thread-safe and lock-free.
|
inline |
Check if the automatic deferreds application is possible within the current context.
true
if the deferreds can be automatically be applied now, false
otherwise.
|
inline |
Check if the mechanism is currently inside a multi-threaded context.
The value returned by this method is guaranteed not to change for the caller's environment, as long as the caller is part of the normal built-in iterating/operating flow.
Certain actions are performed differently when working among several threads.
|
inline |
Check if the mechanism is currently in the mutable mode allowing any structural changes to its subjects and subjectives.
|
inline |
Check if the mechanism is currently locked in any manner.
|
inline |
Check if the mechanism is currently in the uniform mode preventing any structural changes to its subjects and subjectives.
The mechanism is solid if it has any solid-locked iterables within itself.
|
inline |
Obtain a chain of a specific type.
The chain can probably be reused among the embedded ones.
ChainT | The type of the chain to obtain. |
|
inline |
Obtain an embedded chain of a specific identifier.
This method is mainly used by the Blueprint frontend to provide the chain consistently during the iterating.
ChainId | The identifier of the chain to obtain. |
|
inline |
Find existing or create a new chunk for a traitmark.
Paradigm | The paradigm to work under. |
Traitmark | A traitmark to ensure for. |
Capacity | The desired capacity of the chunk. |
|
inline |
Find existing or create a new chunk for a traitmark.
Traitmark | A traitmark to ensure for. |
OutStatus | The status of the operation. |
Capacity | The desired capacity of the chunk. |
|
inline |
Process the mechanism using a functor mechanic.
Supports lambdas. Constant mechanic auto-filter version.
The filter is automatically derived from the mechanic's arguments.
ChainT | The type of chain to utilize. Detected automatically based on functor argument types by default. |
MechanicT | The type of the functor to operate on the enchained slots. Can be a lambda expression. |
Mechanic | The functor mechanic to operate with. Can be a lambda expression. |
|
inline |
Process the mechanism using a functor mechanic.
Supports lambdas. Constant mechanic version.
ChainT | The type of chain to utilize. Detected automatically based on functor argument types by default. |
FilterT | The type of filter that takes place. |
MechanicT | The type of the functor to operate on the enchained slots. Can be a lambda expression. |
Filter | The filter to query with. |
Mechanic | The functor mechanic to operate with. Can be a lambda expression. |
|
inline |
Process the chain using a free function mechanic.
ChainT | The type of chain to utilize. Detected automatically based on function's argument types by default. |
FilterT | The type of filter that takes place. |
FunctionT | The type of the mechanic function to operate on the slots. |
Filter | The filter to query with. |
Mechanic | The mechanical function to operate with. |
|
inline |
Process the mechanism using a functor mechanic.
Supports lambdas. Mutable mechanic version.
ChainT | The type of chain to utilize. Detected automatically based on functor argument types by default. |
FilterT | The type of filter that takes place. |
MechanicT | The type of the functor to operate on the enchained slots. Can be a lambda expression. |
Filter | The filter to query with. |
Mechanic | The functor mechanic to operate with. Can be a lambda expression. |
|
inline |
Process the chain using a free function mechanic.
Auto-filter version.
The filter is automatically derived from the mechanic's arguments.
ChainT | The type of chain to utilize. Detected automatically based on function's argument types by default. |
FunctionT | The type of the mechanic function to operate on the slots. |
Mechanic | The mechanical function to operate with. |
|
inline |
Process the mechanism using a functor mechanic.
Supports lambdas. Mutable mechanic auto-filter version.
The filter is automatically derived from the mechanic's arguments.
ChainT | The type of chain to utilize. Detected automatically based on functor argument types by default. |
MechanicT | The type of the functor to operate on the enchained slots. Can be a lambda expression. |
Mechanic | The functor mechanic to operate with. Can be a lambda expression. |
|
inline |
Process the mechanism using a functor mechanic in a threaded manner.
Supports lambdas. Constant mechanic auto-filter version.
The filter is derived automatically from the mechanic's arguments.
ChainT | The type of chain to utilize. Detected automatically based on functor's argument types by default. |
Paradigm | The security paradigm to utilize. |
MechanicT | The type of the functor to operate on the enchained slots. Can be a lambda expression. |
Mechanic | The functor mechanic to operate with. Can be a lambda expression. |
ThreadsCountMax | The maximum number of threads to process with. |
SlotsPerThreadMin | The minimum number of slots per thread to process. |
bSync | Should the operation be synced within the current branch. |
|
inline |
Process the mechanism using a functor mechanic in a threaded manner.
Supports lambdas. Constant mechanic version.
ChainT | The type of chain to utilize. Detected automatically based on functor's argument types by default. |
Paradigm | The security paradigm to utilize. Taken from ChainT by default. |
FilterT | The type of filter to query with. |
MechanicT | The type of the functor to operate on the enchained slots. Can be a lambda expression. |
Filter | The filter to query with. |
Mechanic | The functor mechanic to operate with. Can be a lambda expression. |
ThreadsCountMax | The maximum number of threads to process with. |
SlotsPerThreadMin | The minimum number of slots per thread to process. |
bSync | Should the operation be synced within the current branch. |
|
inline |
Process the chain using a free function mechanic in a parallel manner.
ChainT | The type of chain to utilize. Detected automatically based on function's argument types by default. |
Paradigm | The security paradigm to utilize. |
FilterT | The type of filter to query with. |
FunctionT | The type of the mechanic function to operate on the slots. |
Filter | The filter to query with. |
Mechanic | The mechanical function to operate with. |
ThreadsCountMax | The maximum number of threads to process with. |
SlotsPerThreadMin | The minimum number of slots per thread to process. |
bSync | Should the operation be synced within the current branch. |
|
inline |
Process the mechanism using a functor mechanic in a threaded manner.
Supports lambdas. Mutable mechanic version.
ChainT | The type of chain to utilize. Detected automatically based on functor's argument types by default. |
Paradigm | The security paradigm to utilize. |
FilterT | The type of filter to query with. |
MechanicT | The type of the functor to operate on the enchained slots. Can be a lambda expression. |
Filter | The filter to query with. |
Mechanic | The functor mechanic to operate with. Can be a lambda expression. |
ThreadsCountMax | The maximum number of threads to process with. |
SlotsPerThreadMin | The minimum number of slots per thread to process. |
bSync | Should the operation be synced within the current branch. |
|
inline |
Process the chain using a free function mechanic in a parallel manner.
Auto-filter version.
The filter is derived automatically from the mechanic's arguments.
ChainT | The type of chain to utilize. Detected automatically based on function's argument types by default. |
Paradigm | The security paradigm to utilize. |
FunctionT | The type of the mechanic function to operate on the slots. |
Mechanic | The mechanical function to operate with. |
ThreadsCountMax | The maximum number of threads to process with. |
SlotsPerThreadMin | The minimum number of slots per thread to process. |
bSync | Should the operation be synced within the current branch. |
|
inline |
Process the mechanism using a functor mechanic in a threaded manner.
Supports lambdas. Mutable mechanic auto-filter version.
The filter is derived automatically from the mechanic's arguments.
ChainT | The type of chain to utilize. Detected automatically based on functor's argument types by default. |
Paradigm | The security paradigm to utilize. |
MechanicT | The type of the functor to operate on the enchained slots. Can be a lambda expression. |
Mechanic | The functor mechanic to operate with. Can be a lambda expression. |
ThreadsCountMax | The maximum number of threads to process with. |
SlotsPerThreadMin | The minimum number of slots per thread to process. |
bSync | Should the operation be synced within the current branch. |
|
inline |
Get the number of current operatings happening within the mechanism.
Each chain also has its own local FCommonChain::OperatingsNum().
|
inline |
Register a mechanical within the mechanism.
Mechanical | A mechanical to register. |
TOutcome< Paradigm > AMechanism::RegisterSubjective | ( | ISubjective *const | Subjective | ) |
Register a subjective within the mechanism.
The method can be used to re-register a subjective within a different mechanism.
Paradigm | The paradigm to work under. |
Subjective | The subjective to register within the mechanism. |
|
override |
Reset the mechanism completely, unregistering all of the entities and despawning all of the subjects.
|
inline |
Spawn a new subject with a flagmark within the mechanism, returning the handle to the caller.
Paradigm | The paradigm to work under. |
Flagmark | The initial flagmark of the subject to spawn with. |
TOutcome< Paradigm, FSubjectHandle > AMechanism::SpawnSubject | ( | const FSubjectRecord & | SubjectRecord | ) |
Spawn a new subject based on a packed subject data record.
Paradigm | The paradigm to work under. |
SubjectRecord | The subject record to initialize a new subject with. |
|
inline |
Spawn a new subject within the mechanism based on a record.
Status version.
Paradigm | The paradigm to work under. |
SubjectRecord | The subject record to initialize a new subject with. |
OutStatus | The status of the operation. |
|
inline |
Spawn a new subject within the mechanism.
[out] | OutSubjectHandle | A subject handle to initialize with the new entity. |
[in] | Flagmark | The initial flagmark of the subject to spawn with. |
|
inline |
Spawn a new subject within the mechanism and a chunk of a specific traitmark.
The chunk's slot will be initialized to a default trait state.
[out] | OutSubjectHandle | A subject handle to initialize with the new entity. |
[in] | Traitmark | The traitmark for the chunk to spawn within. |
[in] | Flagmark | The initial flagmark of the subject to spawn with. May not contain any of the system-level flags. |
|
inline |
Spawn a new subject within the mechanism and a chunk of a specific traitmark.
R-value version.
[out] | OutSubjectHandle | A subject handle to initialize with the new entity. |
[in] | Traitmark | The traitmark for the chunk to spawn within. |
[in] | Flagmark | The initial flagmark of the subject to spawn with. |
|
inline |
Spawn a new subject based on a packed subject data record.
RValue reference compatibility version.
Paradigm | The paradigm to work under. |
SubjectRecord | The subject record to initialize a new subject with. |
|
inline |
Spawn a new subject based on a packed subject data record.
RValue reference compatibility version with a status.
SubjectRecord | The subject record to initialize a new subject with. |
OutStatus | The status of the operation. |
|
inline |
Spawn a new subject based on a packed subject data record.
Non-constant refernce compatibility version.
Paradigm | The paradigm to work under. |
SubjectRecord | The subject record to initialize a new subject with. |
|
inline |
Spawn a new subject based on a packed subject data record.
Non-constant compatibility version with a status.
SubjectRecord | The subject record to initialize a new subject with. |
OutStatus | The status of the operation. |
|
inline |
Spawn a new subject with traits, returning the handle.
Paradigm | The paradigm to work under. |
Ts | The types of traits to spawn with. |
Traits | The traits to spawn with. |
|
inline |
Spawn a new subject with traits, returning the handle.
Default paradigm version.
Paradigm | The paradigm to work under. |
Ts | The types of traits to spawn with. |
Traits | The traits to spawn with. |
|
inline |
Spawn a new subject with traits, returning the handle.
Ts | The types of traits to spawn with. |
Traits | The traits to spawn with. |
Flagmark | The initial flagmark of the subject to spawn with. |
|
inline |
Spawn a new subject with traits, returning the handle.
Default paradigm version.
Ts | The types of traits to spawn with. |
Traits | The traits to spawn with. |
Flagmark | The initial flagmark of the subject to spawn with. |
|
inline |
Spawn a new subject with a typed trait data, returning the handle.
Paradigm | The paradigm to work under. |
TraitType | The type of the trait to spawn with. Must not be a nullptr . |
TraitData | The data fo the trait to spawn with. Must not be a nullptr . |
Flagmark | The initial flagmark of the subject to spawn with. |
|
inline |
Spawn a new subject based on a packed subject data record.
Deferred version.
The actual entity creation is deferred until the deferreds are applied either automatically or manually.
Paradigm | The paradigm to work under. |
SubjectRecord | The subject record to initialize a new subject with. |
|
inline |
Spawn a new subject based on a packed subject data record.
Deferred version for RValue compatibility.
The actual entity creation is deferred until the deferreds are applied either automatically or manually.
Paradigm | The paradigm to work under. |
SubjectRecord | The subject record to initialize a new subject with. |
|
inline |
Spawn a new subject based on a packed subject data record.
Deferred version for non-constant compatibility.
The actual entity creation is deferred until the deferreds are applied either automatically or manually.
Paradigm | The paradigm to work under. |
SubjectRecord | The subject record to initialize a new subject with. |
|
inline |
Spawn a new subject with traits.
Deferred version.
Paradigm | The paradigm to work under. |
Ts | The types of traits to spawn with. |
Traits | The traits to spawn with. |
|
inline |
Spawn a new subject with traits.
Deferred default paradigm version.
Ts | The types of traits to spawn with. |
Paradigm | The paradigm to work under. |
Traits | The traits to spawn with. |
|
inline |
Spawn a new subject with traits and a flagmark.
Deferred version.
Paradigm | The paradigm to work under. |
Ts | The types of traits to spawn with. |
Traits | The traits to spawn with. |
Flagmark | The initial flagmark of the subject to spawn with. |
|
inline |
Spawn a new subject with traits and a flagmark.
Deferred default paradigm version.
Ts | The types of traits to spawn with. |
Paradigm | The paradigm to work under. |
Traits | The traits to spawn with. |
Flagmark | The initial flagmark of the subject to spawn with. |
|
inline |
Get the current number of effective subjectives in the mechanism.
SubjectIdType AMechanism::SubjectsNum | ( | ) | const |
Get the current number of subjects residing within the mechanism.
|
inline |
Unregister all of the currently registered mechanicals.
TOutcome< Paradigm > AMechanism::UnregisterAllSubjectives | ( | ) |
Unregister all of the currently registered subjectives.
|
inline |
Unregister a mechanical from the mechanism.
Mechanical | A mechanical to unregister. |
TOutcome< Paradigm > AMechanism::UnregisterSubjective | ( | ISubjective *const | Subjective | ) |
Remove a subjective from the mechanism completely.
Paradigm | The paradigm to work under. |
Subjective | The subjective to unregister. |
|
inline |
Wait for all the current operatings to be completed within all chains.
You can use this method after you queued up the asynchronous operatings in order to sync them all.
Each chain also has its own local FCommonChain::WaitForOperatingsCompletion().
|
inline |
Wait for all the current operatings to be completed within all chains.
You can use this method after you queued up the asynchronous operatings in order to sync them all.
Each chain also has its own local FCommonChain::WaitForOperatingsCompletion().
WaitTime | The time to wait. |
bIgnoreThreadIdleStats | If true , ignores ThreadIdleStats |
true
if the event was triggered, false
if the wait timed out.
|
inline |
Wait for all the current operatings to be completed within all chains.
You can use this method after you queued up the asynchronous operatings in order to sync them all.
Each chain also has its own local FCommonChain::WaitForOperatingsCompletion().
WaitTimeMsec | The time to wait. Measured in milliseconds. |
bIgnoreThreadIdleStats | If true , ignores ThreadIdleStats . |
true
if the event was triggered, false
if the wait timed out.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
staticconstexpr |
The first valid mechanism identifier.
|
staticconstexpr |
A first valid subject placement index within the pool.
|
staticconstexpr |
The pre-allocated size of the iterables being searched.
The maximum possible number of mechanisms within the machine.
|
staticconstexpr |
Invalid mechanism identifier.
|
staticconstexpr |
Invalid subject identifier.
The last valid mechanism identifier.
|
staticconstexpr |
The maximum valid subject placement index within the pool.
|
staticconstexpr |
The maximum number of subjects within the machine.