Apparatus Version 1.8
ECS data-oriented workflow for Unreal Engine.
Classes | Public Member Functions | List of all members
TChain< ChunkItT, BeltItT >::FCursor Struct Reference

A state of the chain iterating. More...

#include <Chain.h>

Public Member Functions

 FCursor (const TChain *const InOwner, const int32 InOffset=0, const int32 InLimit=TNumericLimits< int32 >::Max())
 Initialize a new cursor instance for a chain. More...
 
 FCursor (FCursor &&InCursor)
 Move-initialize a cursor. More...
 
 FCursor (const FCursor &InCursor)
 Copy-initialize a cursor. More...
 
FCursoroperator= (FCursor &&InCursor)
 Move a cursor. More...
 
FCursoroperator= (const FCursor &InCursor)
 Copy a cursor. More...
 
 FCursor ()
 Initialize a new invalid cursor. More...
 
 ~FCursor ()
 Finalize the cursor. More...
 
UClass * GetIterableClass () const
 Get the target sequence class. More...
 
bool IsLimitReached () const
 Check if the iterating limit was reached. More...
 
bool IsViable () const
 Check if the cursor is viable. More...
 
 operator bool () const
 Check if the cursor is viable. More...
 
void Reset ()
 Reset the cursor state making it invalid. More...
 
bool Begin ()
 Begin iterating with the cursor. More...
 
bool Begin (const int32 InOffset, const int32 InLimit)
 Begin iterating with the cursor. More...
 
bool Advance ()
 Advance the iterator to the next slot. More...
 
bool Provide ()
 Begin or advance iterating the chain using this cursor. More...
 
SubjectHandleType GetSubject () const
 Get the subject of the current iteration. More...
 
UObject * GetSubjectiveObject () const
 Get the subjective object of the current iteration. More...
 
SubjectiveTypeGetSubjective () const
 Get the subjective of the current iteration. More...
 
template<bool S = IsSolid>
std::enable_if< S, void * >::type GetTraitPtr (UScriptStruct *const TraitType) const
 Get a trait pointer of a certain type. More...
 
template<typename T >
std::enable_if< IsSolid, T * >::type GetTraitPtr () const
 Get a trait pointer of a certain type. More...
 
template<typename T >
GetTrait () const
 Get a trait copy of a certain type. More...
 
