Apparatus Version 1.2.1
ECS data-driven workflow for Unreal Engine.
Public Types | Public Member Functions | Friends | List of all members
FChunkIt Struct Reference

A chunk's iterator. More...

#include <ChunkIt.h>

Public Types

enum  { InvalidSubjectIndex = FSubjectInfo::InvalidIndex }
 

Public Member Functions

UChunkGetChunk () const
 Get the chunk of the iterator. More...
 
 FChunkIt ()
 Initialize the chunk iterator. More...
 
 FChunkIt (const FChunkIt &Iterator)
 Initialize the chunk iterator as a copy of another iterator. More...
 
 ~FChunkIt ()
 Destroy the chunk iterator. More...
 
EApparatusStatus GetSubject (struct FSubjectHandle &Subject) const
 Get a subject from the chunk iterator. More...
 
FSubjectHandle GetSubject () const
 Get a subject from the chunk iterator. More...
 
const FFingerprintGetFingerprint () const
 Get the subject fingerprint from the chunk iterator. More...
 
EApparatusStatus GetTraitAt (const int32 TraitIndex, void *const OutTraitData, const bool bTraitDataInitialized=true)
 Get a trait at index from a currently iterated subject. More...
 
EApparatusStatus FastGetTraitAt (const int32 TraitIndex, void *const OutTraitData, const bool bTraitDataInitialized)
 Get a trait at index from a currently iterated subject fast. More...
 
void Reset ()
 Clear the iterator to a null-state. More...
 
bool IsViable () const
 Check if the iterator is valid and is not at the end of the chunk. More...
 
bool HasLocked () const
 Check whether the iterator has locked its chunk. More...
 
 operator bool () const
 Check if the iterator is valid and is not at the end of the chunk. More...
 
FChunkItoperator= (const FChunkIt &Iterator)
 Set iterator equal to another iterator. More...
 
EApparatusStatus Advance ()
 Move iterator to the next place (if available). More...
 

Friends

class UChunk
 

Detailed Description

A chunk's iterator.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
InvalidSubjectIndex 

Invalid subject index.

Constructor & Destructor Documentation

◆ FChunkIt() [1/2]

FChunkIt::FChunkIt ( )
inline

Initialize the chunk iterator.

◆ FChunkIt() [2/2]

FChunkIt::FChunkIt ( const FChunkIt Iterator)
inline

Initialize the chunk iterator as a copy of another iterator.

Note
Locks the chunk appropriately, if it's available in the original.

◆ ~FChunkIt()

FChunkIt::~FChunkIt ( )
inline

Destroy the chunk iterator.

Note
Unlocks the chunk, if it has been locked.

Member Function Documentation

◆ Advance()

EApparatusStatus FChunkIt::Advance ( )
inline

Move iterator to the next place (if available).

Returns
The status of the operation.

◆ FastGetTraitAt()

EApparatusStatus FChunkIt::FastGetTraitAt ( const int32  TraitIndex,
void *const  OutTraitData,
const bool  bTraitDataInitialized 
)
inline

Get a trait at index from a currently iterated subject fast.

Gets a trait from a currently iterated subject by its index, relative to the current chunk-locking filter's traitmark. Fast version runtime checks minimized.

Parameters
TraitIndexThe index of the trait to get.
OutTraitDataThe trait data receiver.
bTraitDataInitializedIs the OutTraitData buffer actually initialized?
Returns
The status of the operation.

◆ GetChunk()

UChunk* FChunkIt::GetChunk ( ) const
inline

Get the chunk of the iterator.

When an iterator comes to an end of a chunk it still persists this state value, unless cleared.

◆ GetFingerprint()

const FFingerprint & FChunkIt::GetFingerprint ( ) const
inline

Get the subject fingerprint from the chunk iterator.

Gets the fingerprint of the subject that is currently pointed by the chunk iterator.

Returns
The fingerprint of the current subject.

◆ GetSubject() [1/2]

FSubjectHandle FChunkIt::GetSubject ( ) const
inline

Get a subject from the chunk iterator.

Get a subject that is currently pointed by the chunk iterator.

Returns
The subject handle of the current iteration.

◆ GetSubject() [2/2]

EApparatusStatus FChunkIt::GetSubject ( struct FSubjectHandle Subject) const
inline

Get a subject from the chunk iterator.

Get a subject that is currently pointed by the chunk iterator.

Parameters
SubjectThe subject handle receiver.
Returns
The status of the operation.

◆ GetTraitAt()

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

Get a trait at index from a currently iterated subject.

Gets a trait from a currently iterated subject by its index, relative to the current chunk-locking filter's traitmark.

Parameters
TraitIndexThe index of the trait to get.
OutTraitDataThe trait data receiver.
bTraitDataInitializedIs the OutTraitData buffer actually initialized?
Returns
The status of the operation.

◆ HasLocked()

bool FChunkIt::HasLocked ( ) const
inline

Check whether the iterator has locked its chunk.

◆ IsViable()

bool FChunkIt::IsViable ( ) const
inline

Check if the iterator is valid and is not at the end of the chunk.

Returns
The state of examination.

◆ operator bool()

FChunkIt::operator bool ( ) const
inline

Check if the iterator is valid and is not at the end of the chunk.

Returns
The state of examination.

◆ operator=()

FChunkIt & FChunkIt::operator= ( const FChunkIt Iterator)
inline

Set iterator equal to another iterator.

◆ Reset()

void FChunkIt::Reset ( )
inline

Clear the iterator to a null-state.

Friends And Related Function Documentation

◆ UChunk

friend class UChunk
friend

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