Apparatus Version 1.8
ECS data-oriented workflow for Unreal Engine.
Public Types | Public Member Functions | Friends | List of all members
FBeltSlot Struct Reference

The belt slot, containing the cached details. More...

#include <BeltSlot.h>

Public Types

enum  { InvalidIndex = -1 , InvalidComboIndex = -1 }
 

Public Member Functions

 FBeltSlot ()
 The default invalid/uninitialized slot constructor. More...
 
UBeltGetOwner () const
 Get the owning belt of the slot. More...
 
bool IsLocked () const
 Check if this slot is currently locked within its belt. More...
 
int32 GetIndex () const
 Get the index of the slot in the belt. More...
 
bool IsStale () const
 Check if the slot is marked to be removed. More...
 
bool IsSkipped () const
 Check if a slot should be skipped during the iterating. More...
 
bool IsViable () const
 Check if the slot is viable, i.e. More...
 
EApparatusStatus SetRemoved (const bool bInRemoved=true)
 Set the slot as to be removed (or not). More...
 
FSubjectHandle GetSubject () const
 Get the subject of the slot. More...
 
TScriptInterface< ISubjectiveGetSubjective () const
 Get the subjective of the slot. More...
 
void ResetDetails () const
 Clear all of the cached details in the slot, while actually maintaining a link to subjective itself (if any). More...
 
 ~FBeltSlot ()
 Deinitialize the belt slot. More...
 
bool IsDetailAvailable (const int32 DetailIndex)
 Does a detail at the specified index exist? More...
 
bool IsComboValid (const int32 ComboIndex) const
 Check if a combo is valid, i.e. More...
 
UDetailGetDetailAt (const int32 ComboIndex, const int32 DetailIndex) const
 Get the detail at a specified index according to the combination supplied. More...
 
UDetailGetDetailHinted (const int32 ComboIndex, const TSubclassOf< UDetail > DetailClass, const int32 DetailIndexHint) const
 Get the detail at a specified index hinted according to the combination supplied. More...
 
template<typename T >
T * GetDetailHinted (const int32 ComboIndex, const int32 DetailIndexHint) const
 Get the detail at a specified index hinted according to the combination supplied. More...
 
UDetailGetDetail (const int32 ComboIndex, const TSubclassOf< UDetail > DetailClass) const
 Get the detail of a specific class according to the combination supplied. More...
 
template<typename T >
T * GetDetail (const int32 ComboIndex) const
 Get the detail of a specific class according to the combination supplied. More...
 
bool FetchDetails ()
 Fetch the details from the current subjective. More...
 
void Expand ()
 Expand the slot according to a belt's detailmark. More...
 
const FDetailmarkGetDetailmark () const
 The active detailmark of the slot,. More...
 
 operator bool () const
 Is this slot actually valid? More...
 
bool operator== (const FBeltSlot &Other) const
 Compare two belt slots for equality. More...
 
bool operator!= (const FBeltSlot &Other) const
 Compare two belt slots for inequality. More...
 
EApparatusStatus Set (const FBeltSlot &InSlot)
 Set the slot as another one from the same belt. More...
 
FBeltSlotoperator= (const FBeltSlot &InSlot)
 Set the slot as another one from the same belt. More...
 

Friends

class USubjectiveActorComponent
 
class UBelt
 
template<typename SubjectHandleT >
struct TBeltIt
 
class TArray< FBeltSlot >
 

Detailed Description

The belt slot, containing the cached details.

A faster cache is used internally.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
InvalidIndex 

Invalid belt slot index.

InvalidComboIndex 

Invalid combination index.

Constructor & Destructor Documentation

◆ FBeltSlot()

FBeltSlot::FBeltSlot ( )
inline

The default invalid/uninitialized slot constructor.

◆ ~FBeltSlot()

FBeltSlot::~FBeltSlot ( )
inline

Deinitialize the belt slot.

Member Function Documentation

◆ Expand()

void FBeltSlot::Expand ( )
inline

Expand the slot according to a belt's detailmark.

◆ FetchDetails()

bool FBeltSlot::FetchDetails ( )

Fetch the details from the current subjective.

◆ GetDetail() [1/2]

template<typename T >
T* FBeltSlot::GetDetail ( const int32  ComboIndex) const
inline

Get the detail of a specific class according to the combination supplied.

Templated version.

