Navigation
API > API/Plugins > API/Plugins/NetcodeUnitTest
| Name | FVMReflection |
| Type | class |
| Header File | /Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Public/NUTUtilReflection.h |
| Include Path | #include "NUTUtilReflection.h" |
Syntax
class FVMReflection
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FVMReflection
(
UObject* InBaseObject, |
UObject constructor - Initializing from a UObject | NUTUtilReflection.h | |
FVMReflection
(
FStructOnScope& InStruct, |
Struct constructor - initializing from a scoped struct (allows you to use reflection, to work with unknown structs) | NUTUtilReflection.h | |
FVMReflection
(
FFuncReflection& InFuncRefl, |
FFuncReflection copy constructor - initializing from a function reflection struct instance (shortcut to reference its parameters) | NUTUtilReflection.h | |
FVMReflection
(
const FVMReflection& ToCopy |
Copy constructor - used regularly to copy reflection states, but without passing on history or temporary variables (such as error return) | NUTUtilReflection.h | |
| Private base constructor - should never be used externally | NUTUtilReflection.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| BaseAddress | void * | The current base object (or struct) address location | NUTUtilReflection.h | |
| bIsError | bool | Whether or not there was an error during reflection | NUTUtilReflection.h | |
| bNextActionMustBeCast | bool | The ->* operator tried to step into an object/struct which was NULL. | NUTUtilReflection.h | |
| bOutError | bool * | Holds a temporary pointer, for outputting errors - regularly reset to NULL, to avoid potential invalid memory access | NUTUtilReflection.h | |
| bSetArrayElement | bool | Whether or not the array element has been set, for an array | NUTUtilReflection.h | |
| bSkipFieldVerification | bool | Whether or not to skip field verification (e.g. when using the 'reflect' console command) | NUTUtilReflection.h | |
| bVerifiedFieldType | bool | Whether or not the array or struct type has been specified for verification | NUTUtilReflection.h | |
| FieldAddress | void * | The address of the current field - OR, if bSetArrayElement - the address of the current array element | NUTUtilReflection.h | |
| FieldInstance | FFieldVariant | The current field instance (e.g. a UPROPERTY within AActor or such) | NUTUtilReflection.h | |
| History | TArray< FString > | The history of reflection operations | NUTUtilReflection.h | |
| NextActionError | FString | Tied with 'bNextActionMustBeCast', this is the error that will be logged if an action other than cast is tried. | NUTUtilReflection.h | |
| OutHistoryPtr | FString * | Holds a temporary pointer, for outputting error history - regularly reset to NULL, like bOutError | NUTUtilReflection.h | |
| WarnLevel | EVMRefWarning | Controls whether or not errors are printed to log | NUTUtilReflection.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void DebugDump() |
Does a complete debug dump of the state of this reflection instance, and disables further use | NUTUtilReflection.h | |
void DisableFieldVerification() |
Disables the need to verify field types before accessing structs etc., to e.g. make use of the 'reflect' console command easier. | NUTUtilReflection.h | |
int32 GetArrayNum () |
If pointing to an array, returns the array size. | NUTUtilReflection.h | |
FString GetHistory() |
Returns the reflection helper history as a string | NUTUtilReflection.h | |
T * 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. | NUTUtilReflection.h | |
TValueOrError< FString, FString > GetValueAsString() |
Converts the value of whatever the reflection helper is pointing to, into a human readable string. | NUTUtilReflection.h | |
bool IsError() |
Returns the current error status | NUTUtilReflection.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
operator bool() |
Cast to bool | NUTUtilReflection.h | |
operator double() |
NUTUtilReflection.h | ||
operator double *() |
NUTUtilReflection.h | ||
operator float() |
NUTUtilReflection.h | ||
operator float *() |
NUTUtilReflection.h | ||
operator FName() |
Cast to FName | NUTUtilReflection.h | |
operator FName *() |
Declare generic pointer casts. | NUTUtilReflection.h | |
operator FScriptArray *() |
Cast to FScriptArray* pointer (only valid for dynamic arrays), then cast to TArray |
NUTUtilReflection.h | |
operator FSoftObjectPtr *() |
Cast to writable FSoftObjectPtr* (where write actions should be performed through FSoftObjectPrr methods, not by pointer assignment). | NUTUtilReflection.h | |
operator FString() |
Cast to FString | NUTUtilReflection.h | |
operator FString *() |
NUTUtilReflection.h | ||
operator FText() |
Cast to FText | NUTUtilReflection.h | |
operator FText *() |
NUTUtilReflection.h | ||
operator int16() |
NUTUtilReflection.h | ||
operator int16 *() |
NUTUtilReflection.h | ||
operator int32() |
NUTUtilReflection.h | ||
operator int32 *() |
NUTUtilReflection.h | ||
operator int64() |
NUTUtilReflection.h | ||
operator int64 *() |
NUTUtilReflection.h | ||
operator int8() |
NUTUtilReflection.h | ||
operator int8 *() |
NUTUtilReflection.h | ||
operator uint16() |
NUTUtilReflection.h | ||
operator uint16 *() |
NUTUtilReflection.h | ||
operator uint32() |
NUTUtilReflection.h | ||
operator uint32 *() |
NUTUtilReflection.h | ||
operator uint64() |
NUTUtilReflection.h | ||
operator uint64 *() |
NUTUtilReflection.h | ||
operator uint8() |
Declare readonly numeric casts. | NUTUtilReflection.h | |
operator uint8 *() |
Declare numeric pointer casts. | NUTUtilReflection.h | |
operator UObject *() |
Cast to UObject* | NUTUtilReflection.h | |
operator UObject **() |
Cast to writable UObject* pointer (only valid for object properties) | NUTUtilReflection.h | |
operator void *() |
Cast operator for structs in general - cast to void*, then cast to StructType* | NUTUtilReflection.h | |
FVMReflection & operator,
(
FString* OutHistory |
As above, but returns the complete reflection history so far, including any errors | NUTUtilReflection.h | |
FVMReflection & operator,
(
bool* bErrorPointer |
Allows an inline method of returning the error status - the comma operator has the lowest precedence, so is executed last. | NUTUtilReflection.h | |
FVMReflection & operator[]
(
int32 ArrayElement |
Array subscript operator, used to access static/dynamic array elements | NUTUtilReflection.h | |
FVMReflection & operator[]
(
const ANSICHAR* InFieldType |
Array subscript operator, which takes a string for verifying that an array is of a particular type, e.g. ["uint8"]. | NUTUtilReflection.h | |
FVMReflection & operator=
(
int16 Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
float Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
int64 Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
int32 Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
FString Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
int8 Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
uint64 Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
uint32 Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
uint16 Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
uint8 Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
const FVMReflection& ToCopy |
Copy assignment operator - not supported | NUTUtilReflection.h | |
FVMReflection & operator=
(
FText Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
bool Value |
Special assignment operators Assign a value to a bool property | NUTUtilReflection.h | |
FVMReflection & operator=
(
UObject* Value |
Assign a value to an object property | NUTUtilReflection.h | |
FVMReflection & 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 | NUTUtilReflection.h | |
FVMReflection & operator=
(
double Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection & operator=
(
FName Value |
Also implement the assignment operator, for automatically performing these casts and assigning | NUTUtilReflection.h | |
FVMReflection * operator->() |
Member access operator - not used, use ->* instead | NUTUtilReflection.h | |
FVMReflection & operator->*
(
const ANSICHAR* PropertyName |
NUTUtilReflection.h | ||
FVMReflection & operator->*
(
FString PropertyName |
Member access operator. Used to access object/struct properties. | NUTUtilReflection.h |