FVMReflection

[FVMReflection](API\Plugins\NetcodeUnitTest\FVMReflection)

Windows
MacOS
Linux

References

Module

NetcodeUnitTest

Header

/Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Public/NUTUtilReflection.h

Include

#include "NUTUtilReflection.h"

Syntax

class FVMReflection

Remarks

Constructors

Name Description

Public function

FVMReflection

(
    const FVMReflection& ToCopy
)

Copy constructor - used regularly to copy reflection states, but without passing on history or temporary variables (such as error return)

Public function

FVMReflection

(
    UObject* InBaseObject,
    EVMRefWarning InWarnLevel
)

UObject constructor - Initializing from a UObject

Public function

FVMReflection

(
    FStructOnScope& InStruct,
    EVMRefWarning InWarnLevel
)

Struct constructor - initializing from a scoped struct (allows you to use reflection, to work with unknown structs)

Public function

FVMReflection

(
    FFuncReflection& InFuncRefl,
    EVMRefWarning InWarnLevel
)

FFuncReflection copy constructor - initializing from a function reflection struct instance (shortcut to reference its parameters)

Functions

Name Description

Public function

void

 

DebugDump()

Does a complete debug dump of the state of this reflection instance, and disables further use

Public function

FORCEINLINEv...

 

DisableFieldVerification()

Disables the need to verify field types before accessing structs etc., to e.g. make use of the 'reflect' console command easier.

Public function

 

GENERIC_POINTER_CAST_ASSIGN

(
    FString
)

Public function

 

GENERIC_POINTER_CAST_ASSIGN

(
    FText
)

Public function

 

GENERIC_POINTER_CAST_ASSIGN

(
    FName
)

Declare generic pointer casts.

Public function Const

FORCEINLINEi...

 

GetArrayNum()

If pointing to an array, returns the array size.

Public function Const

FORCEINLINEF...

 

GetHistory()

Returns the reflection helper history as a string

Public function

InType

 

GetNumericTypeCast

(
    const TCHAR* InTypeStr,
    const TArray< FFieldClass* >&...
)

Public function

FORCEINLINE ...

 

GetStructRef()

Gets a reference to the struct being pointed to, with compile-time and runtime checks on the validity of the struct type NOTE: This alters the state of the reflection object.

Public function

InType

 

GetTypeCast

(
    const TCHAR* InTypeStr
)

Public function

TValueOrErro...

 

GetValueAsString()

Converts the value of whatever the reflection helper is pointing to, into a human readable string.

Public function Const

FORCEINLINEb...

 

IsError()

Returns the current error status

Public function

 

NUMERIC_CAST_ASSIGN

(
    int32
)

Public function

 

NUMERIC_CAST_ASSIGN

(
    double
)

Public function

 

NUMERIC_CAST_ASSIGN

(
    uint64
)

Public function

 

NUMERIC_CAST_ASSIGN

(
    uint16
)

Public function

 

NUMERIC_CAST_ASSIGN

(
    int64
)

Public function

 

NUMERIC_CAST_ASSIGN

(
    int16
)

Public function

 

NUMERIC_CAST_ASSIGN

(
    uint32
)

Public function

 

NUMERIC_CAST_ASSIGN_BASIC

(
    uint8
)

Declare readonly numeric casts.

Public function

 

NUMERIC_CAST_ASSIGN_BASIC

(
    float
)

Public function

 

NUMERIC_CAST_ASSIGN_BASIC

(
    int8
)

Public function

 

NUMERIC_POINTER_CAST_ASSIGN

(
    int16
)

Public function

 

NUMERIC_POINTER_CAST_ASSIGN

(
    int8
)

Public function

 

NUMERIC_POINTER_CAST_ASSIGN

(
    uint64
)

Public function

 

NUMERIC_POINTER_CAST_ASSIGN

(
    float
)

Public function

 

NUMERIC_POINTER_CAST_ASSIGN

(
    uint16
)

Public function

 

NUMERIC_POINTER_CAST_ASSIGN

(
    uint8
)

Declare numeric pointer casts.

Public function

 

NUMERIC_POINTER_CAST_ASSIGN

(
    int32
)

Public function

 

NUMERIC_POINTER_CAST_ASSIGN

(
    uint32
)

Public function

 

NUMERIC_POINTER_CAST_ASSIGN

(
    double
)

Public function

 

NUMERIC_POINTER_CAST_ASSIGN

(
    int64
)

Operators

Name Description

Public function

 

operator bool()

Cast to bool

Public function

 

operator FName()

Cast to FName

Public function

 

operator FScriptArray *()

Cast to FScriptArray* pointer (only valid for dynamic arrays), then cast to TArray NOTE: There is no FScriptArray** operator, as that should never be writable NOTE: Use the TSharedPtr operator, if you need to modify an array of uncertain/undefined type

Public function

 

operator FSoftObjectPtr *()

Cast to writable FSoftObjectPtr* (where write actions should be performed through FSoftObjectPrr methods, not by pointer assignment).

Public function

 

operator FString()

Cast to FString

Public function

 

operator FText()

Cast to FText

Public function

 

operator TSharedPtr< FScriptArrayHelper >()

Cast to an FScriptArrayHelper, which is useful for performing operations on arrays of an uncertain/undefined type NOTE: Useful specifically in cases where you need to add to an array, less so for array iteration.

Public function

 

operator UObject *()

Cast to UObject*

Public function

 

operator UObject **()

Cast to writable UObject* pointer (only valid for object properties)

Public function

 

operator void *()

Cast operator for structs in general - cast to void*, then cast to StructType*

Public function

FVMReflectio...

 

operator,

(
    bool* bErrorPointer
)

Allows an inline method of returning the error status - the comma operator has the lowest precedence, so is executed last.

Public function

FVMReflectio...

 

operator,

(
    FString* OutHistory
)

As above, but returns the complete reflection history so far, including any errors

Public function

FVMReflectio...

 

operator[]

(
    int32 ArrayElement
)

Array subscript operator, used to access static/dynamic array elements

Public function

FVMReflectio...

 

operator[]

(
    const ANSICHAR* InFieldType
)

Array subscript operator, which takes a string for verifying that an array is of a particular type, e.g. ["uint8"].

Public function

FVMReflectio...

 

operator=

(
    bool Value
)

Special assignment operators Assign a value to a bool property

Public function

FVMReflectio...

 

operator=

(
    UObject* Value
)

Assign a value to an object property

Public function

FVMReflectio...

 

operator=

(
    TCHAR* Value
)

Assign a value to either a string or an enum property (autodetects enums) NOTE: Enums must be specified in format: EEnumName::EnumValueName

Public function

FVMReflectio...

 

operator->*

(
    FString PropertyName
)

Member access operator. Used to access object/struct properties.

Public function

FORCEINLINEF...

 

operator->*

(
    const ANSICHAR* PropertyName
)

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