UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FPropertyValueIterator Class Reference

#include <UnrealType.h>

+ Inheritance diagram for FPropertyValueIterator:

Public Types

using BasePairType = TPair< const FProperty *, const void * >
 

Public Member Functions

COREUOBJECT_API FPropertyValueIterator (FFieldClass *InPropertyClass, const UStruct *InStruct, const void *InStructValue, EPropertyValueIteratorFlags InRecursionFlags=EPropertyValueIteratorFlags::FullRecursion, EFieldIteratorFlags::DeprecatedPropertyFlags InDeprecatedPropertyFlags=EFieldIteratorFlags::IncludeDeprecated)
 
 FPropertyValueIterator ()
 
 operator bool () const
 
UE_FORCEINLINE_HINT bool operator== (const FPropertyValueIterator &Rhs) const
 
UE_FORCEINLINE_HINT bool operator!= (const FPropertyValueIterator &Rhs) const
 
const BasePairTypeoperator* () const
 
const BasePairTypeoperator-> () const
 
UE_FORCEINLINE_HINT const FPropertyKey () const
 
UE_FORCEINLINE_HINT const voidValue () const
 
UE_FORCEINLINE_HINT void operator++ ()
 
UE_FORCEINLINE_HINT void SkipRecursiveProperty ()
 
COREUOBJECT_API void GetPropertyChain (TArray< const FProperty * > &PropertyChain) const
 
COREUOBJECT_API FString GetPropertyPathDebugString () const
 

Detailed Description

For recursively iterating over a UStruct to find nested FProperty pointers and values

Member Typedef Documentation

◆ BasePairType

Constructor & Destructor Documentation

◆ FPropertyValueIterator() [1/2]

FPropertyValueIterator::FPropertyValueIterator ( FFieldClass InPropertyClass,
const UStruct InStruct,
const void InStructValue,
EPropertyValueIteratorFlags  InRecursionFlags = EPropertyValueIteratorFlags::FullRecursion,
EFieldIteratorFlags::DeprecatedPropertyFlags  InDeprecatedPropertyFlags = EFieldIteratorFlags::IncludeDeprecated 
)
explicit

Construct an iterator using a struct and struct value

Parameters
InPropertyClassThe UClass of the FProperty type you are looking for
InStructThe UClass or UScriptStruct containing properties to search for
InStructValueAddress in memory of struct to search for property values
InRecursionFlagsRather to recurse into container and struct properties
InDeprecatedPropertyFlagsRather to iterate over deprecated properties

◆ FPropertyValueIterator() [2/2]

FPropertyValueIterator::FPropertyValueIterator ( )
inline

Invalid iterator, start with empty stack

Member Function Documentation

◆ GetPropertyChain()

void FPropertyValueIterator::GetPropertyChain ( TArray< const FProperty * > &  PropertyChain) const

Returns the full stack of properties for the property currently being iterated. This includes struct and container properties

Parameters
PropertyChainFilled in with ordered list of Properties, with currently active property first and top parent last

◆ GetPropertyPathDebugString()

FString FPropertyValueIterator::GetPropertyPathDebugString ( ) const

Returns a string of the property chain in a form that makes reading it easy. The format may change over time, do not depend on this being in a specific Unreal path format. It's primary intention is to aid in debugging and in reporting paths to the end developer in an editor environment.

Now for the implementation details, normally paths involving an array, will do things like print the array name twice, since an array in the path is actually 2 properties, one for the array and another for the index. Maps are similar. The end result is stuff like seeing, ActionsArray.ActionsArray.ActionIfo.ActionPower.

What this function does is tries to make this stuff a lot more human readable, by printing, ActionsArray[3].ActionIfo.ActionPower, so that you know the index it comes from. Similarly Maps would print ActionMap["Action Name"].ActionIfo.ActionPower, so that you know the index it comes from. Similarly Maps would print

◆ Key()

UE_FORCEINLINE_HINT const FProperty * FPropertyValueIterator::Key ( ) const
inline

Returns Property currently being iterated

◆ operator bool()

FPropertyValueIterator::operator bool ( ) const
inlineexplicit

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

◆ operator!=()

UE_FORCEINLINE_HINT bool FPropertyValueIterator::operator!= ( const FPropertyValueIterator Rhs) const
inline

◆ operator*()

const BasePairType & FPropertyValueIterator::operator* ( ) const
inline

Returns a TPair containing Property/Value currently being iterated

◆ operator++()

UE_FORCEINLINE_HINT void FPropertyValueIterator::operator++ ( )
inline

Increments iterator

◆ operator->()

const BasePairType * FPropertyValueIterator::operator-> ( ) const
inline

◆ operator==()

UE_FORCEINLINE_HINT bool FPropertyValueIterator::operator== ( const FPropertyValueIterator Rhs) const
inline

◆ SkipRecursiveProperty()

UE_FORCEINLINE_HINT void FPropertyValueIterator::SkipRecursiveProperty ( )
inline

Call when iterating a recursive property such as Array or Struct to stop it from iterating into that property

◆ Value()

UE_FORCEINLINE_HINT const void * FPropertyValueIterator::Value ( ) const
inline

Returns memory address currently being iterated


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