TObjectIterator

Class for iterating through all objects which inherit from a specified base class.

Windows
MacOS
Linux

References

Module

CoreUObject

Header

/Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectIterator.h

Include

#include "UObject/UObjectIterator.h"

Syntax

template<class T>
class TObjectIterator

Remarks

Class for iterating through all objects which inherit from a specified base class. Does not include any class default objects.

that when Playing In Editor, this will find objects in the editor as well as the PIE world, in an indeterminate order.

Specializations

Variables

Name Description

Protected variable

int32

 

Index

Index of the current element in the object array

Protected variable

TArray< UObject...

 

ObjectArray

Results from the GetObjectsOfClass query

Constructors

Name Description

Public function

TObjectIterator

(
    EEndTagType,
    const TObjectIterator& Begin
)

Constructor

Public function

TObjectIterator

(
    EObjectFlags AdditionalExclusionFla...,
    bool bIncludeDerivedClasses,
    EInternalObjectFlags InternalExclus...
)

Constructor

Functions

Name Description

Protected function

bool

 

Advance()

Iterator advance with ordinary name for clarity in subclasses

Protected function Const

UObject *...

 

GetObject()

Dereferences the iterator with an ordinary name for clarity in derived classes

Operators

Name Description

Public function Const

 

operator bool()

Conversion to "bool" returning true if the iterator is valid.

Public function Const

bool

 

operator!()

Conversion to "bool" returning true if the iterator is valid.

Public function Const

T *

 

operator*()

Iterator dereference

Public function

void

 

operator++()

Iterator advance

Public function Const

T *

 

operator->()

Iterator dereference

Enums

Name

Description

Public enum

EEndTagType

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss