![]() |
Apparatus
Version 1.22
ECS data-oriented workflow for Unreal Engine.
|
The scoped Apparatus state manager. More...
#include <Mechanism.h>
Classes | |
struct | FDeferredsApplicator |
A safe applicator for the deferred changes (or deferreds). More... | |
Public Types | |
enum | { InvalidChainId = FChain::InvalidId , FirstChainId = FChain::FirstId } |
typedef FSubjectInfo::IdType | SubjectIdType |
The type for the unique subject identifiers. More... | |
Public Member Functions | |
const TSet< ISubjective * > & | GetSubjectives () const |
All of the subjectives currently available and registered. More... | |
FAdjectiveInfo & | GetAdjective (const int32 Id) |
Get subject information by an identifier. More... | |
EApparatusStatus | FindBeltsMatchingFingerprint (const struct FFingerprint &Fingerprint, TArray< UBelt * > &OutBelts) |
Get all of the belts matching a fingerprint. More... | |
EApparatusStatus | BootAll () |
Boot all of the halted subjectives currently present in the Mechanism. More... | |
template<typename IterableT , typename ChainT = FChain, typename FilterT = FFilter> | |
std::enable_if< std::is_base_of< FFilterIndicator, FilterT >::value, TSharedRef< ChainT > >::type | EnchainIterables (const FilterT &Filter) |
Enchain multiple iterables with a filter. More... | |
template<typename ChainT = FChain, typename FilterT = FFilter> | |
TSharedRef< ChainT > | Enchain (FilterT &&Filter) |
Enchain multiple iterable sequences based on a filter. More... | |
template<typename FilterT = FFilter, typename ... Ts> | |
std::enable_if< std::is_base_of< FFilterIndicator, FilterT >::value, void >::type | Enchain (FilterT &&Filter, TArray< TChunkProxy< Ts... > > &OutChunkProxies, const bool bIncludeEmpty=false) |
Enchain the matching chunks into proxies. More... | |
template<typename FilterT = FFilter> | |
TSharedRef< FSolidChain > | EnchainSolid (FilterT &&Filter) |
Enchain multiple iterable sequences based on a filter, returning a solid chain. More... | |
template<bool bInSolidity, typename FilterT = FFilter> | |
std::conditional< bInSolidity, TSharedRef< FSolidChain >, TSharedRef< FChain > >::type | EnchainWithSolidity (FilterT &&Filter) |
Enchain subjects using a specific solidity. More... | |
EApparatusStatus | HandleDetailsChange (ISubjective *const Subjective) |
Handle the subjective change. More... | |
EApparatusStatus | RegisterSubjective (ISubjective *const Subjective) |
Register a subjective within the mechanism. More... | |
EApparatusStatus | UnregisterSubjective (ISubjective *const Subjective) |
Remove a subjective from the mechanism completely. More... | |
EApparatusStatus | UnregisterAllSubjectives () |
Unregister all of the currently registered subjectives. More... | |
template<typename ChainT = FChain> | |
TSharedRef< ChainT > | ObtainChain (const int32 ChainId) const |
Obtain an embedded chain of a specific identifier. More... | |
template<typename ChainT = FChain> | |
TSharedRef< ChainT > | ObtainChain () const |
Obtain an unused chain of a specific type. More... | |
EApparatusStatus | RegisterMechanical (TScriptInterface< IMechanical > Mechanical) |
Register a mechanical within the mechanism. More... | |
EApparatusStatus | UnregisterMechanical (TScriptInterface< IMechanical > Mechanical) |
Unregister a mechanical from the mechanism. More... | |
EApparatusStatus | UnregisterAllMechanicals () |
Unregister all of the currently registered mechanicals. More... | |
UChunk * | ObtainChunk (const struct FTraitmark &Traitmark, EApparatusStatus &OutStatus, const int32 Capacity=32) |
Find existing or create a new chunk for a traitmark. More... | |
UChunk * | ObtainChunk (const struct FTraitmark &Traitmark, const int32 Capacity=32) |
Find existing or create a new chunk for a traitmark. More... | |
EApparatusStatus | DespawnAllSubjects () |
Despawn all of the subjects currently available within the mechanism. More... | |
void | Reset () override |
Reset the mechanism completely, unregistering all of the entities and despawning all of the subjects. More... | |
bool | IsSolid () const |
Check if the mechanism is currently in the uniform mode preventing any structural changes to its subjects and subjectives. More... | |
bool | IsLiquid () const |
Check if the mechanism is currently in the mutable mode allowing any structural changes to its subjects and subjectives. More... | |
void | BeginDestroy () override |
Destroy the mechanism object. More... | |
Inspection | |
SubjectIdType | SubjectsNum () const |
Get the current number of subjects residing within the mechanism. More... | |
int32 | SubjectivesNum () const |
Get the current number of effective subjectives in the mechanism. More... | |
Concurrency | |
bool | IsInConcurrentEnvironment () const |
Check if the mechanism is currently inside a multi-threaded context. More... | |
Spawning | |
EApparatusStatus | SpawnSubject (FSubjectHandle &SubjectHandle, const FTraitmark &Traitmark, const EFlagmark Flagmark=FM_None) |
Spawn a new subject within the mechanism and a chunk of a specific traitmark. More... | |
EApparatusStatus | SpawnSubject (FSubjectHandle &SubjectHandle, FTraitmark &&Traitmark, const EFlagmark Flagmark=FM_None) |
Spawn a new subject within the mechanism and a chunk of a specific traitmark. More... | |
EApparatusStatus | SpawnSubject (FSubjectHandle &SubjectHandle, const EFlagmark Flagmark=FM_None) |
Spawn a new subject within the mechanism. More... | |
FSubjectHandle | SpawnSubject (const FSubjectRecord &SubjectRecord, EApparatusStatus &OutStatus) |
Spawn a new subject within the mechanism based on a record. More... | |
FSubjectHandle | SpawnSubject (FSubjectRecord &&SubjectRecord, EApparatusStatus &OutStatus) |
Spawn a new subject based on a packed subject data record. More... | |
FSubjectHandle | SpawnSubject (FSubjectRecord &SubjectRecord, EApparatusStatus &OutStatus) |
Spawn a new subject based on a packed subject data record. More... | |
FSubjectHandle | SpawnSubject (const FSubjectRecord &SubjectRecord) |
Spawn a new subject based on a packed subject data record. More... | |
FSubjectHandle | SpawnSubject (FSubjectRecord &&SubjectRecord) |
Spawn a new subject based on a packed subject data record. More... | |
FSubjectHandle | SpawnSubject (FSubjectRecord &SubjectRecord) |
Spawn a new subject based on a packed subject data record. More... | |
EApparatusStatus | SpawnSubjectDeferred (const FSubjectRecord &SubjectRecord) |
Spawn a new subject based on a packed subject data record. More... | |
EApparatusStatus | SpawnSubjectDeferred (FSubjectRecord &&SubjectRecord) |
Spawn a new subject based on a packed subject data record. More... | |
EApparatusStatus | SpawnSubjectDeferred (FSubjectRecord &SubjectRecord) |
Spawn a new subject based on a packed subject data record. More... | |
FSubjectHandle | SpawnSubject (const EFlagmark Flagmark=FM_None) |
Spawn a new subject within the mechanism, returning the handle to the caller. More... | |
template<typename ... Ts> | |
FSubjectHandle | SpawnSubject (Ts &&... Traits) |
Spawn a new subject with traits, returning the handle. More... | |
template<typename ... Ts> | |
EApparatusStatus | SpawnSubjectDeferred (Ts &&... Traits) |
Spawn a new subject with traits, returning the handle. More... | |
template<typename ... Ts> | |
FSubjectHandle | SpawnSubject (Ts &&... Traits, const EFlagmark Flagmark) |
Spawn a new subject with traits, returning the handle. More... | |
template<typename ... Ts> | |
EApparatusStatus | SpawnSubjectDeferred (Ts &&... Traits, const EFlagmark Flagmark) |
Spawn a new subject with traits, returning the handle. More... | |
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. More... | |
Deferreds | |
bool | HasDeferreds () const |
Check if there are any deferreds queued. More... | |
EApparatusStatus | ApplyDeferreds () |
Apply all of the currently pending changes. More... | |
EApparatusStatus | ApplyDeferreds (const EDeferred InFilter) |
Apply a certain kind of the currently pending changes. More... | |
template<typename ContainerT > | |
EApparatusStatus | ApplyDeferreds (const ContainerT &InKinds) |
Apply a subset of the currently pending changes. More... | |
bool | IsAutomaticDeferredsApplicationPossible () const |
Check if the automatic deferreds application is possible within the current context. More... | |
FDeferredsApplicator | CreateDeferredsApplicator (const EDeferred InFilter=EDeferred::All) |
Create a new deferreds applicator. More... | |
Collecting | |
template<typename AllocatorT > | |
EApparatusStatus | CollectSubjects (TArray< FSubjectHandle, AllocatorT > &OutSubjects, const FFilter &Filter=FFilter::Zero) |
Collect all of the subjects being part of the mechanism. More... | |
EApparatusStatus | CollectSubjects (USubjectRecordCollection *const OutSubjects, const FFilter &Filter=FFilter::Zero, const EFlagmark FlagmarkMask=FM_AllUserLevel) |
Collect the subjects being part of the mechanism. More... | |
Operating | |
int32 | OperatingsNum () const |
Get the current number of (concurrent) operatings on the chain. More... | |
void | WaitForOperatingsCompletion () const |
Wait for all the current operatings to be completed. More... | |
template<typename ChainT = void, typename FilterT = void, typename MechanicT = void> | |
std::enable_if<!std::is_function< MechanicT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type | Operate (FilterT &&Filter, const MechanicT &Mechanic) |
Process the mechanism using a functor mechanic. More... | |
template<typename ChainT = void, typename FilterT = void, typename MechanicT = void> | |
std::enable_if<!std::is_function< MechanicT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type | Operate (FilterT &&Filter, MechanicT &Mechanic) |
Process the mechanism using a functor mechanic. More... | |
template<typename ChainT = void, typename FilterT = void, typename FunctionT = void> | |
std::enable_if< std::is_function< FunctionT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type | Operate (FilterT &&Filter, FunctionT *const Mechanic) |
Process the chain using a free function mechanic. More... | |
template<typename ChainT = void, typename MechanicT = void> | |
std::enable_if<!std::is_function< MechanicT >::value, EApparatusStatus >::type | Operate (const MechanicT &Mechanic) |
Process the mechanism using a functor mechanic. More... | |
template<typename ChainT = void, typename MechanicT = void> | |
std::enable_if<!std::is_function< MechanicT >::value, EApparatusStatus >::type | Operate (MechanicT &Mechanic) |
Process the mechanism using a functor mechanic. More... | |
template<typename ChainT = void, typename FunctionT = void> | |
std::enable_if< std::is_function< FunctionT >::value, EApparatusStatus >::type | Operate (FunctionT *const Mechanic) |
Process the chain using a free function mechanic. More... | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename FilterT = void, typename MechanicT = void> | |
std::enable_if<!std::is_function< MechanicT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type | 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. More... | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename FilterT = void, typename MechanicT = void> | |
std::enable_if<!std::is_function< MechanicT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type | 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. More... | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename FilterT = void, typename FunctionT = void> | |
std::enable_if< std::is_function< FunctionT >::value &&std::is_base_of< FFilterIndicator, FilterT >::value, EApparatusStatus >::type | 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. More... | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename MechanicT = void> | |
std::enable_if<!std::is_function< MechanicT >::value, EApparatusStatus >::type | 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. More... | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename MechanicT = void> | |
std::enable_if<!std::is_function< MechanicT >::value, EApparatusStatus >::type | 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. More... | |
template<typename ChainT = void, EParadigm Paradigm = EParadigm::None, typename FunctionT = void> | |
std::enable_if< std::is_function< FunctionT >::value, EApparatusStatus >::type | 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. More... | |
Static Public Attributes | |
static constexpr SubjectIdType | InvalidSubjectId = FSubjectInfo::InvalidId |
Invalid subject identifier. More... | |
static constexpr SubjectIdType | FirstSubjectId = FSubjectInfo::FirstId |
A first valid subject identifier. More... | |
static constexpr SubjectIdType | SubjectsCountMax = FSubjectInfo::CountMax |
The maximum number of subjects within the machine. More... | |
static constexpr SubjectIdType | SubjectIdMax = FSubjectInfo::IdMax |
The maximum valid subject identifier. More... | |
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 for the unique subject identifiers.
anonymous enum |
|
inline |
Apply all of the currently pending changes.
|
inline |
Apply a subset of the currently pending changes.
InKinds | The list of deferred changes to apply. |
|
inline |
Apply a certain kind of the currently pending changes.
InFilter | The kind of deferreds to apply. |
|
override |
Destroy the mechanism object.
This should happen when the mechanism is no longer needed.
|
inline |
Boot all of the halted subjectives currently present in the Mechanism.
EApparatusStatus AMechanism::CollectSubjects | ( | TArray< FSubjectHandle, AllocatorT > & | OutSubjects, |
const FFilter & | Filter = FFilter::Zero |
||
) |
Collect all of the subjects being part of the mechanism.
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::Zero , |
||
const EFlagmark | FlagmarkMask = FM_AllUserLevel |
||
) |
Collect the subjects being part of the mechanism.
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.
InFilter | A filter to request an applicator under. |
EApparatusStatus AMechanism::DespawnAllSubjects | ( | ) |
Despawn all of the subjects currently available within the mechanism.
|
inline |
Enchain multiple iterable sequences based on a filter.
Filter | The filter to enchain under. |
|
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. |
Filter | The filter to enchain with. |
|
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 |
Handle the subjective change.
|
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.
|
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 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 an unused chain of a specific type.
|
inline |
Obtain an embedded chain of a specific identifier.
ChainId | The identifier of the chain to obtain. |
|
inline |
Find existing or create a new chunk for a traitmark.
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.
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.
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.
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.
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. |
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.
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.
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 current number of (concurrent) operatings on the chain.
This operation is thread-safe and can be used to sync in the remaining active operatings.
|
inline |
Register a mechanical within the mechanism.
Mechanical | A mechanical to register. |
EApparatusStatus AMechanism::RegisterSubjective | ( | ISubjective *const | Subjective | ) |
Register a subjective within the mechanism.
Only an un-booted subjective can be registered.
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 within the mechanism, returning the handle to the caller.
Flagmark | The initial flagmark of the subject to spawn with. |
FSubjectHandle AMechanism::SpawnSubject | ( | const FSubjectRecord & | SubjectRecord | ) |
Spawn a new subject based on a packed subject data record.
SubjectRecord | The subject record to initialize a new subject with. |
FSubjectHandle AMechanism::SpawnSubject | ( | const FSubjectRecord & | SubjectRecord, |
EApparatusStatus & | OutStatus | ||
) |
Spawn a new subject within the mechanism based on a record.
Status version.
SubjectRecord | The subject record to initialize a new subject with. |
OutStatus | The status of the operation. |
|
inline |
Spawn a new subject within the mechanism.
SubjectHandle | A subject handle to initialize with the new entity. |
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.
SubjectHandle | A subject handle to initialize with the new entity. |
Traitmark | The traitmark for the chunk to spawn within. |
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.
SubjectHandle | A subject handle to initialize with the new entity. |
Traitmark | The traitmark for the chunk to spawn within. |
Flagmark | The initial flagmark of the subject to spawn with. |
|
inline |
Spawn a new subject based on a packed subject data record.
RValue refernce compatibility version.
SubjectRecord | The subject record to initialize a new subject with. |
|
inline |
Spawn a new subject based on a packed subject data record.
RValue refernce 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.
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.
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 a typed trait data, returning the handle.
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.
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.
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.
SubjectRecord | The subject record to initialize a new subject with. |
|
inline |
Spawn a new subject with traits, returning the handle.
Deferred version.
Ts | The types of traits to spawn with. |
Traits | The traits to spawn with. |
|
inline |
Spawn a new subject with traits, returning the handle.
Deferred 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 |
Get the current number of effective subjectives in the mechanism.
|
inline |
Get the current number of subjects residing within the mechanism.
|
inline |
Unregister all of the currently registered mechanicals.
EApparatusStatus AMechanism::UnregisterAllSubjectives | ( | ) |
Unregister all of the currently registered subjectives.
|
inline |
Unregister a mechanical from the mechanism.
Mechanical | A mechanical to unregister. |
EApparatusStatus AMechanism::UnregisterSubjective | ( | ISubjective *const | Subjective | ) |
Remove a subjective from the mechanism completely.
|
inline |
Wait for all the current operatings to be completed.
You can use this method after you queued up the asynchronous operatings in order to sync them all.
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
staticconstexpr |
A first valid subject identifier.
|
staticconstexpr |
Invalid subject identifier.
|
staticconstexpr |
The maximum valid subject identifier.
|
staticconstexpr |
The maximum number of subjects within the machine.