Navigation
API > API/Runtime > API/Runtime/CoreUObject
Iterator for arrays of UObject pointers
| Name | TObjectArrayIterator |
| Type | class |
| Header File | /Engine/Source/Runtime/CoreUObject/Public/UObject/UObjectGlobals.h |
| Include Path | #include "UObject/UObjectGlobals.h" |
Syntax
template<class TObjectClass>
class TObjectArrayIterator
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
TObjectArrayIterator
(
TArray< TObjectClass* >& InArray, |
Sample code TArray |
UObject/UObjectGlobals.h | |
TObjectArrayIterator
(
TArray< TObjectClass* >& InArray, |
UObject/UObjectGlobals.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Array | TArray< TObjectClass * > & | The array that we are iterating on | UObject/UObjectGlobals.h | |
| ClassToCheck | UClass * | Class using as a criteria | UObject/UObjectGlobals.h | |
| Flags | EFindObjectFlags | Flag to control the iteration | UObject/UObjectGlobals.h | |
| Index | int32 | Index of the current element in the object array | UObject/UObjectGlobals.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void RemoveCurrent () |
Removes the current element from the array, slower, but preserves the order. | UObject/UObjectGlobals.h | |
void RemoveCurrentSwap () |
Removes the current element from the array, faster, but does not preserves the array order. | UObject/UObjectGlobals.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool Advance() |
Iterator advance with ordinary name for clarity in subclasses | UObject/UObjectGlobals.h | |
TObjectClass * GetObject() |
Dereferences the iterator with an ordinary name for clarity in derived classes | UObject/UObjectGlobals.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Conversion to "bool" returning true if the iterator is valid. | UObject/UObjectGlobals.h | |
bool operator!() |
Inverse of the "bool" operator | UObject/UObjectGlobals.h | |
TObjectClass & operator*() |
Dereferences the iterator | UObject/UObjectGlobals.h | |
void operator++() |
Iterator advance | UObject/UObjectGlobals.h | |
TObjectClass * operator->() |
Dereferences the iterator | UObject/UObjectGlobals.h |