Navigation
API > API/Plugins > API/Plugins/NetcodeUnitTest > API/Plugins/NetcodeUnitTest/FVMReflection
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
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,
(
FString* OutHistory |
As above, but returns the complete reflection history so far, including any errors | NUTUtilReflection.h |
operator,(bool *)
Description
Allows an inline method of returning the error status - the comma operator has the lowest precedence, so is executed last.
This also allows you to test for errors at every stage of reflection (although it's a bit ugly if done this way), e.g: UObject* Result = (UObject*)(((FVMReflection(TestObjA), &bError)->"AObjectRef", &bErrorA)->"BObjectRef", &bErrorB);
Since the operator specifies a bool pointer though, we don't want to hold onto this pointer longer than necessary (in case it becomes a dangling pointer), so it is unset every time an operator returns (with the exception of this operator).
This means both, that you can use error bools to catch errors from within specific parts of a statement, while also avoiding invalid memory access: (Cast)((->"Blah", &bError)->"Boo"): Returns errors accessing 'Blah', but not 'Boo' or 'Cast'
It also means, that if you specify a bool right at the end of a reflection statement, before casting to a return type, that you can use this last reflection statement to detect casting errors too: (Cast)(->"Blah"->"Boo", &bError): Returns errors accessing Blah, Boo, or with Cast
| Name | operator, |
| Type | function |
| Header File | /Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Public/NUTUtilReflection.h |
| Include Path | #include "NUTUtilReflection.h" |
| Source | /Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Private/NUTUtilReflection.cpp |
FVMReflection & operator,
(
bool * bErrorPointer
)
operator,(FString *)
Description
As above, but returns the complete reflection history so far, including any errors
| Name | operator, |
| Type | function |
| Header File | /Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Public/NUTUtilReflection.h |
| Include Path | #include "NUTUtilReflection.h" |
| Source | /Engine/Plugins/NetcodeUnitTest/NetcodeUnitTest/Source/NetcodeUnitTest/Private/NUTUtilReflection.cpp |
FVMReflection & operator,
(
FString * OutHistory
)
Parameters
| Name | Remarks |
|---|---|
| OutHistory | Takes and stores a temporary reference, to the a string for outputting the reflection history |