engine
 
载入中...
搜索中...
未找到
静态 Public 成员函数 | 所有成员列表
FStructSerializer类 参考

Implements a static class that can serialize UStruct based types. 更多...

#include <StructSerializer.h>

静态 Public 成员函数

template<typename StructType >
static void Serialize (const StructType &Struct, IStructSerializerBackend &Backend)
 Serializes a given USTRUCT to a string using the default policy. 更多...
 
template<typename StructType >
static void Serialize (const StructType &Struct, IStructSerializerBackend &Backend, const FStructSerializerPolicies &Policies)
 Serializes a given USTRUCT to a string using the specified policy. 更多...
 
static void Serialize (const void *Struct, UStruct &TypeInfo, IStructSerializerBackend &Backend)
 Serializes a given data structure of the specified type using the default policy. 更多...
 
static SERIALIZATION_API void Serialize (const void *Struct, UStruct &TypeInfo, IStructSerializerBackend &Backend, const FStructSerializerPolicies &Policies)
 Serializes a given data structure of the specified type using the specified policy. 更多...
 
static SERIALIZATION_API void SerializeElement (const void *Address, FProperty *Property, int32 ElementIndex, IStructSerializerBackend &Backend, const FStructSerializerPolicies &Policies)
 Serializes a given element of a data structure of the specified type using the specified policy. 更多...
 

详细描述

Implements a static class that can serialize UStruct based types.

This class implements the basic functionality for the serialization of UStructs, such as iterating a structure's properties and writing property values. The actual writing of serialized output data is performed by serialization backends, which allows this class to remain serialization format agnostic.

The serializer's behavior can be customized with serialization policies. This allows for control over how to handle null values, circular references and other edge cases.

成员函数说明

◆ Serialize() [1/4]

template<typename StructType >
static void FStructSerializer::Serialize ( const StructType &  Struct,
IStructSerializerBackend &  Backend 
)
inlinestatic

Serializes a given USTRUCT to a string using the default policy.

参数
StructTypeThe type of the struct to serialize.
StructThe struct to serialize.
BackendThe serialization backend to use.
返回
A string holding the serialized object.

◆ Serialize() [2/4]

template<typename StructType >
static void FStructSerializer::Serialize ( const StructType &  Struct,
IStructSerializerBackend &  Backend,
const FStructSerializerPolicies &  Policies 
)
inlinestatic

Serializes a given USTRUCT to a string using the specified policy.

参数
StructTypeThe type of the struct to serialize.
StructThe struct to serialize.
BackendThe serialization backend to use.
PoliciesThe serialization policies to use.
返回
A string holding the serialized object.

◆ Serialize() [3/4]

static void FStructSerializer::Serialize ( const void *  Struct,
UStruct &  TypeInfo,
IStructSerializerBackend &  Backend 
)
inlinestatic

Serializes a given data structure of the specified type using the default policy.

参数
StructThe data structure to serialize.
TypeInfoThe structure's type information.
BackendThe serialization backend to use.
参见
Deserialize

◆ Serialize() [4/4]

static SERIALIZATION_API void FStructSerializer::Serialize ( const void *  Struct,
UStruct &  TypeInfo,
IStructSerializerBackend &  Backend,
const FStructSerializerPolicies &  Policies 
)
static

Serializes a given data structure of the specified type using the specified policy.

参数
StructThe data structure to serialize.
TypeInfoThe structure's type information.
BackendThe serialization backend to use.
PoliciesThe serialization policies to use.
参见
Deserialize

◆ SerializeElement()

static SERIALIZATION_API void FStructSerializer::SerializeElement ( const void *  Address,
FProperty *  Property,
int32  ElementIndex,
IStructSerializerBackend &  Backend,
const FStructSerializerPolicies &  Policies 
)
static

Serializes a given element of a data structure of the specified type using the specified policy.

参数
AddressThe address of the container of the property to serialize.
PropertyThe property to serialize.
ElementIndexThe index of the element to serialize if property is a container.
BackendThe serialization backend to use.
PoliciesThe serialization policies to use.
参见
Deserialize

该类的文档由以下文件生成: