Navigation
API > API/Plugins > API/Plugins/NetcodeUnitTest
References
| Module | NetcodeUnitTest |
| Header | /Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Public/NUTUtilReflection.h |
| Include | #include "NUTUtilReflection.h" |
Syntax
class FVMReflection
Remarks
Constructors
| Type | Name | Description | |
|---|---|---|---|
FVMReflection
(
const FVMReflection& ToCopy |
Copy constructor - used regularly to copy reflection states, but without passing on history or temporary variables (such as error return) | ||
FVMReflection
(
UObject* InBaseObject, |
UObject constructor - Initializing from a UObject | ||
FVMReflection
(
FStructOnScope& InStruct, |
Struct constructor - initializing from a scoped struct (allows you to use reflection, to work with unknown structs) | ||
FVMReflection
(
FFuncReflection& InFuncRefl, |
FFuncReflection copy constructor - initializing from a function reflection struct instance (shortcut to reference its parameters) |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | DebugDump () |
Does a complete debug dump of the state of this reflection instance, and disables further use | |
| FORCEINLINEvoid | Disables the need to verify field types before accessing structs etc., to e.g. make use of the 'reflect' console command easier. | ||
| Declare generic pointer casts. | |||
| FORCEINLINEint32 | GetArrayNum () |
If pointing to an array, returns the array size. | |
| FORCEINLINEFString | GetHistory () |
Returns the reflection helper history as a string | |
| InType | GetNumericTypeCast
(
const TCHAR* InTypeStr, |
||
| FORCEINLINE 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. | |
| InType | GetTypeCast
(
const TCHAR* InTypeStr |
||
| TValueOrError< FString, FString > | Converts the value of whatever the reflection helper is pointing to, into a human readable string. | ||
| FORCEINLINEbool | IsError () |
Returns the current error status | |
NUMERIC_CAST_ASSIGN
(
int32 |
|||
NUMERIC_CAST_ASSIGN
(
double |
|||
NUMERIC_CAST_ASSIGN
(
uint64 |
|||
NUMERIC_CAST_ASSIGN
(
uint16 |
|||
NUMERIC_CAST_ASSIGN
(
int64 |
|||
NUMERIC_CAST_ASSIGN
(
int16 |
|||
NUMERIC_CAST_ASSIGN
(
uint32 |
|||
NUMERIC_CAST_ASSIGN_BASIC
(
uint8 |
Declare readonly numeric casts. | ||
NUMERIC_CAST_ASSIGN_BASIC
(
float |
|||
NUMERIC_CAST_ASSIGN_BASIC
(
int8 |
|||
NUMERIC_POINTER_CAST_ASSIGN
(
int16 |
|||
NUMERIC_POINTER_CAST_ASSIGN
(
int8 |
|||
NUMERIC_POINTER_CAST_ASSIGN
(
uint64 |
|||
NUMERIC_POINTER_CAST_ASSIGN
(
float |
|||
NUMERIC_POINTER_CAST_ASSIGN
(
uint16 |
|||
NUMERIC_POINTER_CAST_ASSIGN
(
uint8 |
Declare numeric pointer casts. | ||
NUMERIC_POINTER_CAST_ASSIGN
(
int32 |
|||
NUMERIC_POINTER_CAST_ASSIGN
(
uint32 |
|||
NUMERIC_POINTER_CAST_ASSIGN
(
double |
|||
NUMERIC_POINTER_CAST_ASSIGN
(
int64 |
Operators
| Type | Name | Description | |
|---|---|---|---|
| Cast to bool | |||
| Cast to FName | |||
| Cast to FScriptArray* pointer (only valid for dynamic arrays), then cast to TArray |
|||
| Cast to writable FSoftObjectPtr* (where write actions should be performed through FSoftObjectPrr methods, not by pointer assignment). | |||
| Cast to FString | |||
| Cast to FText | |||
| 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. | |||
| Cast to UObject* | |||
| Cast to writable UObject* pointer (only valid for object properties) | |||
| Cast operator for structs in general - cast to void*, then cast to StructType* | |||
| FVMReflection & | operator,
(
bool* bErrorPointer |
Allows an inline method of returning the error status - the comma operator has the lowest precedence, so is executed last. | |
| FVMReflection & | As above, but returns the complete reflection history so far, including any errors | ||
| FVMReflection & | operator[]
(
int32 ArrayElement |
Array subscript operator, used to access static/dynamic array elements | |
| 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"]. | |
| FVMReflection & | operator=
(
bool Value |
Special assignment operators Assign a value to a bool property | |
| FVMReflection & | Assign a value to an object property | ||
| 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 | |
| FVMReflection & | operator->*
(
FString PropertyName |
Member access operator. Used to access object/struct properties. | |
| FORCEINLINEFVMReflection & | operator->*
(
const ANSICHAR* PropertyName |