UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
Field.h File Reference

Go to the source code of this file.

Classes

class  FFieldClass
 
class  FFieldVariant
 
class  FField
 

Macros

#define DECLARE_FIELD_NEW_IMPLEMENTATION(TClass)
 
#define UE_DEFINE_GET_FIELD_CLASS_PRIVATE
 
#define UE_DECLARE_FIELD_CLASS_STATIC_CONSTINIT
 
#define UE_DEFINE_FIELD_CLASS_STATIC_CONSTINIT(...)
 
#define DECLARE_FIELD(TClass, TSuperClass, TStaticFlags)    DECLARE_FIELD_API(TClass, TSuperClass, TStaticFlags, NO_API)
 
#define DECLARE_FIELD_API(TClass, TSuperClass, TStaticFlags, TRequiredAPI)
 
#define IMPLEMENT_FIELD_CONSTRUCT_IMPLEMENTATION(TClass)
 
#define IMPLEMENT_FIELD(TClass)
 

Functions

template<typename FieldType >
UE_FORCEINLINE_HINT FieldType * CastField (FField *Src)
 
template<typename FieldType >
UE_FORCEINLINE_HINT const FieldType * CastField (const FField *Src)
 
template<typename FieldType >
UE_FORCEINLINE_HINT FieldType * ExactCastField (FField *Src)
 
template<typename FieldType >
UE_FORCEINLINE_HINT FieldType * ExactCastField (const FField *Src)
 
template<typename FieldType >
FUNCTION_NON_NULL_RETURN_START FieldType * CastFieldChecked (FField *Src) FUNCTION_NON_NULL_RETURN_END
 
template<typename FieldType >
FUNCTION_NON_NULL_RETURN_START const FieldType * CastFieldChecked (const FField *Src) FUNCTION_NON_NULL_RETURN_END
 
template<typename FieldType >
FieldType * CastFieldCheckedNullAllowed (FField *Src)
 
template<typename FieldType >
const FieldType * CastFieldCheckedNullAllowed (const FField *Src)
 
template<typename FieldType >
void SerializeSingleField (FArchive &Ar, FieldType *&Field, FFieldVariant Owner)
 
FName GetFNameSafe (const FField *InField)
 
FString GetNameSafe (const FField *InField)
 
COREUOBJECT_API FString GetFullNameSafe (const FField *InField)
 
COREUOBJECT_API FString GetPathNameSafe (const FField *InField, const UObject *StopOuter=nullptr)
 
COREUOBJECT_API FFieldFindFPropertyByPath (const TCHAR *InFieldPath)
 
template<typename FieldType >
FieldType * FindFProperty (const TCHAR *InFieldPath)
 

Macro Definition Documentation

◆ DECLARE_FIELD

◆ DECLARE_FIELD_API

#define DECLARE_FIELD_API (   TClass,
  TSuperClass,
  TStaticFlags,
  TRequiredAPI 
)

◆ DECLARE_FIELD_NEW_IMPLEMENTATION

#define DECLARE_FIELD_NEW_IMPLEMENTATION (   TClass)
Value:
ThisClass* Mem = (ThisClass*)FMemory::Malloc(InSize); \
new (Mem) TClass(EC_InternalUseOnlyConstructor, TClass::StaticClass()); \
return Mem;
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127
@ EC_InternalUseOnlyConstructor
Definition ObjectMacros.h:175

◆ IMPLEMENT_FIELD

#define IMPLEMENT_FIELD (   TClass)
Value:
FField* TClass::Construct(const FFieldVariant& InOwner, const FName& InName, EObjectFlags InFlags) \
{ \
} \
FFieldClass* TClass::StaticClass() \
{ \
static FFieldClass StaticFieldClass(TEXT(PREPROCESSOR_TO_STRING(TClass)), TClass::StaticClassCastFlagsPrivate(), TClass::StaticClassCastFlags(), TClass::Super::StaticClass(), &TClass::Construct); \
return &StaticFieldClass; \
}
#define TEXT(x)
Definition Platform.h:1272
EObjectFlags
Definition ObjectMacros.h:552
#define PREPROCESSOR_TO_STRING(Token)
Definition PreprocessorHelpers.h:103
Definition Field.h:66
Definition Field.h:353
Definition Field.h:556
Definition NameTypes.h:617

◆ IMPLEMENT_FIELD_CONSTRUCT_IMPLEMENTATION

#define IMPLEMENT_FIELD_CONSTRUCT_IMPLEMENTATION (   TClass)
Value:

◆ UE_DECLARE_FIELD_CLASS_STATIC_CONSTINIT

#define UE_DECLARE_FIELD_CLASS_STATIC_CONSTINIT

◆ UE_DEFINE_FIELD_CLASS_STATIC_CONSTINIT

#define UE_DEFINE_FIELD_CLASS_STATIC_CONSTINIT (   ...)

◆ UE_DEFINE_GET_FIELD_CLASS_PRIVATE

#define UE_DEFINE_GET_FIELD_CLASS_PRIVATE

Function Documentation

◆ CastField() [1/2]

template<typename FieldType >
UE_FORCEINLINE_HINT const FieldType * CastField ( const FField Src)

◆ CastField() [2/2]

template<typename FieldType >
UE_FORCEINLINE_HINT FieldType * CastField ( FField Src)

◆ CastFieldChecked() [1/2]

template<typename FieldType >
FUNCTION_NON_NULL_RETURN_START const FieldType * CastFieldChecked ( const FField Src)
inline

◆ CastFieldChecked() [2/2]

template<typename FieldType >
FUNCTION_NON_NULL_RETURN_START FieldType * CastFieldChecked ( FField Src)
inline

◆ CastFieldCheckedNullAllowed() [1/2]

template<typename FieldType >
const FieldType * CastFieldCheckedNullAllowed ( const FField Src)
inline

◆ CastFieldCheckedNullAllowed() [2/2]

template<typename FieldType >
FieldType * CastFieldCheckedNullAllowed ( FField Src)
inline

◆ ExactCastField() [1/2]

template<typename FieldType >
UE_FORCEINLINE_HINT FieldType * ExactCastField ( const FField Src)

◆ ExactCastField() [2/2]

template<typename FieldType >
UE_FORCEINLINE_HINT FieldType * ExactCastField ( FField Src)

◆ FindFProperty()

template<typename FieldType >
FieldType * FindFProperty ( const TCHAR InFieldPath)
inline

Templated version of FindFieldByPath

◆ FindFPropertyByPath()

COREUOBJECT_API FField * FindFPropertyByPath ( const TCHAR InFieldPath)

Finds a field given a path to the field (Package.Class[:Subobject:...]:FieldName)

◆ GetFNameSafe()

FName GetFNameSafe ( const FField InField)
inline

Gets the name of the provided field. If the field pointer is null, the result is "none"

◆ GetFullNameSafe()

COREUOBJECT_API FString GetFullNameSafe ( const FField InField)

Gets the full name of the provided field. If the field pointer is null, the result is "none"

◆ GetNameSafe()

FString GetNameSafe ( const FField InField)
inline

Gets the name of the provided field. If the field pointer is null, the result is "none"

◆ GetPathNameSafe()

COREUOBJECT_API FString GetPathNameSafe ( const FField InField,
const UObject StopOuter = nullptr 
)

Gets the path name of the provided field. If the field pointer is null, the result is "none"

◆ SerializeSingleField()

template<typename FieldType >
void SerializeSingleField ( FArchive Ar,
FieldType *&  Field,
FFieldVariant  Owner 
)
inline

Helper function for serializing FField to an archive. This function fully serializes the field and its properties.