Karma Engine
Loading...
Searching...
No Matches
Karma::TActorIteratorBase< Derived > Class Template Reference

#include <KarmaUtilities.h>

Public Member Functions

void operator++ ()
 
FORCEINLINE AActoroperator* () const
 
FORCEINLINE AActoroperator-> () const
 
FORCEINLINE operator bool () const
 
void ClearCurrent ()
 
int32 GetProgressNumerator () const
 
FORCEINLINE bool CanIterateLevel (const ULevel *Level) const
 
FORCEINLINE bool IsActorSuitable (const AActor *Actor) const
 

Protected Member Functions

 TActorIteratorBase (EActorIteratorType)
 
 TActorIteratorBase (const UWorld *InWorld, TSubclassOf< AActor > InClass, const EActorIteratorFlags InFlags)
 

Detailed Description

template<typename Derived>
class Karma::TActorIteratorBase< Derived >

Template class used to filter actors by certain characteristics

Constructor & Destructor Documentation

◆ TActorIteratorBase()

template<typename Derived >
Karma::TActorIteratorBase< Derived >::TActorIteratorBase ( EActorIteratorType )
inlineprotected

Hide the constructors as construction on this class should only be done by subclasses

Member Function Documentation

◆ CanIterateLevel()

template<typename Derived >
FORCEINLINE bool Karma::TActorIteratorBase< Derived >::CanIterateLevel ( const ULevel * Level) const
inline

Used to examine whether this level is valid for iteration or not This function should be redefined (thus hiding this one) in a derived class if it wants special level filtering.

Parameters
Levelthe level to check for iteration
Returns
true if the level can be iterated, false otherwise

◆ ClearCurrent()

template<typename Derived >
void Karma::TActorIteratorBase< Derived >::ClearCurrent ( )
inline

Clears the current Actor in the array (setting it to NULL).

◆ GetProgressNumerator()

template<typename Derived >
int32 Karma::TActorIteratorBase< Derived >::GetProgressNumerator ( ) const
inline

Returns the number of actors considered thus far. Can be used in combination with GetProgressDenominator to gauge progress iterating over all actors.

Returns
number of actors considered thus far.

◆ IsActorSuitable()

template<typename Derived >
FORCEINLINE bool Karma::TActorIteratorBase< Derived >::IsActorSuitable ( const AActor * Actor) const
inline

Determines whether this is a valid actor or not. This function should be redefined (thus hiding this one) in a derived class if it wants special actor filtering.

Parameters
ActorActor to check
Returns
true

◆ operator bool()

template<typename Derived >
FORCEINLINE Karma::TActorIteratorBase< Derived >::operator bool ( ) const
inlineexplicit

Returns whether the iterator has reached the end and no longer points to a suitable actor.

Returns
true if iterator points to a suitable actor, false if it has reached the end

◆ operator*()

template<typename Derived >
FORCEINLINE AActor * Karma::TActorIteratorBase< Derived >::operator* ( ) const
inline

Returns the current suitable actor pointed at by the Iterator

Returns
Current suitable actor

◆ operator++()

template<typename Derived >
void Karma::TActorIteratorBase< Derived >::operator++ ( )
inline

Iterates to next suitable actor.

◆ operator->()

template<typename Derived >
FORCEINLINE AActor * Karma::TActorIteratorBase< Derived >::operator-> ( ) const
inline

Returns the current suitable actor pointed at by the Iterator

Returns
Current suitable actor

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