UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FCborStructSerializerBackend Class Reference

#include <CborStructSerializerBackend.h>

+ Inheritance diagram for FCborStructSerializerBackend:

Public Member Functions

SERIALIZATION_API FCborStructSerializerBackend (FArchive &InArchive)
 
SERIALIZATION_API FCborStructSerializerBackend (FArchive &InArchive, const EStructSerializerBackendFlags InFlags)
 
virtual SERIALIZATION_API ~FCborStructSerializerBackend ()
 
virtual SERIALIZATION_API void BeginArray (const FStructSerializerState &State) override
 
virtual SERIALIZATION_API void BeginStructure (const FStructSerializerState &State) override
 
virtual SERIALIZATION_API void EndArray (const FStructSerializerState &State) override
 
virtual SERIALIZATION_API void EndStructure (const FStructSerializerState &State) override
 
virtual SERIALIZATION_API void WriteComment (const FString &Comment) override
 
virtual SERIALIZATION_API void WriteProperty (const FStructSerializerState &State, int32 ArrayIndex=0) override
 
virtual SERIALIZATION_API bool WritePODArray (const FStructSerializerState &State) override
 
- Public Member Functions inherited from IStructSerializerBackend
virtual ~IStructSerializerBackend ()
 

Detailed Description

Implements a writer for UStruct serialization using Cbor.

Constructor & Destructor Documentation

◆ FCborStructSerializerBackend() [1/2]

FCborStructSerializerBackend::FCborStructSerializerBackend ( FArchive InArchive)

Creates and initializes a new legacy instance.

Note
Deprecated, use the two-parameter constructor with EStructSerializerBackendFlags::Legacy if you need backwards compatibility with code compiled prior to 4.22.
Parameters
InArchiveThe archive to serialize into.

◆ FCborStructSerializerBackend() [2/2]

FCborStructSerializerBackend::FCborStructSerializerBackend ( FArchive InArchive,
const EStructSerializerBackendFlags  InFlags 
)

Creates and initializes a new instance with the given flags.

Parameters
InArchiveThe archive to serialize into.
InFlagsThe flags that control the serialization behavior (typically EStructSerializerBackendFlags::Default).

◆ ~FCborStructSerializerBackend()

FCborStructSerializerBackend::~FCborStructSerializerBackend ( )
virtualdefault

Member Function Documentation

◆ BeginArray()

void FCborStructSerializerBackend::BeginArray ( const FStructSerializerState State)
overridevirtual

Signals the beginning of an array.

State.ValueProperty points to the property that holds the array.

Parameters
StateThe serializer's current state.
See also
BeginStructure, EndArray

Implements IStructSerializerBackend.

◆ BeginStructure()

void FCborStructSerializerBackend::BeginStructure ( const FStructSerializerState State)
overridevirtual

Signals the beginning of a child structure.

State.ValueProperty points to the property that holds the struct.

Parameters
StateThe serializer's current state.
See also
BeginArray, EndStructure

Implements IStructSerializerBackend.

◆ EndArray()

void FCborStructSerializerBackend::EndArray ( const FStructSerializerState State)
overridevirtual

Signals the end of an array.

State.ValueProperty points to the property that holds the array.

Parameters
StateThe serializer's current state.
See also
BeginArray, EndStructure

Implements IStructSerializerBackend.

◆ EndStructure()

void FCborStructSerializerBackend::EndStructure ( const FStructSerializerState State)
overridevirtual

Signals the end of an object.

State.ValueProperty points to the property that holds the struct.

Parameters
StateThe serializer's current state.
See also
BeginStructure, EndArray

Implements IStructSerializerBackend.

◆ WriteComment()

void FCborStructSerializerBackend::WriteComment ( const FString &  Comment)
overridevirtual

Writes a comment to the output stream.

Parameters
CommentThe comment text.
See also
BeginArray, BeginStructure, EndArray, EndStructure, WriteProperty

Implements IStructSerializerBackend.

◆ WritePODArray()

bool FCborStructSerializerBackend::WritePODArray ( const FStructSerializerState State)
overridevirtual

Writes a POD Array property to the output stream.

Note
implementations will support only a Int8 or Byte array at the moment

State.ValueProperty points to the property that holds the value to write. needs to be an ArrayProperty with a properly supported InnerProperty. State.ValueData points to the actual data to write. The array itself in this case State.TypeInfo contains the data's type information

Parameters
StateThe serializer's current state.
Returns
true if the array was properly written entirely as a pod array, false is we need to fallback to per element serialization
See also
BeginArray, BeginStructure, EndArray, EndStructure, WriteComment

Reimplemented from IStructSerializerBackend.

◆ WriteProperty()

void FCborStructSerializerBackend::WriteProperty ( const FStructSerializerState State,
int32  ArrayIndex = 0 
)
overridevirtual

Writes a property to the output stream.

Depending on the context, properties to be written can be either object properties or array elements.

State.KeyProperty points to the key property that holds the data to write. State.KeyData points to the key property's data. State.ValueProperty points to the property that holds the value to write. State.ValueData points to the actual data to write. State.TypeInfo contains the data's type information State.ArrayIndex is the optional index if the data is a value in an array.

Parameters
StateThe serializer's current state.
See also
BeginArray, BeginStructure, EndArray, EndStructure, WriteComment

Implements IStructSerializerBackend.


The documentation for this class was generated from the following files: