Apparatus Version 1.8
ECS data-oriented workflow for Unreal Engine.
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
UBelt Class Reference

The conveyor belt consisting of subjects. More...

#include <Belt.h>

Inheritance diagram for UBelt:
Inheritance graph
[legend]
Collaboration diagram for UBelt:
Collaboration graph
[legend]

Public Types

enum  { InvalidSlotIndex = FBeltSlot::InvalidIndex }
 

Public Member Functions

constexpr bool IsSparse () const
 Is this a sparse belt allowing some empty detail spaces? More...
 
const FDetailmarkGetDetailmark () const
 The detailmark of the belt. More...
 
UMechanismGetOwner () const
 Get the owning mechanism of the belt. More...
 
EApparatusStatus Expand (const FDetailmark &InDetailmark, const EBootFilter InBootFilter=EBootFilter::None)
 Expand a belt to accommodate the new detailmark. More...
 
const FBeltSlotSlotAt (const int32 SlotIndex) const
 Get a belt slot by its index. More...
 
FBeltSlotSlotAt (const int32 SlotIndex)
 Get a belt slot by its index. More...
 
const FBeltSlotoperator[] (const int32 SlotIndex) const
 Get a belt slot by its index. More...
 
FBeltSlotoperator[] (const int32 SlotIndex)
 Get a belt slot by its index. More...
 
template<typename BeltItT >
BeltItT Begin (const FFilter &InFilter, const int32 Offset, EApparatusStatus &OutStatus)
 Begin iterating the belt. More...
 
template<typename BeltItT >
BeltItT Begin (const FFilter &InFilter, EApparatusStatus &OutStatus)
 Begin iterating the belt. More...
 
template<typename BeltItT >
BeltItT Begin (const FFilter &InFilter, const int32 Offset=0)
 Get the first slot for iterating with the. More...
 
template<typename BeltItT >
BeltItT Begin (const int32 Offset, EApparatusStatus &OutStatus)
 Get the first slot for iterating with the currently locked filter. More...
 
template<typename BeltItT >
BeltItT Begin (EApparatusStatus &OutStatus)
 Get the first slot for iterating with the currently locked filter. More...
 
template<typename BeltItT >
BeltItT Begin ()
 Get the first slot for iterating with the currently locked filter. More...
 
template<typename BeltItT >
BeltItT End ()
 The ending iterator. More...
 
EApparatusStatus Refresh (TScriptInterface< ISubjective > Subjective)
 Refresh a subjective within the belt. More...
 
EApparatusStatus Refresh (TScriptInterface< ISubjective > Subjective, const TArray< class UDetail * > &InDetails)
 Refresh a subjective within the belt. More...
 
virtual bool Matches (const FFilter &Filter) const override
 Check if the belt matches a filter. More...
 
- Public Member Functions inherited from IIterable
UMechanismGetOwner () const
 Get the owning mechanism of the iterable. More...
 
bool IsLocked () const
 Check if the sequence is currently locked. More...
 
bool IsSolid () const
 Check if the iterable is locked in a solid manner. More...
 
int32 Num () const
 Get the total number of slots currently in the iterable. More...
 
int32 IterableNum () const
 Get the current number of elements valid for iterating. More...
 
const FFilterGetLockingFilter () const
 Get the active locking filter of the sequence. More...
 

Static Public Member Functions

static class UBeltNew (UObject *Owner, const FDetailmark &InDetailmark)
 Create a new belt instance. More...
 
static class UBeltNew (UObject *Owner, const FName &Name, const FDetailmark &InDetailmark)
 Create a new belt instance. More...
 
static class UBeltNew (UObject *Owner, const FName &Name, const FDetailmark &InDetailmark, const EBootFilter BootFilter)
 Create a new belt instance. More...
 

Protected Member Functions

virtual EApparatusStatus DoLock (const FFilter &InFilter) const override
 Lock the iterable under a chosen filter. More...
 
virtual EApparatusStatus DoUnlock () const override
 Unlock the iterable, applying the pending changes. More...
 
