FProperty

An UnrealScript variable.

Inheritance Hierarchy

References

Module

CoreUObject

Header

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

Include

#include "UObject/UnrealType.h"

Syntax

class FProperty : public FField

Remarks

An UnrealScript variable.

Variables

Name Description

Public variable

int32

 

ArrayDim

Persistent variables.

Public variable

FProperty *

 

DestructorLinkNext

In memory only: Linked list of properties requiring destruction.

Public variable

int32

 

ElementSize

Public variable

FProperty *

 

NextRef

In memory only: Linked list of object reference properties from most-derived to base

Public variable

FProperty *

 

PostConstructLinkNext

In memory only: Linked list of properties requiring post constructor initialization.

Public variable

EPropertyFlags

 

PropertyFlags

Public variable

FProperty *

 

PropertyLinkNext

In memory only: Linked list of properties from most-derived to base

Public variable

uint16

 

RepIndex

Public variable

FName

 

RepNotifyFunc

Constructors

Name Description

Public function

FProperty

(
    UField* InField
)

Public function

FProperty

(
    EInternal InInernal,
    FFieldClass* InClass
)

Public function

FProperty

(
    FFieldVariant InOwner,
    const FName& InName,
    EObjectFlags InObjectFlags
)

Constructors.

Public function

FProperty

(
    FFieldVariant InOwner,
    const UECodeGen_Private::FPropertyP...,
    EPropertyFlags AdditionalPropertyFl...
)

Constructor used for constructing compiled-in properties

Public function

FProperty

(
    FFieldVariant InOwner,
    const UECodeGen_Private::FPropertyP...,
    EPropertyFlags AdditionalPropertyFl...
)

Constructor used for constructing compiled-in properties

Public function

FProperty

(
    FFieldVariant InOwner,
    const FName& InName,
    EObjectFlags InObjectFlags,
    int32 InOffset,
    EPropertyFlags InFlags
)

Compiled-in property constructor is deprecated, use other constructors instead.

Functions

Name Description

Public function Const

void *

 

AllocateAndInitializeValue()

Allocates and initializes memory to hold a value this property represents

Public function Virtual Const

void

 

AppendSchemaHash

(
    FBlake3& Builder,
    bool bSkipEditorOnly
)

Updates the given HashBuilder with name and type information of this Property.

Public function Virtual Const

void

 

CallGetter

(
    const void* Container,
    void* OutValue
)

Calls the native getter function for this property

Public function Virtual Const

void

 

CallSetter

(
    void* Container,
    const void* InValue
)

Calls the native setter function for this property

Public function

void

 

ClearPropertyFlags

(
    EPropertyFlags NewFlags
)

Public function Const

void

 

ClearValue

(
    void* Data
)

Zeros the value for this property.

Public function Const

void

 

ClearValue_InContainer

(
    void* Data,
    int32 ArrayIndex
)

Zeros the value for this property.

Protected function Virtual Const

void

 

ClearValueInternal

(
    void* Data
)

Public function Static

FField *

 

Construct

(
    const FFieldVariant& InOwner,
    const FName& InName,
    EObjectFlags InObjectFlags
)

Public function Const

ValueType co...

 

ContainerPtrToValuePtr

