KarmaEngine
Game Engine for practical learning and research purposes
Loading...
Searching...
No Matches
Karma::FActorIteratorState Class Reference

Abstract base class for actor iteration. Implements all operators and relies on IsActorSuitable to be overridden by derived class. More...

#include <KarmaUtilities.h>

Collaboration diagram for Karma::FActorIteratorState:

Public Member Functions

 FActorIteratorState ()
 Default constructor.
 
 FActorIteratorState (const UWorld *InWorld, const TSubclassOf< AActor > InClass)
 Default constructor, initializes everything relevant.
 
 ~FActorIteratorState ()
 A destructor.
 
FORCEINLINE AActorGetActorChecked () const
 Returns the current suitable actor pointed at by the Iterator.
 

Public Attributes

const UWorldm_CurrentWorld
 
KarmaVector< UObject * > m_ObjectArray
 
int32_t m_Index
 
bool m_ReachedEnd
 
int32_t m_ConsideredCount
 
AActorm_CurrentActor
 
KarmaVector< AActor * > m_SpawnedActorArray
 
UClassm_DesiredClass
 

Detailed Description

Abstract base class for actor iteration. Implements all operators and relies on IsActorSuitable to be overridden by derived class.

Note
that when Playing In Editor (when implemented), this will find actors only in CurrentWorld.

Constructor & Destructor Documentation

◆ FActorIteratorState() [1/2]

Karma::FActorIteratorState::FActorIteratorState ( )
inline

Default constructor.

Handle to the registered OnActorSpawned delegate

Since
Karma 1.0.0

◆ FActorIteratorState() [2/2]

Karma::FActorIteratorState::FActorIteratorState ( const UWorld * InWorld,
const TSubclassOf< AActor > InClass )
inline

Default constructor, initializes everything relevant.

Parameters
InWorldThe UWorld we would want to do iterations within
InClassThe class type we are iterating, kept for filtering
Since
Karma 1.0.0

◆ ~FActorIteratorState()

Karma::FActorIteratorState::~FActorIteratorState ( )
inline

A destructor.

Since
Karma 1.0.0

Member Function Documentation

◆ GetActorChecked()

FORCEINLINE AActor * Karma::FActorIteratorState::GetActorChecked ( ) const
inline

Returns the current suitable actor pointed at by the Iterator.

Returns
Current suitable actor
Since
Karma 1.0.0

Member Data Documentation

◆ m_ConsideredCount

int32_t Karma::FActorIteratorState::m_ConsideredCount

Number of actors that have been considered thus far

◆ m_CurrentActor

AActor* Karma::FActorIteratorState::m_CurrentActor

Current actor pointed to by actor iterator

◆ m_CurrentWorld

const UWorld* Karma::FActorIteratorState::m_CurrentWorld

Current world we are iterating upon

◆ m_DesiredClass

UClass* Karma::FActorIteratorState::m_DesiredClass

The class type we are iterating, kept for filtering

◆ m_Index

int32_t Karma::FActorIteratorState::m_Index

Index of the current element in the object array

◆ m_ObjectArray

KarmaVector<UObject*> Karma::FActorIteratorState::m_ObjectArray

Results from the GetObjectsOfClass query

◆ m_ReachedEnd

bool Karma::FActorIteratorState::m_ReachedEnd

Whether we already reached the end

◆ m_SpawnedActorArray

KarmaVector<AActor*> Karma::FActorIteratorState::m_SpawnedActorArray

Contains any actors spawned during iteration


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