UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
ScriptSerialization.h File Reference
#include "HAL/Platform.h"

Go to the source code of this file.

Macros

#define XFER(T)
 
#define XFERNAME()
 
#define XFERSTRING()
 
#define XFERUNICODESTRING()
 
#define XFERTEXT()
 
#define XFERPTR(T)
 
#define XFERTOBJPTR()
 
#define XFER_FUNC_POINTER   XFERPTR(UStruct*)
 
#define XFER_FUNC_NAME   XFERNAME()
 
#define XFER_PROP_POINTER   XFERPTR(FProperty*)
 
#define XFER_OBJECT_POINTER(Type)   XFERPTR(Type)
 
#define XFER_TOBJECT_PTR   XFERTOBJPTR
 
#define FIXUP_EXPR_OBJECT_POINTER(Type)
 

Macro Definition Documentation

◆ FIXUP_EXPR_OBJECT_POINTER

#define FIXUP_EXPR_OBJECT_POINTER (   Type)

◆ XFER

#define XFER (   T)
Value:
{ \
T Temp; \
if (!Ar.IsLoading()) \
{ \
Temp = FPlatformMemory::ReadUnaligned<T>(&Script[iCode]); \
} \
Ar << Temp; \
if (!Ar.IsSaving()) \
{ \
FPlatformMemory::WriteUnaligned<T>(&Script[iCode], Temp); \
} \
iCode += sizeof(T); \
}
UE_FORCEINLINE_HINT TSharedRef< CastToType, Mode > StaticCastSharedRef(TSharedRef< CastFromType, Mode > const &InSharedRef)
Definition SharedPointer.h:127

This header contains the code for serialization of script bytecode and [eventually] tagged property values. Extracted to header file to allow custom definitions of the macros used by these methods

◆ XFER_FUNC_NAME

#define XFER_FUNC_NAME   XFERNAME()

◆ XFER_FUNC_POINTER

#define XFER_FUNC_POINTER   XFERPTR(UStruct*)

◆ XFER_OBJECT_POINTER

#define XFER_OBJECT_POINTER (   Type)    XFERPTR(Type)

◆ XFER_PROP_POINTER

#define XFER_PROP_POINTER   XFERPTR(FProperty*)

◆ XFER_TOBJECT_PTR

#define XFER_TOBJECT_PTR   XFERTOBJPTR

◆ XFERNAME

#define XFERNAME ( )
Value:
{ \
FScriptName ScriptName; \
if (!Ar.IsLoading()) \
{ \
FMemory::Memcpy( &ScriptName, &Script[iCode], sizeof(FScriptName) ); \
Name = ScriptNameToName(ScriptName); \
} \
Ar << Name; \
if (!Ar.IsSaving()) \
{ \
ScriptName = NameToScriptName(Name); \
FMemory::Memcpy( &Script[iCode], &ScriptName, sizeof(FScriptName) ); \
} \
iCode += sizeof(FScriptName); \
}
FORCEINLINE FScriptName NameToScriptName(FName InName)
Definition NameTypes.h:1607
FORCEINLINE FName ScriptNameToName(FScriptName InName)
Definition NameTypes.h:1597
Definition NameTypes.h:617
Definition NameTypes.h:491

◆ XFERPTR

#define XFERPTR (   T)
Value:
{ \
T AlignedPtr = NULL; \
if (!Ar.IsLoading()) \
{ \
FMemory::Memcpy( &TempCode, &Script[iCode], sizeof(ScriptPointerType) ); \
AlignedPtr = (T)(TempCode); \
} \
Ar << AlignedPtr; \
if (!Ar.IsSaving()) \
{ \
TempCode = (ScriptPointerType)(AlignedPtr); \
FMemory::Memcpy( &Script[iCode], &TempCode, sizeof(ScriptPointerType) ); \
} \
iCode += sizeof(ScriptPointerType); \
}
#define NULL
Definition oodle2base.h:134
uint64 ScriptPointerType
Definition ObjectMacros.h:22

◆ XFERSTRING

#define XFERSTRING ( )
Value:
{ \
do XFER(uint8) while( Script[iCode-1] ); \
}
#define XFER(T)
Definition ScriptSerialization.h:20
uint8_t uint8
Definition binka_ue_file_header.h:8

◆ XFERTEXT

#define XFERTEXT ( )
Value:
{ \
{ \
break; \
break; \
break; \
break; \
break; \
default: \
checkf(false, TEXT("Unknown EBlueprintTextLiteralType! Please update XFERTEXT to handle this type of text.")); \
break; \
} \
}
#define TEXT(x)
Definition Platform.h:1272
EBlueprintTextLiteralType
Definition Script.h:330
Definition Object.h:95

◆ XFERTOBJPTR

#define XFERTOBJPTR ( )
Value:
{ \
TObjectPtr<UObject> AlignedPtr; \
if (!Ar.IsLoading()) \
{ \
FMemory::Memcpy(&AlignedPtr, &Script[iCode], sizeof(ScriptPointerType)); \
} \
Ar << AlignedPtr; \
if (!Ar.IsSaving()) \
{ \
FMemory::Memcpy(&Script[iCode], &AlignedPtr, sizeof(ScriptPointerType)); \
} \
iCode += sizeof(ScriptPointerType); \
}
Definition ObjectPtr.h:488

◆ XFERUNICODESTRING

#define XFERUNICODESTRING ( )
Value:
{ \
do XFER(uint16) while( Script[iCode-1] || Script[iCode-2] ); \
}
uint16_t uint16
Definition binka_ue_file_header.h:7