(
    UObject const* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

ValueType co...

 

ContainerPtrToValuePtr

(
    void const* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

ValueType &#...

 

ContainerPtrToValuePtr

(
    void* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

ValueType &#...

 

ContainerPtrToValuePtr

(
    UObject* ContainerPtr,
    int32 ArrayIndex
)

Get the pointer to property value in a supplied 'container'.

Public function Const

ValueType &#...

 

ContainerPtrToValuePtrForDefaults

(
    UStruct* ContainerClass,
    UObject* ContainerPtr,
    int32 ArrayIndex
)

Default variants, these accept and return NULL, and also check the property against the size of the container.

Public function Const

ValueType &#...

 

ContainerPtrToValuePtrForDefaults

(
    UStruct* ContainerClass,
    void* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

ValueType co...

 

ContainerPtrToValuePtrForDefaults

(
    UStruct* ContainerClass,
    UObject const* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

ValueType co...

 

ContainerPtrToValuePtrForDefaults

(
    UStruct* ContainerClass,
    void const* ContainerPtr,
    int32 ArrayIndex
)

Public function Const

bool

 

ContainsInstancedObjectProperty()

Returns true if this property, or in the case of e.g. array or struct properties any sub- property, contains a UObject reference that is marked CPF_NeedCtorLink (i.e. instanced keyword).

Public function Virtual Const

bool

 

ContainsObjectReference

(
    TArray< const FStructProperty*...,
    EPropertyObjectReferenceType InRefe...
)

Returns true if this property, or in the case of e.g. array or struct properties any sub- property, contains a UObject reference.

Public function Const

bool

 

ContainsWeakObjectReference()

Returns true if this property, or in the case of e.g. array or struct properties any sub- property, contains a weak UObject reference.

Public function Virtual

EConvertFrom...

 

ConvertFromType

(
    const FPropertyTag& Tag,
    FStructuredArchive::FSlot Slot,
    uint8* Data,
    UStruct* DefaultsStruct,
    const uint8* Defaults
)

Allows a property to implement backwards compatibility handling for tagged properties

Public function Const

void

 

CopyCompleteValue

(
    void* Dest,
    void const* Src
)

Copy the value for all elements of this property.

Public function Const

void

 

CopyCompleteValue_InContainer

(
    void* Dest,
    void const* Src
)

Public function Virtual Const

void

 

CopyCompleteValueFromScriptVM

(
    void* Dest,
    void const* Src
)

Copy the value for all elements of this property. From the script VM.

Public function Virtual Const

void

 

CopyCompleteValueFromScriptVM_InContainer

(
    void* OutContainer,
    void const* InValue
)

Public function Virtual Const

void

 

CopyCompleteValueToScriptVM

(
    void* Dest,
    void const* Src
)

Copy the value for all elements of this property. To the script VM.

Public function Virtual Const

void

 

CopyCompleteValueToScriptVM_InContainer

(
    void* OutValue,
    void const* InContainer
)

Equivalent to the above functions, but using the container and aware of getters/setters when the container has them.

Public function Const

void

 

CopySingleValue

(
    void* Dest,
    void const* Src
)

Copy the value for a single element of this property.

Public function Virtual Const

void

 

CopySingleValueFromScriptVM

(
    void* Dest,
    void const* Src
)

Copy the value for a single element of this property. From the script VM.

Public function Virtual Const

void

 

CopySingleValueToScriptVM

(
    void* Dest,
    void const* Src
)

Copy the value for a single element of this property. To the script VM.

Protected function Virtual Const

void

 

CopyValuesInternal

(
    void* Dest,
    void const* Src,
    int32 Count
)

Public function Const

void

 

DestroyAndFreeValue

(
    void* InMemory
)

Destroys and frees memory with a value this property represents

Public function Const

void

 

DestroyValue

(
    void* Dest
)

Destroys the value for this property.

Public function Const

void

 

DestroyValue_InContainer

(
    void* Dest
)

Destroys the value for this property.

Protected function Virtual Const

void

 

DestroyValueInternal

(
    void* Dest
)

Public function Virtual

void

 

EmitReferenceInfo

(
    UE::GC::FSchemaBuilder& Schema,
    int32 BaseOffset,
    TArray< const FStructProperty*...,
    UE::GC::FPropertyStack& DebugPath
)

Emits tokens used by realtime garbage collection code to passed in ReferenceTokenStream.

Public function Const

void

 

ExportCppDeclaration

(
    FOutputDevice& Out,
    EExportedDeclaration::Type Declarat...,
    const TCHAR* ArrayDimOverride,
    uint32 AdditionalExportCPPFlags,
    bool bSkipParameterName,
    const FString* ActualCppType,
    const FString* ActualExtendedT...,
    const FString* ActualParameter...
)

Public function Const

bool

 

ExportText_Direct

(
    FString& ValueStr,
    const void* Data,
    const void* Delta,
    UObject* Parent,
    int32 PortFlags,
    UObject* ExportRootScope
)

Public function Const

bool

 

ExportText_InContainer

(
    int32 Index,
    FString& ValueStr,
    const void* Data,
    const void* Delta,
    UObject* Parent,
    int32 PortFlags,
    UObject* ExportRootScope
)

Protected function Virtual Const

void

 

ExportText_Internal

(
    FString& ValueStr,
    const void* PropertyValueOrCon...,
    EPropertyPointerType PointerType,
    const void* DefaultValue,
    UObject* Parent,
    int32 PortFlags,
    UObject* ExportRootScope
)

Public function Const

void

 

ExportTextItem_Direct

(
    FString& ValueStr,
    const void* PropertyValue,
    const void* DefaultValue,
    UObject* Parent,
    int32 PortFlags,
    UObject* ExportRootScope
)

Public function Const

void

 

ExportTextItem_InContainer

(
    FString& ValueStr,
    const void* Container,
    const void* DefaultValue,
    UObject* Parent,
    int32 PortFlags,
    UObject* ExportRootScope
)

Public function Static

FName

 

FindRedirectedPropertyName

(
    UStruct* ObjectStruct,
    FName OldName
)

Gets a redirected property name, will return NAME_None if no redirection was found

Public function Const

ELifetimeCon...

 

GetBlueprintReplicationCondition()

Public function Virtual Const

FString

 

GetCPPMacroType

(
    FString& ExtendedTypeText
)

Public function Virtual Const

FString

 

GetCPPType

(
    FString* ExtendedTypeText,
    uint32 CPPExportFlags
)

Returns the text to use for exporting this property to header file.

Public function Virtual Const

FString

 

GetCPPTypeForwardDeclaration()

Public function Virtual Const

FName

 

GetID()

Public function Virtual Const

int32

 

GetMinAlignment()

Public function Const

FString

 

GetNameCPP()

Returns the C++ name of the property, including the _DEPRECATED suffix if the property is deprecated.

Public function Const

int32

 

GetOffset_ForDebug()

Return offset of property from container base.

Public function Const

int32

 

GetOffset_ForGC()

Return offset of property from container base.

Public function Const

int32

 

GetOffset_ForInternal()

Return offset of property from container base.

Public function Const

int32

 

GetOffset_ForUFunction()

Return offset of property from container base.

Public function Const

int32

 

GetOffset_ReplaceWith_ContainerPtrToValuePtr()

Return offset of property from container base.

Public function Const

const FPrope...

 

GetOwnerProperty()

Public function

FProperty &#...

 

GetOwnerProperty()

Returns the first FProperty in this property's Outer chain that does not have a FProperty for an Outer

Public function Const

EPropertyFla...

 

GetPropertyFlags()

Returns this property's propertyflags

Public function

FProperty &#...

 

GetRepOwner()

Returns the replication owner, which is the property itself, or NULL if this isn't important for replication.

Public function Const

void

 

GetSingleValue_InContainer

(
    const void* InContainer,
    void* OutValue,
    int32 ArrayIndex
)

Copies a single value to OutValue even if the property represents a static array of values

Public function Const

int32

 

GetSize()

: Surely this can have an int32 overflow.

Public function

UPropertyWra...

 

GetUPropertyWrapper()

Gets the wrapper object for this property or creates one if it doesn't exist yet

Public function Const

void

 

GetValue_InContainer

(
    void const* InContainer,
    void* OutValue
)

Public function Virtual Const

void *

 

GetValueAddressAtIndex_Direct

(
    const FProperty* Inner,
    void* InValueAddress,
    int32 Index
)

Gets value address at given index inside of a static array or container

Public function Const

uint32

 

GetValueTypeHash

(
    const void* Src
)

Returns the hash value for an element of this property.

Protected function Virtual Const

uint32

 

GetValueTypeHashInternal

(
    const void* Src
)

Public function Const

bool

 

HasAllPropertyFlags

(
    uint64 FlagsToCheck
)

Used to safely check whether all of the passed in flags are set.

Public function Const

bool

 

HasAnyPropertyFlags

(
    uint64 FlagsToCheck
)

Used to safely check whether any of the passed in flags are set.

Public function Virtual Const

bool

 

HasGetter()

Checks if this property as a native getter function

Public function Virtual Const

bool

 

HasSetter()

Checks if this property as a native setter function

Public function Virtual Const

bool

 

HasSetterOrGetter()

Checks if this property as a native setter or getter function

Public function Virtual Const

bool

 

Identical

(
    const void* A,
    const void* B,
    uint32 PortFlags
)

Determines whether the property values are identical.

Public function Const

bool

 

Identical_InContainer

(
    const void* A,
    const void* B,
    int32 ArrayIndex,
    uint32 PortFlags
)

Determines whether the property values are identical.

Public function Static

const TCHAR ...

 

ImportSingleProperty

(
    const TCHAR* Str,
    void* DestData,
    UStruct* ObjectStruct,
    UObject* SubobjectOuter,
    int32 PortFlags,
    FOutputDevice* Warn,
    TArray< struct FDefinedProperty >&...
)

Parses and imports a text definition of a single property's value (if array, may be an individual element) also includes parsing of special operations for array properties (Add/Remove/RemoveIndex/Empty)

Public function Const

const TCHAR ...

 

ImportText_Direct

(
    const TCHAR* Buffer,
    void* PropertyPtr,
    UObject* OwnerObject,
    int32 PortFlags,
    FOutputDevice* ErrorText
)

Import a text value

Public function Const

const TCHAR ...

 

ImportText_InContainer

(
    const TCHAR* Buffer,
    void* Container,
    UObject* OwnerObject,
    int32 PortFlags,
    FOutputDevice* ErrorText
)

Import a text value

Protected function Virtual Const

const TCHAR ...

 

ImportText_Internal

(
    const TCHAR* Buffer,
    void* ContainerOrPropertyPtr,
    EPropertyPointerType PointerType,
    UObject* OwnerObject,
    int32 PortFlags,
    FOutputDevice* ErrorText
)

Protected function

void

 

Init()

Initializes internal state.

Public function Const

void

 

InitializeValue

(
    void* Dest
)

Zeros, copies from the default, or calls the constructor for on the value for this property.

Public function Const

void

 

InitializeValue_InContainer

(
    void* Dest
)

Zeros, copies from the default, or calls the constructor for on the value for this property.

Protected function Virtual Const

void

 

InitializeValueInternal

(
    void* Dest
)

Public function Virtual

void

 

InstanceSubobjects

(
    void* Data,
    void const* DefaultData,
    UObject* Owner,
    FObjectInstancingGraph* Instan...
)

Creates new copies of components

Public function Const

bool

 

IsEditorOnlyProperty()

Editor-only properties are those that only are used with the editor is present or cannot be removed from serialisation.

Public function Const

bool

 

IsInContainer

(
    int32 ContainerSize
)

See if the offset of this property is below the supplied container size

Public function Const

bool

 

IsInContainer

(
    UStruct* ContainerClass
)

See if the offset of this property is below the supplied container size

Public function

int32

 

Link

(
    FArchive& Ar
)

Protected function Virtual

void

 

LinkInternal

(
    FArchive& Ar
)

Public function

void

 

LinkWithoutChangingOffset

(
    FArchive& Ar
)

Public function Virtual Const

bool

 

NetSerializeItem

(
    FArchive& Ar,
    UPackageMap* Map,
    void* Data,
    TArray< uint8 >* MetaData
)

Public function Virtual Const

bool

 

PassCPPArgsByRef()

Public function Const

void

 

PerformOperationWithGetter

(
    void* OutContainer,
    const void* DirectPropertyAddr...,
    TFunctionRef< void(const void*...
)

Helper function for getting container / struct property value and performing operation directly on the value memory

Public function Const

void

 

PerformOperationWithSetter

(
    void* OutContainer,
    void* DirectPropertyAddress,
    TFunctionRef< void(void*)> Dir...
)

Helper function for setting container / struct property value and performing operation directly on the value memory

Protected function Const

void *

 

PointerToValuePtr

(
    void const* ContainerOrPropert...,
    EPropertyPointerType PropertyPointe...,
    int32 ArrayIndex
)

Public function Virtual Const

bool

 

SameType

(
    const FProperty* Other
)

Returns true, if Other is property of exactly the same type

Public function

void

 

SerializeBinProperty

(
    FStructuredArchive::FSlot Slot,
    void* Data,
    int32 ArrayIdx
)

Serializes the property with the struct's data residing in Data.

Public function Virtual Const

void

 

SerializeItem

(
    FStructuredArchive::FSlot Slot,
    void* Value,
    void const* Defaults
)

Public function

void

 

SerializeNonMatchingBinProperty

(
    FStructuredArchive::FSlot Slot,
    void* Data,
    void const* DefaultData,
    UStruct* DefaultStruct
)

Serializes the property with the struct's data residing in Data, unless it matches the default

Public function

void

 

SetBlueprintReplicationCondition

(
    ELifetimeCondition InBlueprintRepli...
)

Protected function

void

 

SetOffset_Internal

(
    int32 NewOffset
)

Set the alignment offset for this property - added for FMapProperty

Public function

void

 

SetPropertyFlags

(
    EPropertyFlags NewFlags
)

Public function Const

void

 

SetSingleValue_InContainer

(
    void* OutContainer,
    const void* InValue,
    int32 ArrayIndex
)

Copies a single value to the property even if the property represents a static array of values

Public function Const

void

 

SetValue_InContainer

(
    void* OutContainer,
    const void* InValue
)

Public function Const

bool

 

ShouldDuplicateValue()

Determines whether this property value is eligible for copying when duplicating an object

Public function Const

bool

 

ShouldPort

(
    uint32 PortFlags
)

Public function Const

bool

 

ShouldSerializeValue

(
    FArchive& Ar
)

Public function Static

COREUOBJECT_...

 

StaticClass()

Public function Static

constexpr ui...

 

StaticClassCastFlags()

Public function Static

constexpr ui...

 

StaticClassCastFlagsPrivate()

Public function Virtual Const

bool

 

SupportsNetSharedSerialization()

Public function Const

bool

 

ValidateImportFlags

(
    uint32 PortFlags,
    FOutputDevice* ErrorText
)

Verify that modifying this property's value via ImportText is allowed.

Overridden from FField

Name Description

Public function Virtual

void

 

PostDuplicate

(
    const FField& InField
)

Fixups after duplicating a Field

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Begin UObject interface: the following functions mimic UObject interface for easier transition from UProperties to FProperties.

Operators

Name Description

Public function

void

 

operator delete

(
    void* InMem
)

Public function

void *

 

operator new

(
    const size_t InSize
)

Public function

void *

 

operator new

(
    const size_t InSize,
    void* InMem
)

Typedefs

Name

Description

Super

ThisClass

Deprecated Functions

Name Description

Public function Virtual Const

void

 

ExportTextItem

(
    FString& ValueStr,
    const void* PropertyValue,
    const void* DefaultValue,
    UObject* Parent,
    int32 PortFlags,
    UObject* ExportRootScope
)

Please use ExportTextItem_InContainer or ExportTextItem_Direct instead.

Public function

 

FProperty

(
    FFieldVariant InOwner,
    const FName& InName,
    EObjectFlags InObjectFlags,
    int32 InOffset,
    EPropertyFlags InFlags
)

Compiled-in property constructor is deprecated, use other constructors instead.

Public function Const

const TCHAR ...

 

ImportText

(
    const TCHAR* Buffer,
    void* Data,
    int32 PortFlags,
    UObject* OwnerObject,
    FOutputDevice* ErrorText
)

ImportText that takes a direct property pointer is deprecated. Please use ImportText_Direct or ImportText_InContainer instead.

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