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

#include <CborReader.h>

Public Member Functions

CBOR_API FCborReader (FArchive *InStream, ECborEndianness InReaderEndianness=ECborEndianness::Platform)
 
CBOR_API ~FCborReader ()
 
CBOR_API const FArchiveGetArchive () const
 
CBOR_API bool IsError () const
 
CBOR_API FCborHeader GetError () const
 
CBOR_API const FCborContextGetContext () const
 
CBOR_API bool ReadNext (FCborContext &OutContext)
 
CBOR_API bool SkipContainer (ECborCode ContainerType)
 

Detailed Description

Reader for a the cbor protocol encoded stream

See also
http://cbor.io

Constructor & Destructor Documentation

◆ FCborReader()

FCborReader::FCborReader ( FArchive InStream,
ECborEndianness  InReaderEndianness = ECborEndianness::Platform 
)

Construct a CBOR reader.

Parameters
InStreamThe stream containing the CBOR data.
InReaderEndiannessSpecify which endianness should be use to read the archive.
Note
CBOR standard endianness is big endian. For interoperability with external tools, the standard endianness should be used. For internal usage, the platform endianness is faster.

◆ ~FCborReader()

FCborReader::~FCborReader ( )

Member Function Documentation

◆ GetArchive()

const FArchive * FCborReader::GetArchive ( ) const
Returns
the archive we are reading from.

◆ GetContext()

const FCborContext & FCborReader::GetContext ( ) const

The cbor context of the reader can either be a container context or a dummy. A reference to the context shouldn't be held while calling ReadNext.

Returns
The current cbor context.

◆ GetError()

FCborHeader FCborReader::GetError ( ) const
Returns
A cbor Header containing an error code as its raw code.

◆ IsError()

bool FCborReader::IsError ( ) const
Returns
true if the reader is in error.

◆ ReadNext()

bool FCborReader::ReadNext ( FCborContext OutContext)

Read the next value from the cbor stream.

Parameters
OutContextthe context to read the value into.
Returns
true if successful, false if an error was returned or the end of the stream was reached.

◆ SkipContainer()

bool FCborReader::SkipContainer ( ECborCode  ContainerType)

Skip a container of ContainerType type

Parameters
ContainerTypethe container we expect to skip.
Returns
true if successful, false if the current container wasn't a ContainerType or an error occurred.

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