Apparatus
Version 1.23
ECS data-oriented workflow for Unreal Engine.
|
The belt slot, containing the details. More...
#include <BeltSlot.h>
Public Types | |
enum | { InvalidIndex = ISubjective::InvalidSlotIndex , InvalidComboIndex = -1 , InvalidDetailIndex = -1 } |
Public Member Functions | |
FBeltSlot () | |
The default invalid/uninitialized slot constructor. | |
bool | IsLocked () const |
Check if the belt slot is currently locked. | |
UBelt * | GetOwner () const |
Get the owning belt of the slot. | |
int32 | GetIndex () const |
Get the index of the slot in the belt. | |
bool | IsStale () const |
Check if the slot is marked to be removed. | |
bool | IsSkipped (const FFilter &InFilter) const |
Check if a slot should be skipped during the iterating. | |
bool | IsViable () const |
Check if the slot is viable, i.e. | |
bool | IsViable (const FFilter &InFilter) const |
Check if the slot is viable, i.e. | |
EApparatusStatus | SetRemoved (const bool bInRemoved=true) |
Set the slot as to be removed (or not). | |
FSubjectHandle | GetSubject () const |
Get the subject of the slot. | |
ISubjective * | GetSubjective () const |
Get the subjective of the slot. | |
void | ResetDetails () const |
Clear all of the cached details in the slot, while actually maintaining a link to subjective itself (if any). | |
~FBeltSlot () | |
Deinitialize the belt slot. | |
bool | IsDetailAvailableAtLine (const int32 DetailIndex) |
Check if a detail exists at the specified index. | |
bool | IsComboValid (const TArray< int32 > &DetailsIndices, const int32 ComboIndex) const |
Check if a combo is valid, i.e. | |
template<EParadigm Paradigm = EParadigm::DefaultInternal> | |
TOutcome< Paradigm, UDetail * > | DetailAtLine (const TArray< int32 > &DetailsIndices, const int32 ComboIndex, const int32 DetailLineIndex) const |
Get the detail at a specified index according to the combination supplied. | |
template<EParadigm Paradigm = EParadigm::DefaultInternal> | |
TOutcome< Paradigm, UDetail * > | GetDetailHinted (const TArray< int32 > &DetailsIndices, const int32 ComboIndex, const TSubclassOf< UDetail > DetailClass, const int32 DetailIndexHint) const |
Get the detail at a specified index hinted according to the combination supplied. | |
template<EParadigm Paradigm, typename D > | |
TOutcome< Paradigm, D * > | GetDetailHinted (const TArray< int32 > &DetailsIndices, const int32 ComboIndex, const int32 DetailIndexHint) const |
Get the detail at a specified index hinted according to the combination supplied. | |
template<typename D , EParadigm Paradigm = EParadigm::DefaultInternal> | |
auto | GetDetailHinted (const TArray< int32 > &DetailsIndices, const int32 ComboIndex, const int32 DetailIndexHint) const |
Get the detail at a specified index hinted according to the combination supplied. | |
template<EParadigm Paradigm = EParadigm::DefaultInternal> | |
TOutcome< Paradigm, UDetail * > | GetDetail (const TArray< int32 > &DetailsIndices, const int32 ComboIndex, const TSubclassOf< UDetail > DetailClass) const |
Get the detail of a specific class according to the combination supplied. | |
template<EParadigm Paradigm, class D > | |
TOutcome< Paradigm, D * > | GetDetail (const TArray< int32 > &DetailsIndices, const int32 ComboIndex) const |
Get the detail of a specific class according to the combination supplied. | |
template<class D , EParadigm Paradigm = EParadigm::DefaultInternal> | |
auto | GetDetail (const TArray< int32 > &DetailsIndices, const int32 ComboIndex) const |
Get the detail of a specific class according to the combination supplied. | |
bool | FetchDetails () |
Fetch the details from the current subjective. | |
void | Expand () |
Expand the slot according to a belt's detailmark. | |
const FDetailmark & | GetDetailmark () const |
The active detailmark of the slot,. | |
operator bool () const | |
Is this slot actually valid? | |
bool | operator== (const FBeltSlot &Other) const |
Compare two belt slots for equality. | |
bool | operator!= (const FBeltSlot &Other) const |
Compare two belt slots for inequality. | |
EApparatusStatus | Set (const FBeltSlot &InSlot) |
Set the slot as another one from the same belt. | |
FBeltSlot & | operator= (const FBeltSlot &InSlot) |
Set the slot as another one from the same belt. | |
bool | HasAnyDetails () const |
Check if there are any details available within the caches. | |
bool | HasLockedDetails () const |
Check if the slot has any locked details within itself. | |
Friends | |
class | USubjectiveActorComponent |
class | UBelt |
template<typename SubjectHandleT > | |
struct | TBeltIt |
class | TArray< FBeltSlot > |
The belt slot, containing the details.
A faster cache is used for details.
anonymous enum |
|
inline |
The default invalid/uninitialized slot constructor.
|
inline |
Deinitialize the belt slot.
|
inline |
Get the detail at a specified index according to the combination supplied.
DetailsIndices | The indices of the details to consider. |
ComboIndex | The index of the combination to examine. |
DetailLineIndex | The index of the detail to get. Must also exist within the details indices array. |
|
inline |
Expand the slot according to a belt's detailmark.
bool FBeltSlot::FetchDetails | ( | ) |
Fetch the details from the current subjective.
This never expands the belt itself, but can expand the slot according to the belt's detailmark.
|
inline |
Get the detail of a specific class according to the combination supplied.
Statically typed version.
|
inline |
Get the detail of a specific class according to the combination supplied.
Statically typed version.
|
inline |
Get the detail of a specific class according to the combination supplied.
|
inline |
Get the detail at a specified index hinted according to the combination supplied.
Statically typed version.
Paradigm | The paradigm to work under. |
D | The class of the detail to get. |
DetailsIndices | The indices of the details to consider. |
ComboIndex | The index of the combination to examine. |
DetailIndexHint | The hinting index of the detail relative to the belt's detailmark. Should also exist within the details indices array. May be a FBeltSlot::InvalidDetailIndex to suppress the hinting. |
|
inline |
Get the detail at a specified index hinted according to the combination supplied.
Statically typed default paradigm version.
D | The class of the detail to get. |
Paradigm | The paradigm to work under. |
DetailsIndices | The indices of the details to consider. |
ComboIndex | The index of the combination to examine. |
DetailIndexHint | The hinting index of the detail relative to the belt's detailmark. Should also exist within the details indices array. May be a FBeltSlot::InvalidDetailIndex to suppress the hinting. |
|
inline |
Get the detail at a specified index hinted according to the combination supplied.
DetailsIndices | The indices of the details to consider. |
ComboIndex | The index of the combination. |
DetailClass | The class of the detail to get. |
DetailIndexHint | The hinting index of the detail to get. Relative to the belt's detailmark. Should also exist within the details indices array. May be a FBeltSlot::InvalidDetailIndex to suppress the hinting. |
|
inline |
The active detailmark of the slot,.
It is the same as its owning belt's unless the belt is locked in which case it's of the locking filter.
|
inline |
Get the index of the slot in the belt.
|
inline |
Get the owning belt of the slot.
|
inline |
Get the subject of the slot.
|
inline |
Get the subjective of the slot.
|
inline |
Check if there are any details available within the caches.
|
inline |
Check if the slot has any locked details within itself.
bool FBeltSlot::IsComboValid | ( | const TArray< int32 > & | DetailsIndices, |
const int32 | ComboIndex | ||
) | const |
Check if a combo is valid, i.e.
has all the necessary details.
DetailsIndices | The indices of the needed details to check for. |
ComboIndex | The index of the combination to examine. |
|
inline |
Check if a detail exists at the specified index.
DetailIndex | The index of the detail to check for availability. |
|
inline |
Check if the belt slot is currently locked.
The slot is locked if its belt is locked and its index is within the range of currently iterable slots.
Check if a slot should be skipped during the iterating.
InFilter | The filter to check compatibility with. |
|
inline |
Check if the slot is marked to be removed.
Also returns true
, if the subjective is disposed.
|
inline |
Check if the slot is viable, i.e.
meaningful for consideration.
Check if the slot is viable, i.e.
meaningful for consideration within a certain filter.
|
inline |
Is this slot actually valid?
Compare two belt slots for inequality.
Set the slot as another one from the same belt.
InSlot | The slot to set as. |
Compare two belt slots for equality.
|
inline |
Clear all of the cached details in the slot, while actually maintaining a link to subjective itself (if any).
Performs no memory deallocations.
|
inline |
Set the slot as another one from the same belt.
InSlot | The slot to set as. |
EApparatusStatus FBeltSlot::SetRemoved | ( | const bool | bInRemoved = true | ) |
Set the slot as to be removed (or not).
If the slot is locked at the moment, it is marked to be removed and is added to a list (for deferred removal) . Otherwise, it's instantly cleared.
|
friend |
|
friend |
|
friend |
|
friend |