EApparatusStatus GetTrait (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get a trait of a certain type. More...
 
template<typename T >
EApparatusStatus GetTrait (T &OutTraitData, const bool bTraitDataInitialized=true) const
 Get a trait of a certain type. More...
 
template<bool S = IsSolid>
std::enable_if< S, void * >::type GetTraitPtrHinted (UScriptStruct *const TraitType, const int32 TraitIndexHint) const
 Get a pointer to a trait of a certain type with an index hint. More...
 
template<typename T >
std::enable_if< IsSolid, T * >::type GetTraitPtrHinted (const int32 TraitIndexHint) const
 Get a pointer to a trait of a certain type with an index hint. More...
 
template<typename T >
std::enable_if< IsSolid, T & >::type GetTraitRefHinted (const int32 TraitIndexHint) const
 Get a trait of a certain type with an index hint. More...
 
template<typename T >
GetTraitHinted (const int32 TraitIndexHint) const
 Get a copy of a trait of a certain type with an index hint. More...
 
template<typename T >
std::enable_if< IsSolid, T & >::type GetTraitRef () const
 Get a trait reference of a certain type. More...
 
EApparatusStatus GetTraitHinted (UScriptStruct *const TraitType, const int32 TraitIndexHint, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get a trait of a certain type with an index hint. More...
 
template<typename T >
EApparatusStatus GetTraitHinted (const int32 TraitIndexHint, T &OutTraitData, const bool bTraitDataInitialized=true) const
 Get a trait of a certain type with an index hint. More...
 
UDetailGetDetailAt (const int32 Index) const
 Get a detail at a certain index hinted. More...
 
UDetailGetDetailHinted (const TSubclassOf< UDetail > DetailClass, const int32 DetailIndexHint) const
 Get a detail of a certain class at an index hinted. More...
 
template<typename T >
T * GetDetailHinted (const int32 DetailIndexHint) const
 Get a detail of a certain class at an index hinted. More...
 
UDetailGetDetail (const TSubclassOf< UDetail > DetailClass) const
 Get a detail of a certain class. More...
 
template<typename T >
T * GetDetail () const
 Get a detail of a certain class. More...
 
template<typename ComponentT >
std::enable_if< IsSolid, ComponentT * >::type GetComponentPtr () const
 Get a pointer to a component. More...
 
template<typename ComponentT >
std::enable_if< IsSolid, ComponentT & >::type GetComponentRef () const
 Get a pointer for a reference. More...
 
template<typename ComponentT >
std::enable_if< IsSolid, ComponentT * >::type GetComponentPtrHinted (const int32 ComponentIndexHint) const
 Get a pointer to a component. More...
 
template<typename ComponentT >
std::enable_if< IsSolid, ComponentT & >::type GetComponentRefHinted (const int32 ComponentIndexHint) const
 Get a pointer for a reference. More...
 
template<typename ComponentT >
ComponentT GetComponent () const
 Get a component (trait or detail) by its type. More...
 
template<typename ComponentT >
ComponentT GetComponentHinted (const int32 ComponentIndexHint) const
 Get a component (trait or detail) by its type hinted with an index. More...
 

Detailed Description

template<typename ChunkItT, typename BeltItT>
struct TChain< ChunkItT, BeltItT >::FCursor

A state of the chain iterating.

Constructor & Destructor Documentation

◆ FCursor() [1/4]

template<typename ChunkItT , typename BeltItT >
TChain< ChunkItT, BeltItT >::FCursor::FCursor ( const TChain *const  InOwner,
const int32  InOffset = 0,
const int32  InLimit = TNumericLimits<int32>::Max() 
)
inline

Initialize a new cursor instance for a chain.

Parameters
InOwnerThe owner of the cursor to iterate.
InOffsetThe slot offset of the cursor to begin with.
InLimitThe slots limit to iterate under.

◆ FCursor() [2/4]

template<typename ChunkItT , typename BeltItT >
TChain< ChunkItT, BeltItT >::FCursor::FCursor ( FCursor &&  InCursor)
inline

Move-initialize a cursor.

◆ FCursor() [3/4]

template<typename ChunkItT , typename BeltItT >
TChain< ChunkItT, BeltItT >::FCursor::FCursor ( const FCursor InCursor)
inline

Copy-initialize a cursor.

◆ FCursor() [4/4]

template<typename ChunkItT , typename BeltItT >
TChain< ChunkItT, BeltItT >::FCursor::FCursor ( )
inline

Initialize a new invalid cursor.

◆ ~FCursor()

template<typename ChunkItT , typename BeltItT >
TChain< ChunkItT, BeltItT >::FCursor::~FCursor ( )
inline

Finalize the cursor.

Member Function Documentation

◆ Advance()

template<typename ChunkItT , typename BeltItT >
bool TChain< ChunkItT, BeltItT >::FCursor::Advance ( )
inline

Advance the iterator to the next slot.

Returns
Does the next iteration makes sense?

◆ Begin() [1/2]

template<typename ChunkItT , typename BeltItT >
bool TChain< ChunkItT, BeltItT >::FCursor::Begin ( )
inline

Begin iterating with the cursor.

Returns
Does the first iteration makes sense?

◆ Begin() [2/2]

template<typename ChunkItT , typename BeltItT >
bool TChain< ChunkItT, BeltItT >::FCursor::Begin ( const int32  InOffset,
const int32  InLimit 
)
inline

Begin iterating with the cursor.

Returns
Does the first iteration makes sense?

◆ GetComponent()

template<typename ChunkItT , typename BeltItT >
template<typename ComponentT >
ComponentT TChain< ChunkItT, BeltItT >::FCursor::GetComponent ( ) const
inline

Get a component (trait or detail) by its type.

Templated version.

Template Parameters
ComponentTA type of component to get.
Returns
A reference for a component of a designated type.

◆ GetComponentHinted()

template<typename ChunkItT , typename BeltItT >
template<typename ComponentT >
ComponentT TChain< ChunkItT, BeltItT >::FCursor::GetComponentHinted ( const int32  ComponentIndexHint) const
inline

Get a component (trait or detail) by its type hinted with an index.

Templated version.

Template Parameters
ComponentTA type of component to get. Can be a value, a reference or a pointer.
Parameters
ComponentIndexHintA component index hint, corresponding to an index within the locking filter.
Returns
A reference for a component of a designated type.

◆ GetComponentPtr()

template<typename ChunkItT , typename BeltItT >
template<typename ComponentT >
std::enable_if<IsSolid, ComponentT*>::type TChain< ChunkItT, BeltItT >::FCursor::GetComponentPtr ( ) const
inline

Get a pointer to a component.

Template Parameters
ComponentTA type of component to get.
Returns
A pointer to a component of a designated type.

◆ GetComponentPtrHinted()

template<typename ChunkItT , typename BeltItT >
template<typename ComponentT >
std::enable_if<IsSolid, ComponentT*>::type TChain< ChunkItT, BeltItT >::FCursor::GetComponentPtrHinted ( const int32  ComponentIndexHint) const
inline

Get a pointer to a component.

Template Parameters
ComponentTA type of component to get.
Returns
A pointer to a component of a designated type.

◆ GetComponentRef()

template<typename ChunkItT , typename BeltItT >
template<typename ComponentT >
std::enable_if<IsSolid, ComponentT&>::type TChain< ChunkItT, BeltItT >::FCursor::GetComponentRef ( ) const
inline

Get a pointer for a reference.

Template Parameters
ComponentTA type of component to get.
Returns
A reference for a component of a designated type.

◆ GetComponentRefHinted()

template<typename ChunkItT , typename BeltItT >
template<typename ComponentT >
std::enable_if<IsSolid, ComponentT&>::type TChain< ChunkItT, BeltItT >::FCursor::GetComponentRefHinted ( const int32  ComponentIndexHint) const
inline

Get a pointer for a reference.

Template Parameters
ComponentTA type of component to get.
Returns
A reference for a component of a designated type.

◆ GetDetail() [1/2]

template<typename ChunkItT , typename BeltItT >
template<typename T >
T* TChain< ChunkItT, BeltItT >::FCursor::GetDetail ( ) const
inline

Get a detail of a certain class.

Templated version.

◆ GetDetail() [2/2]

template<typename ChunkItT , typename BeltItT >
UDetail* TChain< ChunkItT, BeltItT >::FCursor::GetDetail ( const TSubclassOf< UDetail DetailClass) const
inline

Get a detail of a certain class.

◆ GetDetailAt()

template<typename ChunkItT , typename BeltItT >
UDetail* TChain< ChunkItT, BeltItT >::FCursor::GetDetailAt ( const int32  Index) const
inline

Get a detail at a certain index hinted.

◆ GetDetailHinted() [1/2]

template<typename ChunkItT , typename BeltItT >
template<typename T >
T* TChain< ChunkItT, BeltItT >::FCursor::GetDetailHinted ( const int32  DetailIndexHint) const
inline

Get a detail of a certain class at an index hinted.

Templated version.

◆ GetDetailHinted() [2/2]

template<typename ChunkItT , typename BeltItT >
UDetail* TChain< ChunkItT, BeltItT >::FCursor::GetDetailHinted ( const TSubclassOf< UDetail DetailClass,
const int32  DetailIndexHint 
) const
inline

Get a detail of a certain class at an index hinted.

◆ GetIterableClass()

template<typename ChunkItT , typename BeltItT >
UClass* TChain< ChunkItT, BeltItT >::FCursor::GetIterableClass ( ) const
inline

Get the target sequence class.

◆ GetSubject()

template<typename ChunkItT , typename BeltItT >
SubjectHandleType TChain< ChunkItT, BeltItT >::FCursor::GetSubject ( ) const
inline

Get the subject of the current iteration.

◆ GetSubjective()

template<typename ChunkItT , typename BeltItT >
SubjectiveType* TChain< ChunkItT, BeltItT >::FCursor::GetSubjective ( ) const
inline

Get the subjective of the current iteration.

◆ GetSubjectiveObject()

template<typename ChunkItT , typename BeltItT >
UObject* TChain< ChunkItT, BeltItT >::FCursor::GetSubjectiveObject ( ) const
inline

Get the subjective object of the current iteration.

◆ GetTrait() [1/3]

template<typename ChunkItT , typename BeltItT >
template<typename T >
T TChain< ChunkItT, BeltItT >::FCursor::GetTrait ( ) const
inline

Get a trait copy of a certain type.

◆ GetTrait() [2/3]

template<typename ChunkItT , typename BeltItT >
template<typename T >
EApparatusStatus TChain< ChunkItT, BeltItT >::FCursor::GetTrait ( T &  OutTraitData,
const bool  bTraitDataInitialized = true 
) const
inline

Get a trait of a certain type.

Templated version.

◆ GetTrait() [3/3]

template<typename ChunkItT , typename BeltItT >
EApparatusStatus TChain< ChunkItT, BeltItT >::FCursor::GetTrait ( UScriptStruct *const  TraitType,
void *const  OutTraitData,
const bool  bTraitDataInitialized = true 
) const
inline

Get a trait of a certain type.

◆ GetTraitHinted() [1/3]

template<typename ChunkItT , typename BeltItT >
template<typename T >
T TChain< ChunkItT, BeltItT >::FCursor::GetTraitHinted ( const int32  TraitIndexHint) const
inline

Get a copy of a trait of a certain type with an index hint.

◆ GetTraitHinted() [2/3]

template<typename ChunkItT , typename BeltItT >
template<typename T >
EApparatusStatus TChain< ChunkItT, BeltItT >::FCursor::GetTraitHinted ( const int32  TraitIndexHint,
T &  OutTraitData,
const bool  bTraitDataInitialized = true 
) const
inline

Get a trait of a certain type with an index hint.

Templated version.

◆ GetTraitHinted() [3/3]

template<typename ChunkItT , typename BeltItT >
EApparatusStatus TChain< ChunkItT, BeltItT >::FCursor::GetTraitHinted ( UScriptStruct *const  TraitType,
const int32  TraitIndexHint,
void *const  OutTraitData,
const bool  bTraitDataInitialized = true 
) const
inline

Get a trait of a certain type with an index hint.

◆ GetTraitPtr() [1/2]

template<typename ChunkItT , typename BeltItT >
template<typename T >
std::enable_if<IsSolid, T*>::type TChain< ChunkItT, BeltItT >::FCursor::GetTraitPtr ( ) const
inline

Get a trait pointer of a certain type.

◆ GetTraitPtr() [2/2]

template<typename ChunkItT , typename BeltItT >
template<bool S = IsSolid>
std::enable_if<S, void*>::type TChain< ChunkItT, BeltItT >::FCursor::GetTraitPtr ( UScriptStruct *const  TraitType) const
inline

Get a trait pointer of a certain type.

◆ GetTraitPtrHinted() [1/2]

template<typename ChunkItT , typename BeltItT >
template<typename T >
std::enable_if<IsSolid, T*>::type TChain< ChunkItT, BeltItT >::FCursor::GetTraitPtrHinted ( const int32  TraitIndexHint) const
inline

Get a pointer to a trait of a certain type with an index hint.

Templated version.

◆ GetTraitPtrHinted() [2/2]

template<typename ChunkItT , typename BeltItT >
template<bool S = IsSolid>
std::enable_if<S, void*>::type TChain< ChunkItT, BeltItT >::FCursor::GetTraitPtrHinted ( UScriptStruct *const  TraitType,
const int32  TraitIndexHint 
) const
inline

Get a pointer to a trait of a certain type with an index hint.

◆ GetTraitRef()

template<typename ChunkItT , typename BeltItT >
template<typename T >
std::enable_if<IsSolid, T&>::type TChain< ChunkItT, BeltItT >::FCursor::GetTraitRef ( ) const
inline

Get a trait reference of a certain type.

◆ GetTraitRefHinted()

template<typename ChunkItT , typename BeltItT >
template<typename T >
std::enable_if<IsSolid, T&>::type TChain< ChunkItT, BeltItT >::FCursor::GetTraitRefHinted ( const int32  TraitIndexHint) const
inline

Get a trait of a certain type with an index hint.

◆ IsLimitReached()

template<typename ChunkItT , typename BeltItT >
bool TChain< ChunkItT, BeltItT >::FCursor::IsLimitReached ( ) const
inline

Check if the iterating limit was reached.

◆ IsViable()

template<typename ChunkItT , typename BeltItT >
bool TChain< ChunkItT, BeltItT >::FCursor::IsViable ( ) const
inline

Check if the cursor is viable.

◆ operator bool()

template<typename ChunkItT , typename BeltItT >
TChain< ChunkItT, BeltItT >::FCursor::operator bool ( ) const
inline

Check if the cursor is viable.

◆ operator=() [1/2]

template<typename ChunkItT , typename BeltItT >
FCursor& TChain< ChunkItT, BeltItT >::FCursor::operator= ( const FCursor InCursor)
inline

Copy a cursor.

◆ operator=() [2/2]

template<typename ChunkItT , typename BeltItT >
FCursor& TChain< ChunkItT, BeltItT >::FCursor::operator= ( FCursor &&  InCursor)
inline

Move a cursor.

◆ Provide()

template<typename ChunkItT , typename BeltItT >
bool TChain< ChunkItT, BeltItT >::FCursor::Provide ( )
inline

Begin or advance iterating the chain using this cursor.

Returns
Is the iteration possible? Returns false if the iteration should be ended.

◆ Reset()

template<typename ChunkItT , typename BeltItT >
void TChain< ChunkItT, BeltItT >::FCursor::Reset ( )
inline

Reset the cursor state making it invalid.


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