- Protected Member Functions inherited from IIterable
template<bool bInSolid>
EApparatusStatus Lock (const FFilter &InFilter) const
 Lock the iterable under a chosen filter. More...
 
template<bool bInSolid>
EApparatusStatus Lock () const
 Add locks to the iterable under the existing already locking filter. More...
 
template<bool bInSolid>
EApparatusStatus Unlock () const
 Unlock the iterable, applying the pending changes. More...
 

Friends

struct FBeltSlot
 
template<typename SubjectHandleT >
struct TBeltIt
 
class USubjectiveActorComponent
 
class USubjectiveUserWidget
 
class UDetail
 
class UMechanism
 
class UMachine
 
class ISubjective
 

Additional Inherited Members

- Protected Attributes inherited from IIterable
TArray< int32 > LockedMapping
 A mapping from the locked traitmark/detailmark to the sequence's own traitmark/detailmark. More...
 
int32 Count = 0
 The logical (un-buffered) number of slots in the belt that are actually candidates for being iterated once the iterable is locked. More...
 
int32 IterableCount = -1
 A number of currently iterable slots, excluding those, that were added before the unlocking. More...
 
TArray< int32 > Removed
 The indices of the slots queued to be removed once the belt becomes unlocked. More...
 

Detailed Description

The conveyor belt consisting of subjects.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
InvalidSlotIndex 

Invalid slot index.

Member Function Documentation

◆ Begin() [1/6]

template<typename BeltItT >
BeltItT UBelt::Begin ( )
inline

Get the first slot for iterating with the currently locked filter.

Returns
The begining iterator.

◆ Begin() [2/6]

template<typename BeltItT >
BeltItT UBelt::Begin ( const FFilter InFilter,
const int32  Offset,
EApparatusStatus OutStatus 
)
inline

Begin iterating the belt.

Parameters
InFilterA filter to iterate under.
OffsetA slot offset to begin with.
OutStatusThe status receiver.
Returns
The iterator to use for the iterating.

◆ Begin() [3/6]

template<typename BeltItT >
BeltItT UBelt::Begin ( const FFilter InFilter,
const int32  Offset = 0 
)
inline

Get the first slot for iterating with the.

Parameters
InFilterA filter to iterate with.
OffsetA slot offset to begin with.
Returns
The begining iterator.

◆ Begin() [4/6]

template<typename BeltItT >
BeltItT UBelt::Begin ( const FFilter InFilter,
EApparatusStatus OutStatus 
)
inline

Begin iterating the belt.

Parameters
InFilterA filter to iterate under.
OutStatusThe status receiver.
Returns
The iterator to use for the iterating.

◆ Begin() [5/6]

template<typename BeltItT >
BeltItT UBelt::Begin ( const int32  Offset,
EApparatusStatus OutStatus 
)
inline

Get the first slot for iterating with the currently locked filter.

Parameters
OffsetA slot offset to begin with.
OutStatusThe status receiver.
Returns
The begining iterator.

◆ Begin() [6/6]

template<typename BeltItT >
BeltItT UBelt::Begin ( EApparatusStatus OutStatus)
inline

Get the first slot for iterating with the currently locked filter.

Parameters
OutStatusThe status receiver.
Returns
The begining iterator.

◆ DoLock()

EApparatusStatus UBelt::DoLock ( const FFilter InFilter) const
inlineoverrideprotectedvirtual

Lock the iterable under a chosen filter.

Must be implemented in the descendants.

Parameters
InFilterA filter to lock under.
Returns
The status of the operation.

Reimplemented from IIterable.

◆ DoUnlock()

EApparatusStatus UBelt::DoUnlock ( ) const
inlineoverrideprotectedvirtual

Unlock the iterable, applying the pending changes.

Must be implemented in the descedants.

Parameters
bInSolidShould the iterable be unlocked from a solid state.
Returns
The status of the operation.

Reimplemented from IIterable.

◆ End()

