You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rb trivial #preflight none #ROBOMERGE-AUTHOR: robert.manuszewski #ROBOMERGE-SOURCE: CL 19110591 via CL 19110613 via CL 19110617 via CL 19110763 #ROBOMERGE-BOT: UE5 (Release-Engine-Staging -> Main) (v921-19075845) [CL 19152719 by robert manuszewski in ue5-main branch]
40 lines
1.8 KiB
C++
40 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "PropertyTextUtilities.h"
|
|
#include "PropertyNode.h"
|
|
#include "PropertyHandleImpl.h"
|
|
|
|
void FPropertyTextUtilities::PropertyToTextHelper(FString& OutString, const FPropertyNode* InPropertyNode, const FProperty* Property, const uint8* ValueAddress, UObject* Object, EPropertyPortFlags PortFlags)
|
|
{
|
|
if (InPropertyNode->GetArrayIndex() != INDEX_NONE || Property->ArrayDim == 1)
|
|
{
|
|
Property->ExportText_Direct(OutString, ValueAddress, ValueAddress, Object, PortFlags);
|
|
}
|
|
else
|
|
{
|
|
FArrayProperty::ExportTextInnerItem(OutString, Property, ValueAddress, Property->ArrayDim, ValueAddress, Property->ArrayDim, Object, PortFlags);
|
|
}
|
|
}
|
|
|
|
void FPropertyTextUtilities::PropertyToTextHelper(FString& OutString, const FPropertyNode* InPropertyNode, const FProperty* Property, const FObjectBaseAddress& ObjectAddress, EPropertyPortFlags PortFlags)
|
|
{
|
|
PropertyToTextHelper(OutString, InPropertyNode, Property, ObjectAddress.BaseAddress, ObjectAddress.Object, PortFlags);
|
|
}
|
|
|
|
void FPropertyTextUtilities::TextToPropertyHelper(const TCHAR* Buffer, const FPropertyNode* InPropertyNode, const FProperty* Property, uint8* ValueAddress, UObject* Object, EPropertyPortFlags PortFlags)
|
|
{
|
|
if (InPropertyNode->GetArrayIndex() != INDEX_NONE || Property->ArrayDim == 1)
|
|
{
|
|
Property->ImportText_Direct(Buffer, ValueAddress, Object, PortFlags);
|
|
}
|
|
else
|
|
{
|
|
FArrayProperty::ImportTextInnerItem(Buffer, Property, ValueAddress, PortFlags, Object);
|
|
}
|
|
}
|
|
|
|
void FPropertyTextUtilities::TextToPropertyHelper(const TCHAR* Buffer, const FPropertyNode* InPropertyNode, const FProperty* Property, const FObjectBaseAddress& ObjectAddress, EPropertyPortFlags PortFlags)
|
|
{
|
|
TextToPropertyHelper(Buffer, InPropertyNode, Property, ObjectAddress.BaseAddress, ObjectAddress.Object, PortFlags);
|
|
}
|