Apparatus Version 1.3.0
ECS data-driven workflow for Unreal Engine.
Classes | Public Types | Public Member Functions | List of all members
FChunkChain Struct Reference

An iterable chunk sequence holder. More...

#include <ChunkChain.h>

Public Types

enum  { InvalidCursorId = -1 , DefaultCursorId = 0 , InvalidSegmentIndex = -1 }
 

Public Member Functions

EApparatusStatus Reset ()
 Unchain the chunks and reset the state completely. More...
 
template<typename TAllocator >
EApparatusStatus Enchain (const FFilter &InFilter, const TArray< UChunk *, TAllocator > &InChunks)
 Set to chain a set of chunks with a traitmark. More...
 
int32 FindSegment (const int32 SubjectIndex) const
 Find a certain chain segment by a subject index. More...
 
bool Begin (const int32 CursorId=DefaultCursorId) const
 Begin iterating the chain. More...
 
bool Advance (const int32 CursorId=DefaultCursorId) const
 Advance iterating the chain to the next index. More...
 
bool BeginOrAdvance (const int32 CursorId=DefaultCursorId) const
 Begin or advance iterating the chain. More...
 
FChunkChainoperator= (const FChunkChain &InChain)
 Set a chain equal to another chain. More...
 
FSubjectHandle GetSubject (const int32 CursorId=DefaultCursorId) const
 Get the subject of the current iteration. More...
 
TScriptInterface< ISubjectiveGetSubjective (const int32 CursorId=DefaultCursorId) const
 Get the subjective of the current iteration (if any). More...
 
UDetailGetDetail (const int32 CursorId, TSubclassOf< UDetail > DetailClass) const
 Get the detail on the current iteration of a certain type. More...
 
UDetailGetDetail (TSubclassOf< UDetail > DetailClass) const
 Get the detail on the current iteration of a certain type. More...
 
EApparatusStatus GetTraitAt (const int32 CursorId, const int32 TraitIndex, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get the trait on the current iteration at a specified index. More...
 
EApparatusStatus GetTraitAt (const int32 TraitIndex, void *const OutTraitData, const bool bTraitDataInitialized=true) const
 Get the trait on the current iteration at a specified index via default cursor. More...
 
 FChunkChain ()
 The default constructor leaving the chain uninitialized. More...
 
 FChunkChain (const FChunkChain &InChain)
 Construct a new chain as a copy of another one. More...
 
bool IsIterating () const
 Check if the chain currently being iterated by some cursor. More...
 

Detailed Description

An iterable chunk sequence holder.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
InvalidCursorId 

Invalid cursor identifier.

DefaultCursorId 

Default cursor identifier.

InvalidSegmentIndex 

Invalid segment index.

Constructor & Destructor Documentation

◆ FChunkChain() [1/2]

FChunkChain::FChunkChain ( )
inline

The default constructor leaving the chain uninitialized.

◆ FChunkChain() [2/2]

FChunkChain::FChunkChain ( const FChunkChain InChain)
inline

Construct a new chain as a copy of another one.

Parameters
InChainA chain to copy.

Member Function Documentation

◆ Advance()

bool FChunkChain::Advance ( const int32  CursorId = DefaultCursorId) const
inline

Advance iterating the chain to the next index.

Returns
Was an advancement successful?

◆ Begin()

bool FChunkChain::Begin ( const int32  CursorId = DefaultCursorId) const
inline

Begin iterating the chain.

Returns
Can the iterating actually begin?

◆ BeginOrAdvance()

bool FChunkChain::BeginOrAdvance ( const int32  CursorId = DefaultCursorId) const
inline

Begin or advance iterating the chain.

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

◆ Enchain()

template<typename TAllocator >
EApparatusStatus FChunkChain::Enchain ( const FFilter InFilter,
const TArray< UChunk *, TAllocator > &  InChunks 
)
inline

Set to chain a set of chunks with a traitmark.

Parameters
InFilterThe filter to enchain under.
InChunksThe chunks to enchain.
Returns
The status of the operation.

◆ FindSegment()

int32 FChunkChain::FindSegment ( const int32  SubjectIndex) const
inline

Find a certain chain segment by a subject index.

◆ GetDetail() [1/2]

UDetail* FChunkChain::GetDetail ( const int32  CursorId,
TSubclassOf< UDetail DetailClass 
) const
inline

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

Parameters
CursorIdThe identifier of the cursor to get from.
DetailClassThe class of the detail to get.
Returns
The detail of the current iteration of a specified class.

◆ GetDetail() [2/2]

UDetail* FChunkChain::GetDetail ( TSubclassOf< UDetail DetailClass) const
inline

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

Returns
The detail of the current iteration of a specified class.

◆ GetSubject()

FSubjectHandle FChunkChain::GetSubject ( const int32  CursorId = DefaultCursorId) const
inline

Get the subject of the current iteration.

Returns
The subject of the current iteration.

◆ GetSubjective()

TScriptInterface< ISubjective > FChunkChain::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.

◆ GetTraitAt() [1/2]

EApparatusStatus FChunkChain::GetTraitAt ( const int32  CursorId,
const int32  TraitIndex,
void *const  OutTraitData,
const bool  bTraitDataInitialized = true 
) const
inline

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

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

◆ GetTraitAt() [2/2]

EApparatusStatus FChunkChain::GetTraitAt ( const int32  TraitIndex,
void *const  OutTraitData,
const bool  bTraitDataInitialized = true 
) const
inline

Get the trait on the current iteration at a specified index via default cursor.

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

◆ IsIterating()

bool FChunkChain::IsIterating ( ) const
inline

Check if the chain currently being iterated by some cursor.

◆ operator=()

FChunkChain & FChunkChain::operator= ( const FChunkChain InChain)
inline

Set a chain equal to another chain.

◆ Reset()

EApparatusStatus FChunkChain::Reset ( )
inline

Unchain the chunks and reset the state completely.


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