template<typename BeltItT >
BeltItT UBelt::End ( )
inline

The ending iterator.

Returns
The ending iterator.

◆ Expand()

EApparatusStatus UBelt::Expand ( const FDetailmark InDetailmark,
const EBootFilter  InBootFilter = EBootFilter::None 
)

Expand a belt to accommodate the new detailmark.

Note
The target detailmark will be added while being decomposed to its base classes.
Parameters
InDetailmarkThe new detailmark to include.
InBootFilterA boot filter to include.
Returns
The status of the operation.

◆ GetDetailmark()

const FDetailmark& UBelt::GetDetailmark ( ) const
inline

The detailmark of the belt.

Note
All of the base class details are decomposed into separate details here.
This is a detailmark for a sparse storage and some details may actually be missing within the belt slots.
Returns
The detailmark of the belt.

◆ GetOwner()

UMechanism * UBelt::GetOwner ( ) const
inline

Get the owning mechanism of the belt.

◆ IsSparse()

constexpr bool UBelt::IsSparse ( ) const
inlineconstexpr

Is this a sparse belt allowing some empty detail spaces?

◆ Matches()

bool UBelt::Matches ( const FFilter Filter) const
inlineoverridevirtual

Check if the belt matches a filter.

Reimplemented from IIterable.

◆ New() [1/3]

static class UBelt* UBelt::New ( UObject *  Owner,
const FDetailmark InDetailmark 
)
static

Create a new belt instance.

◆ New() [2/3]

static class UBelt* UBelt::New ( UObject *  Owner,
const FName &  Name,
const FDetailmark InDetailmark 
)
static

Create a new belt instance.

◆ New() [3/3]

static class UBelt* UBelt::New ( UObject *  Owner,
const FName &  Name,
const FDetailmark InDetailmark,
const EBootFilter  BootFilter 
)
static

Create a new belt instance.

◆ operator[]() [1/2]

FBeltSlot& UBelt::operator[] ( const int32  SlotIndex)
inline

Get a belt slot by its index.

Parameters
SlotIndexThe index of the belt slot.
Returns
The belt slot.

◆ operator[]() [2/2]

const FBeltSlot& UBelt::operator[] ( const int32  SlotIndex) const
inline

Get a belt slot by its index.

Constant version.

Parameters
SlotIndexThe index of the belt slot.
Returns
The belt slot.

◆ Refresh() [1/2]

EApparatusStatus UBelt::Refresh ( TScriptInterface< ISubjective Subjective)

Refresh a subjective within the belt.

Parameters
SubjectiveA subjective to refresh.

◆ Refresh() [2/2]

EApparatusStatus UBelt::Refresh ( TScriptInterface< ISubjective Subjective,
const TArray< class UDetail * > &  InDetails 
)

Refresh a subjective within the belt.

Parameters
SubjectiveA subjective to refresh.
InDetailsThe list of new detail to refresh with.

◆ SlotAt() [1/2]

FBeltSlot& UBelt::SlotAt ( const int32  SlotIndex)
inline

Get a belt slot by its index.

Parameters
SlotIndexThe index of the belt slot.
Returns
The belt slot.

◆ SlotAt() [2/2]

const FBeltSlot& UBelt::SlotAt ( const int32  SlotIndex) const
inline

Get a belt slot by its index.

Constant version.

Parameters
SlotIndexThe index of the belt slot.
Returns
The belt slot.

Friends And Related Function Documentation

◆ FBeltSlot

friend struct FBeltSlot
friend

◆ ISubjective

friend class ISubjective
friend

◆ TBeltIt

template<typename SubjectHandleT >
friend struct TBeltIt
friend

◆ UDetail

friend class UDetail
friend

◆ UMachine

friend class UMachine
friend

◆ UMechanism

friend class UMechanism
friend

◆ USubjectiveActorComponent

friend class USubjectiveActorComponent
friend

◆ USubjectiveUserWidget

friend class USubjectiveUserWidget
friend

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