|
Apparatus
Version 1.23
ECS data-oriented workflow for Unreal Engine.
|
A strongly typed chunk proxy. More...
#include <ChunkProxy.h>
Public Types | |
| template<EParadigm Paradigm> | |
| using | TTraitVoidPtrResult = typename SubjectHandleT::template TTraitVoidPtrResult< Paradigm > |
| The type of a trait void pointer returned by the methods. | |
| template<EParadigm Paradigm, typename T > | |
| using | TTraitPtrResult = typename SubjectHandleT::template TTraitPtrResult< Paradigm, T > |
| The type of a trait pointer returned by the methods. | |
| template<EParadigm Paradigm, typename T > | |
| using | TTraitRefResult = typename SubjectHandleT::template TTraitRefResult< Paradigm, T > |
| The type of a trait reference returned by the methods. | |
| template<class D > | |
| using | TDetailPtrResult = typename SubjectHandleT::template TDetailPtrResult< D > |
| The class of a detail pointer returned by the methods. | |
Public Member Functions | |
| virtual | ~TChunkProxy () |
Slots | |
| const FChunkSlot & | At (const int32 SlotIndex) const |
| Get a slot at a certain position. | |
| std::conditional_t< AllowsChanges, FChunkSlot &, const FChunkSlot & > | At (const int32 SlotIndex) |
| Get a slot at a certain position. | |
| const FChunkSlot & | operator[] (const int32 SlotIndex) const |
| Get a slot at a certain position. | |
| std::conditional_t< AllowsChanges, FChunkSlot &, const FChunkSlot & > | operator[] (const int32 SlotIndex) |
| Get a slot at a certain position. | |
| bool | IsStaleAt (const int32 SlotIndex) const |
| Check if the slot is actually stale at a certain position. | |
Subjects | |
| SubjectHandleT | SubjectAt (const int32 SlotIndex) const |
| Get a subject at a certain index within the chunk. | |
| const FFingerprint & | SubjectFingerprintAt (const int32 SlotIndex) const |
| Get a subject's fingerprint at a specific slot index. | |
| EFlagmark | SubjectFlagmarkAt (const int32 SlotIndex) const |
| Get a subject's flagmark at a specific slot index. | |
| bool | HasSubjectFlagAt (const int32 SlotIndex, const EFlagmarkBit Flag) const |
| Check a subject's flag at a specific slot index. | |
| template<EParadigm Paradigm = EParadigm::Safe> | |
| EFlagmark | SetSubjectFlagmarkAt (const int32 SlotIndex, const EFlagmark Flagmark) const |
| Set a subject's flagmark at a specific slot index. | |
| template<EParadigm Paradigm = EParadigm::Safe> | |
| EFlagmark | SetSubjectFlagmarkMaskedAt (const int32 SlotIndex, const EFlagmark Flagmark, const EFlagmark Mask) |
| Set the masked flagmark for the subject. | |
| template<EParadigm Paradigm = EParadigm::Safe> | |
| bool | SetSubjectFlagAt (const int32 SlotIndex, const EFlagmarkBit Flag, const bool bState=true) const |
| Set a subject's flag at a specific slot index. | |
| template<EParadigm Paradigm = EParadigm::Safe> | |
| bool | ToggleSubjectFlagAt (const int32 SlotIndex, const EFlagmarkBit Flag) const |
| Toggle a subject's flag at a specific slot index. | |
Traits Access | |
| template<typename T > | |
| T | TraitAt (const int32 SlotIndex) const |
| Get a trait from the chunk at a certain subject index. | |
| template<typename T > | |
| EApparatusStatus | TraitAt (const int32 SlotIndex, T &OutStruct, const bool bStructInitialized=true) const |
| Get a trait from the chunk at a certain subject index. | |
Traits Data Access | |
| template<EParadigm Paradigm, typename T > | |
| TTraitRefResult< Paradigm, const T > | TraitRefAt (const int32 SlotIndex) const |
| Get the trait reference from the chunk. | |
| template<typename T , EParadigm Paradigm = DefaultParadigm> | |
| TTraitRefResult< Paradigm, const T > | TraitRefAt (const int32 SlotIndex) const |
| Get the trait reference from the chunk. | |
| template<EParadigm Paradigm, typename T > | |
| TTraitRefResult< Paradigm, T > | TraitRefAt (const int32 SlotIndex) |
| Get the trait reference from the chunk. | |
| template<typename T , EParadigm Paradigm = DefaultParadigm> | |
| TTraitRefResult< Paradigm, T > | TraitRefAt (const int32 SlotIndex) |
| Get the trait reference from the chunk. | |
| template<EParadigm Paradigm, typename T > | |
| TTraitPtrResult< Paradigm, const T > | TraitPtrAt (const int32 Index) const |
| Get the trait pointer from the chunk. | |
| template<typename T , EParadigm Paradigm = DefaultParadigm> | |
| TTraitPtrResult< Paradigm, const T > | TraitPtrAt (const int32 Index) const |
| Get the trait pointer from the chunk. | |
| template<EParadigm Paradigm, typename T > | |
| TTraitPtrResult< Paradigm, T > | TraitPtrAt (const int32 Index) |
| Get the trait pointer from the chunk. | |
| template<typename T , EParadigm Paradigm = DefaultParadigm> | |
| TTraitPtrResult< Paradigm, T > | TraitPtrAt (const int32 Index) |
| Get the trait pointer from the chunk. | |
Iterating | |
| int32 | Num () const |
| Get the total number of slots currently in the iterable. | |
| int32 | IterableNum () const |
| Get the current number of elements valid for iterating. | |
Locking & Unlocking | |
| EApparatusStatus | Lock () |
| Lock the chunk for iterating. | |
| EApparatusStatus | Unlock () |
| Unlock the chunk from iterating. | |
Initialization | |
| TChunkProxy (UChunk *const InTarget, const bool bLock=false) | |
| Initialize a new proxy for a chunk. | |
| TChunkProxy (const TChunkProxy &InProxyChunk) | |
| Copy a proxy chunk. | |
| TChunkProxy (TChunkProxy &&InProxyChunk) | |
| Move a proxy chunk. | |
Static Public Attributes | |
| static constexpr auto | AllowsChanges = SubjectHandleT::AllowsChanges |
| Should subject changes be allowed. | |
| static constexpr auto | AllowsStructuralChanges = SubjectHandleT::AllowsStructuralChanges |
| Should structural (adding/removing traits) subject changes be allowed. | |
| static constexpr auto | AllowsDirectTraitAccess = SubjectHandleT::AllowsDirectTraitAccess |
| Can the trait data be accessed directly? | |
| static constexpr auto | ShouldLockSolid = SubjectHandleT::IsHandleSolid() |
| Is the chunk a solid-locking one? | |
| static constexpr EParadigm | DefaultParadigm = ParadigmCombine<Ts...>() |
| The security paradigm to use by default. | |
A strongly typed chunk proxy.
| SubjectHandleT | The subject handle to utilize. |
| Paradigm | The access security paradigm to use. |
| Ts | The types of traits to proxy. Some of them may actually be missing from the target chunk. May include the TParadigm specifications. |
| using TChunkProxy< SubjectHandleT, Ts >::TDetailPtrResult = typename SubjectHandleT::template TDetailPtrResult<D> |
The class of a detail pointer returned by the methods.
| D | The class of the detail. |
| using TChunkProxy< SubjectHandleT, Ts >::TTraitPtrResult = typename SubjectHandleT::template TTraitPtrResult<Paradigm, T> |
The type of a trait pointer returned by the methods.
| T | The type of the trait. |
| Paradigm | The access safety paradigm. |
| using TChunkProxy< SubjectHandleT, Ts >::TTraitRefResult = typename SubjectHandleT::template TTraitRefResult<Paradigm, T> |
The type of a trait reference returned by the methods.
| T | The type of the trait. |
| Paradigm | The access safety paradigm. |
| using TChunkProxy< SubjectHandleT, Ts >::TTraitVoidPtrResult = typename SubjectHandleT::template TTraitVoidPtrResult<Paradigm> |
The type of a trait void pointer returned by the methods.
| Paradigm | The access safety paradigm. |
|
inline |
Initialize a new proxy for a chunk.
| InTarget | The chunk to proxy. |
| bLock | Should the target chunk be locked. |
|
inline |
Copy a proxy chunk.
| InProxyChunk | The proxy chunk to copy. |
|
inline |
Move a proxy chunk.
| InProxyChunk | The proxy chunk to move. |
|
inlinevirtual |
|
inline |
Get a slot at a certain position.
|
inline |
Get a slot at a certain position.
Constant version.
|
inline |
Check a subject's flag at a specific slot index.
The operation is thread-safe and atomic.
The method is cache efficient during the iterating process, cause the flagmarks are stored within the chunk slots.
| SlotIndex | The index of the subject slot to examine. |
| Flag | The flag to test. |
|
inline |
Check if the slot is actually stale at a certain position.
Stale slots should generally be skipped during the iterating process.
|
inline |
Get the current number of elements valid for iterating.
|
inline |
Lock the chunk for iterating.
|
inline |
Get the total number of slots currently in the iterable.
|
inline |
Get a slot at a certain position.
|
inline |
Get a slot at a certain position.
Constant version.
|
inline |
Set a subject's flag at a specific slot index.
The operation is thread-safe and atomic.
The method is cache efficient during the iterating process, cause the flagmarks are stored within the chunk slots.
| Paradigm | The safety paradigm to utilize. |
| SlotIndex | The index of the subject slot to examine. |
| Flag | The flag to set or reset. |
| bState | The state of the flag to set to. |
|
inline |
Set a subject's flagmark at a specific slot index.
The operation is thread-safe and atomic.
The method is cache efficient during the iterating process, cause the flagmarks are stored within the chunk slots.
| Paradigm | The safety paradigm to utilize. |
| SlotIndex | The index of the subject slot to examine. |
| Flagmark | The flagmark to set to. |
|
inline |
Set the masked flagmark for the subject.
This operation is atomic and thread-safe.
All of the system-level flags get removed from the mask argument prior to application.
The method is cache efficient during the iterating process, cause the flagmarks are stored within the chunk slots.
| Paradigm | The safety paradigm to utilize. |
| SlotIndex | The index of the subject slot to examine. |
| Flagmark | The new flagmark to set to. |
| Mask | The mask to apply on the flagmark bits to set. |
|
inline |
Get a subject at a certain index within the chunk.
| SlotIndex | The index of the slot to get the subject of. |
|
inline |
Get a subject's fingerprint at a specific slot index.
The operation is thread-safe and atomic.
The method is cache efficient during the iterating process, cause the fingerprints are stored within the chunk slots.
| SlotIndex | The index of the subject slot to examine. |
|
inline |
Get a subject's flagmark at a specific slot index.
The operation is thread-safe and atomic.
The method is cache efficient during the iterating process, cause the flagmarks are stored within the chunk slots.
| SlotIndex | The index of the subject slot to examine. |
|
inline |
Toggle a subject's flag at a specific slot index.
The operation is thread-safe and atomic.
The method is cache efficient during the iterating process, cause the flagmarks are stored within the chunk slots.
| Paradigm | The safety paradigm to utilize. |
| SlotIndex | The index of the subject slot to examine. |
| Flag | The flag to toggle. |
|
inline |
Get a trait from the chunk at a certain subject index.
| T | The type of the trait to get. |
| SlotIndex | The index of the subject to examine. |
|
inline |
Get a trait from the chunk at a certain subject index.
| T | The type of the trait to get. |
| SlotIndex | The index of the subject to examine. |
| OutStruct | The struct to receive the trait. |
| bStructInitialized | Was the output struct actually initialized? |
|
inline |
Get the trait pointer from the chunk.
| T | The type of the trait to get. |
| Index | The index of the subject to examine. |
|
inline |
Get the trait pointer from the chunk.
| T | The type of the trait to get. |
| Index | The index of the subject to examine. |
|
inline |
Get the trait pointer from the chunk.
Constant version.
| T | The type of the trait to get. |
| Index | The index of the subject to examine. |
|
inline |
Get the trait pointer from the chunk.
Constant version.
| T | The type of the trait to get. |
| Index | The index of the subject to examine. |
|
inline |
Get the trait reference from the chunk.
| T | The type of the trait to get. |
| SlotIndex | The index of the subject to examine. |
|
inline |
Get the trait reference from the chunk.
| T | The type of the trait to get. |
| SlotIndex | The index of the subject to examine. |
|
inline |
Get the trait reference from the chunk.
Constant version.
| T | The type of the trait to get. |
| SlotIndex | The index of the subject to examine. |
|
inline |
Get the trait reference from the chunk.
Constant version.
| T | The type of the trait to get. |
| SlotIndex | The index of the subject to examine. |
|
inline |
Unlock the chunk from iterating.
|
staticconstexpr |
Should subject changes be allowed.
|
staticconstexpr |
Can the trait data be accessed directly?
|
staticconstexpr |
Should structural (adding/removing traits) subject changes be allowed.
|
staticconstexpr |
The security paradigm to use by default.
|
staticconstexpr |
Is the chunk a solid-locking one?