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

An iterable sequence holder. More...

#include <Chain.h>

Classes

struct  FCursor
 A state of the chain iterating. More...
 

Public Types

enum  {
  IsSolid = ChunkItType::IsSolid , InvalidId = -1 , FirstId = 0 , InvalidCursorId = -1 ,
  DefaultCursorId = 0 , InvalidSegmentIndex = -1
}
 
typedef ChunkItT ChunkItType
 
typedef BeltItT BeltItType
 
typedef ChunkItT::SubjectHandleType SubjectHandleType
 
typedef ChunkItT::SubjectiveType SubjectiveType
 

Public Member Functions

void Retain () const
 Add a user of the chain preventing it from disposal. More...
 
void Release () const
 Remove a user of the chain, possibly making it a subject for disposal. More...
 
bool IsDisposed () const
 Check if the chain is disposed and is ready to be reused. More...
 
EApparatusStatus Reset ()
 Unchain the belts and reset the state completely. More...
 
EApparatusStatus Dispose ()
 Reset the state of the chain and mark as disposed (ready to be reused). More...
 
template<typename IterableT , typename TAllocator >
EApparatusStatus Enchain (const FFilter &InFilter, const TArray< IterableT *, TAllocator > &InIterables)
 Set to chain a set of iterables with a filter. More...
 
int32 FindSegment (const int32 InSlotIndex, int32 &OutRemainder) const
 Find a certain chain segment by a chain slot index. More...
 
FCursor Iterate (const int32 Offset=0, const int32 Limit=TNumericLimits< int32 >::Max()) const
 Prepare the chain for iterating returning the cursor. More...
 
template<typename MechanicT >
EApparatusStatus Operate (const MechanicT &InMechanic) const
 Process the chain using a functor mechanic. More...
 
template<typename RunnableMechanicT >
EApparatusStatus Operate (RunnableMechanicT &InMechanic) const
 Process the chain using a functor mechanic. More...
 
template<typename FunctionT >
EApparatusStatus Operate (FunctionT *const InMechanic) const
 Process the chain using a function. More...
 
template<typename FunctorT >
std::enable_if< IsSolid &&!std::is_void< FunctorT >::value, EApparatusStatus >::type OperateConcurrently (const FunctorT &Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1) const
 Process the chain using a functor mechanic in a parallel manner. More...
 
template<typename FunctorT >
std::enable_if< IsSolid &&!std::is_void< FunctorT >::value, EApparatusStatus >::type OperateConcurrently (FunctorT &Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1) const
 Process the chain using a functor mechanic in a parallel manner. More...
 
template<typename FunctionT >
std::enable_if< IsSolid &&!std::is_void< FunctionT >::value, EApparatusStatus >::type OperateConcurrently (FunctionT *const Mechanic, const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1) const
 Process the chain using a function mechanic in a parallel manner. More...
 
template<typename FunctorT >
EApparatusStatus Operate () const
 Process the chain using a functor mechanic. More...
 
template<typename FunctorT >
std::enable_if< IsSolid &&!std::is_void< FunctorT >::value, EApparatusStatus >::type OperateConcurrently (const int32 ThreadsCountMax, const int32 SlotsPerThreadMin=1) const
 Process the chain using a functor mechanic in a parallel manner. More...
 
bool Begin (const int32 CursorId=DefaultCursorId, const int32 Offset=0, const int32 Limit=TNumericLimits< int32 >::Max()) const
 Begin iterating the chain using an embedded cursor. More...
 
bool Advance (const int32 CursorId=DefaultCursorId) const
 Advance iterating the chain to the next iteration using the embedded cursor. More...
 
bool BeginOrAdvance (const int32 CursorId=DefaultCursorId, const int32 Offset=0, const int32 Limit=TNumericLimits< int32 >::Max()) const
 Begin or advance iterating the chain. More...
 
TChainoperator= (TChain &&InChain)
 Move a chain. More...
 
TChainoperator= (const TChain &InChain)
 Set a chain equal to another chain. More...
 
SubjectHandleType GetSubject (const int32 CursorId=DefaultCursorId) const
 Get the subject of the current iteration. More...
 
UObject * GetSubjectiveObject (const int32 CursorId=DefaultCursorId) const
 Get the subjective object of the current iteration (if any). More...
 
