UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
TObjectIteratorBase< IteratorThreadSafety > Class Template Reference

#include <UObjectIterator.h>

+ Inheritance diagram for TObjectIteratorBase< IteratorThreadSafety >:

Public Member Functions

 TObjectIteratorBase (UClass *InClass=UObject::StaticClass(), bool bOnlyGCedObjects=false, EObjectFlags AdditionalExclusionFlags=RF_NoFlags, EInternalObjectFlags InInternalExclusionFlags=EInternalObjectFlags::None)
 
 TObjectIteratorBase (FUObjectArray::TIterator::EEndTagType, const TObjectIteratorBase &Begin)
 
 TObjectIteratorBase (const TObjectIteratorBase &Other)
 
 ~TObjectIteratorBase ()
 
void operator++ ()
 
UObjectoperator* () const
 
UObjectoperator-> () const
 
- Public Member Functions inherited from FUObjectArray::TIterator
 TIterator (const FUObjectArray &InArray, bool bOnlyGCedObjects=false)
 
 TIterator (EEndTagType, const TIterator &InIter)
 
UE_FORCEINLINE_HINT void operator++ ()
 
bool operator== (const TIterator &Rhs) const
 
bool operator!= (const TIterator &Rhs) const
 
UE_FORCEINLINE_HINT operator bool () const
 
UE_FORCEINLINE_HINT bool operator! () const
 
UE_FORCEINLINE_HINT int32 GetIndex () const
 

Protected Member Functions

bool AdvanceIterator ()
 
- Protected Member Functions inherited from FUObjectArray::TIterator
UE_FORCEINLINE_HINT FUObjectItemGetObject () const
 
bool Advance ()
 
const FUObjectArrayGetIteratedArray () const
 

Protected Attributes

EObjectFlags ExclusionFlags
 
EInternalObjectFlags InternalExclusionFlags
 

Additional Inherited Members

- Public Types inherited from FUObjectArray::TIterator
enum  EEndTagType { EndTag }
 

Detailed Description

template<EObjectIteratorThreadSafetyOptions IteratorThreadSafety>
class TObjectIteratorBase< IteratorThreadSafety >

Class for iterating through all objects, including class default objects. Note that when Playing In Editor, this will find objects in the editor as well as the PIE world, in an indeterminate order. IteratorThreadSafety template parameter manages how this class handles thread safety of UObject iteration.

Constructor & Destructor Documentation

◆ TObjectIteratorBase() [1/3]

template<EObjectIteratorThreadSafetyOptions IteratorThreadSafety>
TObjectIteratorBase< IteratorThreadSafety >::TObjectIteratorBase ( UClass InClass = UObject::StaticClass(),
bool  bOnlyGCedObjects = false,
EObjectFlags  AdditionalExclusionFlags = RF_NoFlags,
EInternalObjectFlags  InInternalExclusionFlags = EInternalObjectFlags::None 
)
inlineexplicit

Constructor

Parameters
InClassreturn only object of the class or a subclass
bOnlyGCedObjectsif true, skip all of the permanent objects
AdditionalExclusionFlagsRF_* flags that should not be included in results
InInternalExclusionFlagsEInternalObjectFlags flagged objects that should not be included in results

◆ TObjectIteratorBase() [2/3]

template<EObjectIteratorThreadSafetyOptions IteratorThreadSafety>
TObjectIteratorBase< IteratorThreadSafety >::TObjectIteratorBase ( FUObjectArray::TIterator::EEndTagType  ,
const TObjectIteratorBase< IteratorThreadSafety > &  Begin 
)
inline

Constructor

Parameters
BeginThe iterator to get the end iterator of.

◆ TObjectIteratorBase() [3/3]

◆ ~TObjectIteratorBase()

Destructor

Member Function Documentation

◆ AdvanceIterator()

template<EObjectIteratorThreadSafetyOptions IteratorThreadSafety>
bool TObjectIteratorBase< IteratorThreadSafety >::AdvanceIterator ( )
inlineprotected

Wrapper around FUObjectArray::TIterator::Advance that locks the FUObjectArray mutex before advancing if necessary

◆ operator*()

template<EObjectIteratorThreadSafetyOptions IteratorThreadSafety>
UObject * TObjectIteratorBase< IteratorThreadSafety >::operator* ( ) const
inline

Iterator dereference

Returns
the object pointer pointed at by the iterator

◆ operator++()

template<EObjectIteratorThreadSafetyOptions IteratorThreadSafety>
void TObjectIteratorBase< IteratorThreadSafety >::operator++ ( )
inline

Iterator advance

◆ operator->()

template<EObjectIteratorThreadSafetyOptions IteratorThreadSafety>
UObject * TObjectIteratorBase< IteratorThreadSafety >::operator-> ( ) const
inline

Iterator dereference

Returns
the object pointer pointed at by the iterator

Member Data Documentation

◆ ExclusionFlags

template<EObjectIteratorThreadSafetyOptions IteratorThreadSafety>
EObjectFlags TObjectIteratorBase< IteratorThreadSafety >::ExclusionFlags
protected

Flags that returned objects must not have

◆ InternalExclusionFlags

template<EObjectIteratorThreadSafetyOptions IteratorThreadSafety>
EInternalObjectFlags TObjectIteratorBase< IteratorThreadSafety >::InternalExclusionFlags
protected

Internal Flags that returned objects must not have


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