You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#rnx #rb none #ROBOMERGE-OWNER: ryan.durand #ROBOMERGE-AUTHOR: ryan.durand #ROBOMERGE-SOURCE: CL 10869210 via CL 10869511 via CL 10869900 #ROBOMERGE-BOT: (v613-10869866) [CL 10870549 by ryan durand in Main branch]
45 lines
1.0 KiB
C++
45 lines
1.0 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
#if PLATFORM_ANDROID || PLATFORM_IOS
|
|
|
|
#include "MobileJSScripting.h"
|
|
#include "Backends/JsonStructSerializerBackend.h"
|
|
|
|
class UObject;
|
|
|
|
/**
|
|
* Implements a writer for UStruct serialization using JavaScript.
|
|
*
|
|
* Based on FJsonStructSerializerBackend, it adds support for certain object types not representable in pure JSON
|
|
*
|
|
*/
|
|
class FMobileJSStructSerializerBackend
|
|
: public FJsonStructSerializerBackend
|
|
{
|
|
public:
|
|
|
|
/**
|
|
* Creates and initializes a new instance.
|
|
*
|
|
* @param InScripting An instance of a web browser scripting obnject.
|
|
*/
|
|
FMobileJSStructSerializerBackend(FMobileJSScriptingRef InScripting);
|
|
|
|
public:
|
|
virtual void WriteProperty(const FStructSerializerState& State, int32 ArrayIndex = 0) override;
|
|
|
|
FString ToString();
|
|
|
|
private:
|
|
void WriteUObject(const FStructSerializerState& State, UObject* Value);
|
|
|
|
FMobileJSScriptingRef Scripting;
|
|
TArray<uint8> ReturnBuffer;
|
|
FMemoryWriter Writer;
|
|
};
|
|
|
|
#endif // PLATFORM_ANDROID || PLATFORM_IOS
|