The DlgJsonWriter class mostly adapted for Dialogues, copied from FJsonObjectConverter See IDlgWriter for properties and METADATA specifiers.
More...
#include <DlgJsonWriter.h>
|
| static constexpr int64 | SkipFlags = CPF_Deprecated | CPF_Transient |
| |
|
| TSharedPtr< FJsonValue > | ConvertScalarPropertyToJsonValue (const FNYProperty *Property, const void *const ContainerPtr, const void *const ValuePtr) |
| |
| TSharedPtr< FJsonValue > | PropertyToJsonValue (const FNYProperty *Property, const void *const ContainerPtr, const void *const ValuePtr) |
| |
| void | ResetState () |
| |
| bool | UStructToJsonAttributes (const UStruct *StructDefinition, const void *const ContainerPtr, TMap< FString, TSharedPtr< FJsonValue > > &OutJsonAttributes) |
| |
| bool | UStructToJsonObject (const UStruct *StructDefinition, const void *const ContainerPtr, TSharedRef< FJsonObject > &OutJsonObject) |
| |
| bool | UStructToJsonString (const UStruct *StructDefinition, const void *const ContainerPtr, const DlgJsonWriterOptions &Options, FString &OutJsonString) |
| |
|
| static constexpr int64 | CheckFlags = ~CPF_ParmFlags |
| |
The DlgJsonWriter class mostly adapted for Dialogues, copied from FJsonObjectConverter See IDlgWriter for properties and METADATA specifiers.
Definition at line 25 of file DlgJsonWriter.h.
◆ FDlgJsonWriter()
| FDlgJsonWriter::FDlgJsonWriter |
( |
| ) |
|
|
inline |
Call Order and possible calls:
- DlgJsonWriter
- UStructToJsonString
- UStructToJsonObject
- UStructToJsonAttributes
- PropertyToJsonValue
- ConvertScalarPropertyToJsonValue
- PropertyToJsonValue
- UStructToJsonObject
Definition at line 40 of file DlgJsonWriter.h.
◆ CanSaveAsReference()
Decides if the path to the object should be serialized, or the object itself
Definition at line 83 of file IDlgWriter.h.
◆ CanSkipProperty()
Can we skip this property from exporting?
Definition at line 41 of file IDlgWriter.h.
◆ CanWriteIndex()
Should write the index number for Property?
Definition at line 73 of file IDlgWriter.h.
◆ CanWriteOneLinePerItem()
| static bool IDlgWriter::CanWriteOneLinePerItem |
( |
const FNYProperty * | Property | ) |
|
|
inlinestaticinherited |
Should write one item per line for Property?
Definition at line 63 of file IDlgWriter.h.
◆ ConvertScalarPropertyToJsonValue()
| TSharedPtr< FJsonValue > FDlgJsonWriter::ConvertScalarPropertyToJsonValue |
( |
const FNYProperty * | Property, |
|
|
const void *const | ContainerPtr, |
|
|
const void *const | ValuePtr ) |
|
private |
Convert property to JSON, assuming either the property is not an array or the value is an individual array element Used by PropertyToJsonValue
Definition at line 28 of file DlgJsonWriter.cpp.
◆ ExportToFile()
| bool FDlgJsonWriter::ExportToFile |
( |
const FString & | FileName | ) |
|
|
inlineoverridevirtual |
Save the config string to a text file
- Parameters
-
| FullName | Full path + file name + extension |
- Returns
- False on failure to write
Implements IDlgWriter.
Definition at line 50 of file DlgJsonWriter.h.
◆ GetAsString()
| const FString & FDlgJsonWriter::GetAsString |
( |
| ) |
const |
|
inlineoverridevirtual |
◆ IsLogVerbose()
| bool IDlgWriter::IsLogVerbose |
( |
| ) |
const |
|
inlineinherited |
◆ PropertyToJsonValue()
| TSharedPtr< FJsonValue > FDlgJsonWriter::PropertyToJsonValue |
( |
const FNYProperty * | Property, |
|
|
const void *const | ContainerPtr, |
|
|
const void *const | ValuePtr ) |
|
private |
Converts from a Property to a Json Value using exportText
- Parameters
-
| Property | The property to export |
| ValuePtr | Pointer to the value of the property |
- Returns
- The constructed JsonValue from the property
Definition at line 347 of file DlgJsonWriter.cpp.
◆ ResetState()
| void FDlgJsonWriter::ResetState |
( |
| ) |
|
|
inlineprivate |
◆ SetLogVerbose()
| void IDlgWriter::SetLogVerbose |
( |
bool | bValue | ) |
|
|
inlineinherited |
◆ UStructToJsonAttributes()
| bool FDlgJsonWriter::UStructToJsonAttributes |
( |
const UStruct * | StructDefinition, |
|
|
const void *const | ContainerPtr, |
|
|
TMap< FString, TSharedPtr< FJsonValue > > & | OutJsonAttributes ) |
|
private |
Converts from a UStruct to a set of json attributes (possibly from within a JsonObject)
- Parameters
-
| StructDefinition | UStruct definition that is looked over for properties |
| ContainerPtr | The object the UStruct represents. |
| JsonAttributes | Map of attributes to copy in to |
- Returns
- False if any properties failed to write
Definition at line 411 of file DlgJsonWriter.cpp.
◆ UStructToJsonObject()
| bool FDlgJsonWriter::UStructToJsonObject |
( |
const UStruct * | StructDefinition, |
|
|
const void *const | ContainerPtr, |
|
|
TSharedRef< FJsonObject > & | OutJsonObject ) |
|
inlineprivate |
Converts from a UStruct to a JSON Object
- Parameters
-
| StructDefinition | UStruct definition that is looked over for properties |
| ContainerPtr | The object the UStruct represents. |
| OutJsonObject | Json Object to be filled in with data from the ustruct |
- Returns
- False if faile to fill properties
Definition at line 98 of file DlgJsonWriter.h.
◆ UStructToJsonString()
| bool FDlgJsonWriter::UStructToJsonString |
( |
const UStruct * | StructDefinition, |
|
|
const void *const | ContainerPtr, |
|
|
const DlgJsonWriterOptions & | Options, |
|
|
FString & | OutJsonString ) |
|
private |
Converts from a UStruct to a JSON string containing an object, using exportText
- Parameters
-
| StructDefinition | UStruct definition that is looked over for properties |
| ContainerPtr | The object the UStruct represents. |
| OutJsonString | Json Object to be filled in with data from the ustruct |
- Returns
- False if failed to serialize to string
Definition at line 559 of file DlgJsonWriter.cpp.
◆ Write()
| void FDlgJsonWriter::Write |
( |
const UStruct * | StructDefinition, |
|
|
const void * | Object ) |
|
overridevirtual |
◆ bIsPropertyMapKey
| bool FDlgJsonWriter::bIsPropertyMapKey = false |
|
private |
◆ bLogVerbose
| bool IDlgWriter::bLogVerbose = false |
|
protectedinherited |
◆ CheckFlags
| constexpr int64 FDlgJsonWriter::CheckFlags = ~CPF_ParmFlags |
|
staticconstexprprivate |
Only properties that have these flags will be written.
Definition at line 126 of file DlgJsonWriter.h.
◆ IndexInArray
| int32 FDlgJsonWriter::IndexInArray = INDEX_NONE |
|
private |
◆ JsonString
| FString FDlgJsonWriter::JsonString |
|
private |
◆ SkipFlags
| constexpr int64 IDlgWriter::SkipFlags = CPF_Deprecated | CPF_Transient |
|
staticconstexprprotectedinherited |
The properties with these flags set will be ignored from writing.
Definition at line 113 of file IDlgWriter.h.
The documentation for this class was generated from the following files:
- SDKDemo/Plugins/UnrealEngineSDK/VisualScripter/Source/DlgSystem/Public/IO/DlgJsonWriter.h
- SDKDemo/Plugins/UnrealEngineSDK/VisualScripter/Source/DlgSystem/Private/IO/DlgJsonWriter.cpp