TObjectArrayIterator

Iterator for arrays of [UObject](API\Runtime\CoreUObject\UObject\UObject) pointers

Windows
MacOS
Linux

References

Module

CoreUObject

Header

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

Include

#include "UObject/UObjectGlobals.h"

Syntax

template<class TObjectClass>
class TObjectArrayIterator

Remarks

Iterator for arrays of UObject pointers

Constructors

Name Description

Public function

TObjectArrayIterator

(
    TArray< TObjectClass* >& InAr...,
    UClass* InClassToCheck,
    bool InbExactClass
)

Sample code TArray TestPawns; ...

Functions

Name Description

Protected function

bool

 

Advance()

Iterator advance with ordinary name for clarity in subclasses

Protected function Const

TObjectClass...

 

GetObject()

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

Public function

void

 

RemoveCurrent()

Removes the current element from the array, slower, but preserves the order.

Public function

void

 

RemoveCurrentSwap()

Removes the current element from the array, faster, but does not preserves the array order.

Operators

Name Description

Public function Const

 

operator bool()

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

Public function Const

bool

 

operator!()

Inverse of the "bool" operator

Public function Const

TObjectClass...

 

operator*()

Dereferences the iterator

Public function

void

 

operator++()

Iterator advance

Public function Const

TObjectClass...

 

operator->()

Dereferences the iterator

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