SubjectiveTypeGetSubjective (const int32 CursorId=DefaultCursorId) const
 Get the subjective of the current iteration (if any). More...
 
EApparatusStatus GetTrait (const int32 CursorId, UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get a trait on the current iteration. More...
 
template<bool S = IsSolid>
std::enable_if< S, void * >::type GetTraitPtr (const int32 CursorId, UScriptStruct *const TraitType) const
 Get a trait pointer on the current iteration by its type. More...
 
template<typename T >
std::enable_if< IsSolid, T * >::type GetTraitPtr (const int32 CursorId=DefaultCursorId) const
 Get a trait pointer on the current iteration by its type. More...
 
template<typename T >
std::enable_if< IsSolid, T & >::type GetTraitRef (const int32 CursorId=DefaultCursorId) const
 Get a trait reference on 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 specific type on the current iteration. More...
 
EApparatusStatus GetTrait (UScriptStruct *const TraitType, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get the trait on the current iteration. More...
 
template<typename T >
EApparatusStatus GetTrait (const int32 CursorId, T &OutTraitData, const bool bTraitDataInitialized=true) const
 Get a trait on the current iteration. More...
 
template<typename T >
EApparatusStatus GetTrait (T &OutTraitData, const bool bTraitDataInitialized=true) const
 Get the trait on the current iteration. More...
 
template<typename T >
GetTrait (const int32 CursorId=DefaultCursorId) const
 Get a trait copy on the current iteration. More...
 
EApparatusStatus GetTraitHinted (const int32 CursorId, UScriptStruct *TraitType, const int32 TraitIndexHint, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get the trait on the current iteration at a specified index hinted. More...
 
EApparatusStatus GetTraitHinted (UScriptStruct *TraitType, const int32 TraitIndexHint, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get the trait on the current iteration at a specified index hinted. More...
 
template<typename T >
EApparatusStatus GetTraitHinted (const int32 CursorId, const int32 TraitIndexHint, T &OutTraitData, const bool bTraitDataInitialized=true) const
 Get the trait on the current iteration at a specified index hinted. More...
 
template<bool S = IsSolid>
std::enable_if< S, void * >::type GetTraitPtrHinted (const int32 CursorId, UScriptStruct *const TraitType, const int32 TraitIndexHint) const
 Get a pointer to the trait on the current iteration at a specified index hinted. More...
 
template<bool S = IsSolid>
std::enable_if< S, void * >::type GetTraitPtrHinted (UScriptStruct *const TraitType, const int32 TraitIndexHint) const
 Get a pointer to the trait on the current iteration at a specified index hinted. More...
 
template<typename T >
std::enable_if< IsSolid, T * >::type GetTraitPtrHinted (const int32 CursorId, const int32 TraitIndexHint) const
 Get a pointer to the trait on the current iteration at a specified index hinted. More...
 
template<typename T >
std::enable_if< IsSolid, T * >::type GetTraitPtrHinted (const int32 TraitIndexHint) const
 Get a pointer to the trait on the current iteration at a specified index hinted. More...
 
template<typename T >
std::enable_if< IsSolid, T & >::type GetTraitRefHinted (const int32 CursorId, const int32 TraitIndexHint) const
 Get a reference for the trait on the current iteration at a specified index hinted. More...
 
template<typename T >
std::enable_if< IsSolid, T & >::type GetTraitRefHinted (const int32 TraitIndexHint) const
 Get a reference for the trait on the current iteration at a specified index hinted. More...
 
template<typename T >
EApparatusStatus GetTraitHinted (const int32 TraitIndexHint, T &OutTraitData, const bool bTraitDataInitialized=true) const
 Get the trait on the current iteration at a specified index hinted. More...
 
template<typename T >
GetTraitHinted (const int32 CursorId, const int32 TraitIndexHint) const
 Get a copy of a trait on the current iteration at a specified index hinted. More...
 
template<typename T >
GetTraitHinted (const int32 TraitIndexHint) const
 Get a copy of a trait on the current iteration at a specified index hinted. More...
 
UDetailGetDetail (const int32 CursorId, const TSubclassOf< UDetail > DetailClass) const
 Get a detail of a specific type on the current iteration. More...
 
UDetailGetDetail (const TSubclassOf< UDetail > DetailClass) const
 Get the detail on the current iteration of a certain class. More...
 
template<typename T >
T * GetDetail (const int32 CursorId=DefaultCursorId) const
 Get the detail on the current iteration of a certain class. More...
 
UDetailGetDetailHinted (const int32 CursorId, const TSubclassOf< UDetail > DetailClass, const int32 DetailIndexHint) const
 Get the detail on the current iteration at a certain index. More...
 
UDetailGetDetailHinted (const TSubclassOf< UDetail > DetailClass, const int32 DetailIndexHint) const
 Get the detail on the current iteration at a certain index. More...
 
template<class T >
T * GetDetailHinted (const int32 CursorId, const int32 DetailIndexHint) const
 Get the detail on the current iteration at a certain index hinted. More...
 
template<class T >
T * GetDetailHinted (const int32 DetailIndexHint) const
 Get the detail on the current iteration at a certain index hinted. More...
 
bool IsIterating () const
 Check if the chain currently being iterated by some cursor. More...
 
int32 IterableNum () const
 Get the total number of iterable entities available. More...
 
bool IsUsed () const
 Check if the chain is currently used (not available to be reused). More...
 
 TChain ()
 The default constructor leaving the chain uninitialized. More...
 
 TChain (const TChain &InChain)
 Construct a new chain as a copy of another one. More...
 

Friends

class UApparatusFunctionLibrary
 
class UMechanism
 
class UMachine
 

Detailed Description

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

An iterable sequence holder.

Template Parameters
ChunkItTThe type of the chunk iterator used.
BeltItTThe type of the belt iterator used.

Member Typedef Documentation

◆ BeltItType

template<typename ChunkItT , typename BeltItT >
typedef BeltItT TChain< ChunkItT, BeltItT >::BeltItType

◆ ChunkItType

template<typename ChunkItT , typename BeltItT >
typedef ChunkItT TChain< ChunkItT, BeltItT >::ChunkItType

◆ SubjectHandleType

template<typename ChunkItT , typename BeltItT >
typedef ChunkItT::SubjectHandleType TChain< ChunkItT, BeltItT >::SubjectHandleType

◆ SubjectiveType

template<typename ChunkItT , typename BeltItT >
typedef ChunkItT::SubjectiveType TChain< ChunkItT, BeltItT >::SubjectiveType

Member Enumeration Documentation

◆ anonymous enum

template<typename ChunkItT , typename BeltItT >
anonymous enum
Enumerator
IsSolid 

Is the chain actually uniform?

InvalidId 

Invalid chain identifier.

FirstId 

First valid chain identifier.

InvalidCursorId 

Invalid cursor identifier.

DefaultCursorId 

Default cursor identifier.

InvalidSegmentIndex 

Invalid segment index.

Constructor & Destructor Documentation

◆ TChain() [1/2]

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

The default constructor leaving the chain uninitialized.

◆ TChain() [2/2]

template<typename ChunkItT , typename BeltItT >
TChain< ChunkItT, BeltItT >::TChain ( const TChain< ChunkItT, BeltItT > &  InChain)
inline

Construct a new chain as a copy of another one.

Parameters
InChainA chain to copy.

Member Function Documentation

◆ Advance()

template<typename ChunkItT , typename BeltItT >
bool TChain< ChunkItT, BeltItT >::Advance ( const int32  CursorId = DefaultCursorId) const
inline

Advance iterating the chain to the next iteration using the embedded cursor.

Parameters
CursorIdThe identifier of an already iterating cursor.
Returns
Was the advancement successful?

◆ Begin()

template<typename ChunkItT , typename BeltItT >
bool TChain< ChunkItT, BeltItT >::Begin ( const int32  CursorId = DefaultCursorId,
const int32  Offset = 0,
const int32  Limit = TNumericLimits<int32>::Max() 
) const
inline

Begin iterating the chain using an embedded cursor.

Parameters
CursorIdThe identifier of the cursor to use. Will be obtained anew if doesn't exist.
OffsetThe slot offset to begin iterating with.
LimitThe maximum number of slots to iterate by.
Returns
Are there any actual slots to be iterated?

◆ BeginOrAdvance()

template<typename ChunkItT , typename BeltItT >
bool TChain< ChunkItT, BeltItT >::BeginOrAdvance ( const int32  CursorId = DefaultCursorId,
const int32  Offset = 0,
const int32  Limit = TNumericLimits<int32>::Max() 
) const
inline

Begin or advance iterating the chain.

Parameters
CursorIdThe identifier of the cursor. Created anew if needed.
OffsetThe slot offset to begin iterating with.
LimitThe maximum number of slots to iterate by.
Returns
Is the iteration possible? Returns false if the iteration should be ended.

◆ Dispose()

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

Reset the state of the chain and mark as disposed (ready to be reused).

◆ Enchain()

template<typename ChunkItT , typename BeltItT >
template<typename IterableT , typename TAllocator >
EApparatusStatus TChain< ChunkItT, BeltItT >::Enchain ( const FFilter InFilter,
const TArray< IterableT *, TAllocator > &  InIterables 
)
inline

Set to chain a set of iterables with a filter.

Parameters
InFilterThe target filter to enchain with.
InIterablesThe iterables to enchain.
Returns
The status of the operation.

◆ FindSegment()

template<typename ChunkItT , typename BeltItT >
int32 TChain< ChunkItT, BeltItT >::FindSegment ( const int32  InSlotIndex,
int32 &  OutRemainder 
) const
inline

Find a certain chain segment by a chain slot index.

◆ GetDetail() [1/3]

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

Get a detail of a specific type on the current iteration.

◆ GetDetail() [2/3]

template<typename ChunkItT , typename BeltItT >
template<typename T >
T* TChain< ChunkItT, BeltItT >::GetDetail ( const int32  CursorId = DefaultCursorId) const
inline

Get the detail on the current iteration of a certain class.

Templated version.

Returns
The detail of the current iteration at a certain class.

◆ GetDetail() [3/3]

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

Get the detail on the current iteration of a certain class.

Returns
The detail of the current iteration at a certain class.

◆ GetDetailHinted() [1/4]

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

Get the detail on the current iteration at a certain index hinted.

Templated version.

Template Parameters
TThe class of the detail to get.
Parameters
CursorIdThe identifier of the cursor.
DetailIndexHintThe index of the detail hinting.
Returns
The detail of the current iteration at a certain index.

◆ GetDetailHinted() [2/4]

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

Get the detail on the current iteration at a certain index.

Parameters
CursorIdThe identifier of the cursor to examine.
DetailClassThe class of the detail to get.
DetailIndexHintThe hinting index of the detail.
Returns
The detail of the current iteration at a certain index.

◆ GetDetailHinted() [3/4]

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

Get the detail on the current iteration at a certain index hinted.

Templated version.

Template Parameters
TThe class of the detail to get.
Parameters
DetailIndexHintThe index of the detail hinting.
Returns
The detail of the current iteration at a certain index.

◆ GetDetailHinted() [4/4]

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

Get the detail on the current iteration at a certain index.

Parameters
DetailClassThe class of the detail to get.
DetailIndexHintThe index of the detail hinting.
Returns
The detail of the current iteration at a certain index.

◆ GetSubject()

template<typename ChunkItT , typename BeltItT >
SubjectHandleType TChain< ChunkItT, BeltItT >::GetSubject ( const int32  CursorId = DefaultCursorId) const
inline

Get the subject of the current iteration.

Returns
The subject of the current iteration.

◆ GetSubjective()

template<typename ChunkItT , typename BeltItT >
SubjectiveType* TChain< ChunkItT, BeltItT >::GetSubjective ( const int32  CursorId = DefaultCursorId) const
inline

Get the subjective of the current iteration (if any).

Returns
The subjective of the current iteration or nullptr, if there is none.

◆ GetSubjectiveObject()

template<typename ChunkItT , typename BeltItT >
UObject* TChain< ChunkItT, BeltItT >::GetSubjectiveObject ( const int32  CursorId = DefaultCursorId) const
inline

Get the subjective object of the current iteration (if any).

Returns
The subjective object of the current iteration or nullptr, if there is none.

◆ GetTrait() [1/5]

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

Get a trait on the current iteration.

Templated version.

Template Parameters
TThe type of the trait to get.
Parameters
CursorIdThe identifier of the cursor to get from.
OutTraitDataThe output trait data buffer. The size of the buffer must be enough to store the whole trait.
bTraitDataInitializedWas trait data initialized prior to calling this function?
Returns
The status of the operation.

◆ GetTrait() [2/5]

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

Get a trait on the current iteration.

Parameters
CursorIdThe identifier of the cursor to get from.
TraitTypeThe type of the trait.
OutTraitDataThe output trait data.
bTraitDataInitializedWas trait data initialized prior to calling this function?
Returns
The status of the operation.

◆ GetTrait() [3/5]

template<typename ChunkItT , typename BeltItT >
template<typename T >
T TChain< ChunkItT, BeltItT >::GetTrait ( const int32  CursorId = DefaultCursorId) const
inline

Get a trait copy on the current iteration.

Templated version.

Template Parameters
TThe type of the trait to get.
Parameters
CursorIdThe identifier of the cursor to examine.
Returns
The copy of the trait.

◆ GetTrait() [4/5]

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

Get the trait on the current iteration.

Templated version.

Template Parameters
TThe type of the trait.
Parameters
OutTraitDataThe output trait data.
bTraitDataInitializedWas trait data initialized prior to calling this function?
Returns
The status of the operation.

◆ GetTrait() [5/5]

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

Get the trait on the current iteration.

Parameters
TraitTypeThe type of the trait to get.
OutTraitDataThe output trait data buffer. The size of the buffer must be enough to store the whole trait.
bTraitDataInitializedWas trait data initialized prior to calling this function?
Returns
The status of the operation.

◆ GetTraitHinted() [1/6]

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

Get a copy of a trait on the current iteration at a specified index hinted.

Templated version.

Template Parameters
TThe type of the trait.
Parameters
CursorIdThe identifier of the embedded cursor.
TraitIndexHintThe hinting index of the trait.
Returns
A copy of the trait.

◆ GetTraitHinted() [2/6]

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

Get the trait on the current iteration at a specified index hinted.

Templated version.

Template Parameters
TThe type of the trait to get.
Parameters
CursorIdThe identifier of the cursor to get from.
TraitIndexHintThe index of the trait hinting.
OutTraitDataThe output trait data.
bTraitDataInitializedWas trait data initialized prior to calling this function?
Returns
The status of the operation.

◆ GetTraitHinted() [3/6]

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

Get the trait on the current iteration at a specified index hinted.

Parameters
CursorIdThe identifier of the cursor to get from.
TraitIndexHintThe index of the trait.
TraitTypeThe type of the trait.
OutTraitDataThe output trait data.
bTraitDataInitializedWas trait data initialized prior to calling this function?
Returns
The status of the operation.

◆ GetTraitHinted() [4/6]

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

Get a copy of a trait on the current iteration at a specified index hinted.

Templated version.

Template Parameters
TThe type of the trait.
Parameters
TraitIndexHintThe index of the trait hint.
Returns
A copy of the trait.

◆ GetTraitHinted() [5/6]

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

Get the trait on the current iteration at a specified index hinted.

Templated version.

Template Parameters
TThe type of the trait.
Parameters
TraitIndexHintThe index of the trait hint.
OutTraitDataThe output trait data.
bTraitDataInitializedWas trait data initialized prior to calling this function?
Returns
The status of the operation.

◆ GetTraitHinted() [6/6]

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

Get the trait on the current iteration at a specified index hinted.

Parameters
TraitTypeThe type of the trait to get.
TraitIndexHintThe index of the trait hinting.
OutTraitDataThe output trait data.
bTraitDataInitializedWas trait data initialized prior to calling this function?
Returns
The status of the operation.

◆ GetTraitPtr() [1/3]

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

Get a trait pointer on the current iteration by its type.

Parameters
CursorIdThe identifier of the cursor to get from.
TraitTypeThe type of the trait to get.
Returns
The resulting trait data.

◆ GetTraitPtr() [2/3]

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

Get a trait pointer on the current iteration by its type.

Templated version.

Template Parameters
TThe type of the trait to get.
Parameters
CursorIdThe identifier of the cursor to get from.
Returns
The resulting trait data.

◆ GetTraitPtr() [3/3]

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

Get a trait pointer of a specific type on the current iteration.

Parameters
TraitTypeThe type of the trait to get.
Returns
The resulting trait data.

◆ GetTraitPtrHinted() [1/4]

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

Get a pointer to the trait on the current iteration at a specified index hinted.

Templated version.

Template Parameters
TThe type of the trait to get.
Parameters
CursorIdThe identifier of the cursor to get from.
TraitIndexHintThe index of the trait hinting.
Returns
The status of the operation.

◆ GetTraitPtrHinted() [2/4]

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

Get a pointer to the trait on the current iteration at a specified index hinted.

Parameters
CursorIdThe identifier of the cursor to get from.
TraitTypeThe type of the trait to get.
TraitIndexHintThe index of the trait hinting.
Returns
The status of the operation.

◆ GetTraitPtrHinted() [3/4]

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

Get a pointer to the trait on the current iteration at a specified index hinted.

Templated version.

Template Parameters
TThe type of the trait to get.
Parameters
TraitIndexHintThe index of the trait hinting.
Returns
The status of the operation.

◆ GetTraitPtrHinted() [4/4]

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

Get a pointer to the trait on the current iteration at a specified index hinted.

Parameters
TraitTypeThe type of the trait to get.
TraitIndexHintThe index of the trait hinting.
Returns
The status of the operation.

◆ GetTraitRef()

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

Get a trait reference on the current iteration.

Template Parameters
TThe type of the trait to get.
Parameters
CursorIdThe identifier of the cursor to get from.
Returns
The resulting trait data.

◆ GetTraitRefHinted() [1/2]

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

Get a reference for the trait on the current iteration at a specified index hinted.

Templated version.

Template Parameters
TThe type of the trait to get.
Parameters
CursorIdThe identifier of the cursor to get from.
TraitIndexHintThe index of the trait hinting.
Returns
The trait reference.

◆ GetTraitRefHinted() [2/2]

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

Get a reference for the trait on the current iteration at a specified index hinted.

Templated version.

Template Parameters
TThe type of the trait to get.
Parameters
TraitIndexHintThe index of the trait hinting.
Returns
The trait reference.

◆ IsDisposed()

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

Check if the chain is disposed and is ready to be reused.

◆ IsIterating()

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

Check if the chain currently being iterated by some cursor.

◆ IsUsed()

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

Check if the chain is currently used (not available to be reused).

The chain is considered is to be used if there are any iterable entities currently in the chain or there are some active cursors.

◆ IterableNum()

template<typename ChunkItT , typename BeltItT >
int32 TChain< ChunkItT, BeltItT >::IterableNum ( ) const
inline

Get the total number of iterable entities available.

◆ Iterate()

template<typename ChunkItT , typename BeltItT >
FCursor TChain< ChunkItT, BeltItT >::Iterate ( const int32  Offset = 0,
const int32  Limit = TNumericLimits<int32>::Max() 
) const
inline

Prepare the chain for iterating returning the cursor.

Parameters
OffsetThe slot offset to begin iterating with.
LimitThe maximum number of slots to iterate by.
Returns
The cursor used for iterating.

◆ Operate() [1/4]

template<typename ChunkItT , typename BeltItT >
template<typename FunctorT >
EApparatusStatus TChain< ChunkItT, BeltItT >::Operate ( ) const
inline

Process the chain using a functor mechanic.

Template Parameters
FunctorTThe type of the mechanical functor to operate on the chain slots.
TsThe type of components to provide to theTComponentTypesPack mechanic.
Returns
The status of the operation.

◆ Operate() [2/4]

template<typename ChunkItT , typename BeltItT >
template<typename MechanicT >
EApparatusStatus TChain< ChunkItT, BeltItT >::Operate ( const MechanicT &  InMechanic) const
inline

Process the chain using a functor mechanic.

Supports lambdas. Constant version.

Template Parameters
MechanicTThe type of the functor to operate on the enchained slots. Can be a lambda expression.
Returns
The status of the operation.

◆ Operate() [3/4]

template<typename ChunkItT , typename BeltItT >
template<typename FunctionT >
EApparatusStatus TChain< ChunkItT, BeltItT >::Operate ( FunctionT *const  InMechanic) const
inline

Process the chain using a function.

Template Parameters
FunctionTThe type of the function to operate on the enchained slots.
Returns
The status of the operation.

◆ Operate() [4/4]

template<typename ChunkItT , typename BeltItT >
template<typename RunnableMechanicT >
EApparatusStatus TChain< ChunkItT, BeltItT >::Operate ( RunnableMechanicT &  InMechanic) const
inline

Process the chain using a functor mechanic.

Supports lambdas.

Template Parameters
RunnableMechanicTThe type of the functor to operate on the enchained slots. Can be a lambda expression.
Returns
The status of the operation.

◆ OperateConcurrently() [1/4]

template<typename ChunkItT , typename BeltItT >
template<typename FunctorT >
std::enable_if<IsSolid && !std::is_void<FunctorT>::value, EApparatusStatus>::type TChain< ChunkItT, BeltItT >::OperateConcurrently ( const FunctorT &  Mechanic,
const int32  ThreadsCountMax,
const int32  SlotsPerThreadMin = 1 
) const
inline

Process the chain using a functor mechanic in a parallel manner.

Supports lambdas. Constant mechanic version.

Template Parameters
FunctorTThe type of the mechanic functor to operate on the slots. May be a lambda.
Parameters
MechanicThe mechanic functor to operate with. Can be a lambda.
ThreadsCountMaxThe maximum number of threads to process with.
SlotsPerThreadMinThe minimum number of slots per thread to process.
Returns
The status of the operation.

◆ OperateConcurrently() [2/4]

template<typename ChunkItT , typename BeltItT >
template<typename FunctorT >
std::enable_if<IsSolid && !std::is_void<FunctorT>::value, EApparatusStatus>::type TChain< ChunkItT, BeltItT >::OperateConcurrently ( const int32  ThreadsCountMax,
const int32  SlotsPerThreadMin = 1 
) const
inline

Process the chain using a functor mechanic in a parallel manner.

Template Parameters
FunctorTThe type of the mechanical functor to operate on the slots.
TsThe type of components to supply to the mechanic.
Parameters
ThreadsCountMaxThe maximum number of threads to process with.
SlotsPerThreadMinThe minimum number of slots per thread to process.
Returns
The status of the operation.

◆ OperateConcurrently() [3/4]

template<typename ChunkItT , typename BeltItT >
template<typename FunctionT >
std::enable_if<IsSolid && !std::is_void<FunctionT>::value, EApparatusStatus>::type TChain< ChunkItT, BeltItT >::OperateConcurrently ( FunctionT *const  Mechanic,
const int32  ThreadsCountMax,
const int32  SlotsPerThreadMin = 1 
) const
inline

Process the chain using a function mechanic in a parallel manner.

Template Parameters
FunctionTThe type of the mechanic functor to operate on the slots.
Parameters
MechanicThe mechanical function to operate with.
ThreadsCountMaxThe maximum number of threads to process with.
SlotsPerThreadMinThe minimum number of slots per thread to process.
Returns
The status of the operation.

◆ OperateConcurrently() [4/4]

template<typename ChunkItT , typename BeltItT >
template<typename FunctorT >
std::enable_if<IsSolid && !std::is_void<FunctorT>::value, EApparatusStatus>::type TChain< ChunkItT, BeltItT >::OperateConcurrently ( FunctorT &  Mechanic,
const int32  ThreadsCountMax,
const int32  SlotsPerThreadMin = 1 
) const
inline

Process the chain using a functor mechanic in a parallel manner.

Supports lambdas.

Template Parameters
FunctorTThe type of the mechanic functor to operate on the slots. May be a lambda.
Parameters
MechanicThe mechanic functor to operate with. Can be a lambda.
ThreadsCountMaxThe maximum number of threads to process with.
SlotsPerThreadMinThe minimum number of slots per thread to process.
Returns
The status of the operation.

◆ operator=() [1/2]

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

Set a chain equal to another chain.

◆ operator=() [2/2]

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

Move a chain.

◆ Release()

template<typename ChunkItT , typename BeltItT >
void TChain< ChunkItT, BeltItT >::Release ( ) const
inline

Remove a user of the chain, possibly making it a subject for disposal.

◆ Reset()

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

Unchain the belts and reset the state completely.

◆ Retain()

template<typename ChunkItT , typename BeltItT >
void TChain< ChunkItT, BeltItT >::Retain ( ) const
inline

Add a user of the chain preventing it from disposal.

Friends And Related Function Documentation

◆ UApparatusFunctionLibrary

template<typename ChunkItT , typename BeltItT >
friend class UApparatusFunctionLibrary
friend

◆ UMachine

template<typename ChunkItT , typename BeltItT >
friend class UMachine
friend

◆ UMechanism

template<typename ChunkItT , typename BeltItT >
friend class UMechanism
friend

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