◆ GetDetail() [2/2]

UDetail * FBeltSlot::GetDetail ( const int32  ComboIndex,
const TSubclassOf< UDetail DetailClass 
) const
inline

Get the detail of a specific class according to the combination supplied.

◆ GetDetailAt()

UDetail * FBeltSlot::GetDetailAt ( const int32  ComboIndex,
const int32  DetailIndex 
) const
inline

Get the detail at a specified index according to the combination supplied.

The detail index gets remapped to the current locked detailmark.

◆ GetDetailHinted() [1/2]

template<typename T >
T* FBeltSlot::GetDetailHinted ( const int32  ComboIndex,
const int32  DetailIndexHint 
) const
inline

Get the detail at a specified index hinted according to the combination supplied.

Templated version.

The detail index gets remapped to the current locked detailmark.

◆ GetDetailHinted() [2/2]

UDetail * FBeltSlot::GetDetailHinted ( const int32  ComboIndex,
const TSubclassOf< UDetail DetailClass,
const int32  DetailIndexHint 
) const
inline

Get the detail at a specified index hinted according to the combination supplied.

The detail index gets remapped to the current locked detailmark.

◆ GetDetailmark()

const FDetailmark & FBeltSlot::GetDetailmark ( ) const
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.

◆ GetIndex()

int32 FBeltSlot::GetIndex ( ) const
inline

Get the index of the slot in the belt.

Returns
An index of the slot within its belt.

◆ GetOwner()

UBelt* FBeltSlot::GetOwner ( ) const
inline

Get the owning belt of the slot.

◆ GetSubject()

FSubjectHandle FBeltSlot::GetSubject ( ) const
inline

Get the subject of the slot.

◆ GetSubjective()

TScriptInterface< class ISubjective > FBeltSlot::GetSubjective ( ) const
inline

Get the subjective of the slot.

◆ IsComboValid()

bool FBeltSlot::IsComboValid ( const int32  ComboIndex) const

Check if a combo is valid, i.e.

has all the necessary details.

◆ IsDetailAvailable()

bool FBeltSlot::IsDetailAvailable ( const int32  DetailIndex)
inline

Does a detail at the specified index exist?

Parameters
DetailIndexA detail index relative to the current locking filter.
Returns
The state of examination.

◆ IsLocked()

bool FBeltSlot::IsLocked ( ) const
inline

Check if this slot is currently locked within its belt.

Considered to be locked, when the iterable combos are fetched.

Returns
The state of the examination.

◆ IsSkipped()

bool FBeltSlot::IsSkipped ( ) const
inline

Check if a slot should be skipped during the iterating.

◆ IsStale()

bool FBeltSlot::IsStale ( ) const
inline

Check if the slot is marked to be removed.

Also returns true, if the subjective is disposed.

◆ IsViable()

bool FBeltSlot::IsViable ( ) const
inline

Check if the slot is viable, i.e.

meaningful for consideration.

◆ operator bool()

FBeltSlot::operator bool ( ) const
inline

Is this slot actually valid?

◆ operator!=()

bool FBeltSlot::operator!= ( const FBeltSlot Other) const
inline

Compare two belt slots for inequality.

◆ operator=()

FBeltSlot& FBeltSlot::operator= ( const FBeltSlot InSlot)
inline

Set the slot as another one from the same belt.

Parameters
InSlotThe slot to set as.

◆ operator==()

bool FBeltSlot::operator== ( const FBeltSlot Other) const
inline

Compare two belt slots for equality.

◆ ResetDetails()

void FBeltSlot::ResetDetails ( ) const
inline

Clear all of the cached details in the slot, while actually maintaining a link to subjective itself (if any).

Performs no memory deallocations.

◆ Set()

EApparatusStatus FBeltSlot::Set ( const FBeltSlot InSlot)
inline

Set the slot as another one from the same belt.

Parameters
InSlotThe slot to set as.
Returns
The status of the operation.

◆ SetRemoved()

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.

Friends And Related Function Documentation

◆ TArray< FBeltSlot >

friend class TArray< FBeltSlot >
friend

◆ TBeltIt

template<typename SubjectHandleT >
friend struct TBeltIt
friend

◆ UBelt

friend class UBelt
friend

◆ USubjectiveActorComponent

friend class USubjectiveActorComponent
friend

The documentation for this struct was generated from the following files: