FCbObjectView

Array of [FCbField](API\Runtime\Core\Serialization\FCbField)[View] that have unique names.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FCbFieldView

FCbObjectView

References

Module

Core

Header

/Engine/Source/Runtime/Core/Public/Serialization/CompactBinary.h

Include

#include "Serialization/CompactBinary.h"

Syntax

class FCbObjectView : protected FCbFieldView

Remarks

Array of FCbField[View] that have unique names.

Accessing the fields of an object is always a safe operation, even if the requested field does not exist. Fields may be accessed by name or through iteration. When a field is requested that is not found in the object, the field that it returns has no value (evaluates to false) though attempting to access the empty field is also safe, as described by FCbFieldView.

This type only provides a view into memory and does not perform any memory management itself. Use FCbObject to hold a reference to the underlying memory when necessary.

Constructors

Name Description

Public function

FCbObjectView()

Construct an object with no fields.

Functions

Name Description

Public function Const

void

 

AppendHash

(
    FIoHashBuilder& Builder
)

Append the hash of the object if serialized by itself with no name.

Public function Const

FCbFieldView

 

AsFieldView()

Access the object as an object field.

Public function Const

void

 

CopyTo

(
    FMutableMemoryView Buffer
)

Copy the object into a buffer of exactly GetSize() bytes, with no name.

Public function Const

void

 

CopyTo

(
    FArchive& Ar
)

Copy the object into an archive.

Public function Const

bool

 

Equals

(
    const FCbObjectView& Other
)

Whether this object is identical to the other object.

Public function Const

FCbFieldView

 

FindView

(
    FUtf8StringView Name
)

Find a field by case-sensitive name comparison.

Public function Const

FCbFieldView

 

FindViewIgnoreCase

(
    FUtf8StringView Name
)

Find a field by case-insensitive name comparison.

Public function Static

FCbObjectVie...

 

FromFieldNoCheck

(
    const FCbFieldView& Field
)

Construct an object from an object field. No type check is performed!

Public function Const

FIoHash

 

GetHash()

Calculate the hash of the object if serialized by itself with no name.

Public function Const

uint64

 

GetSize()

Returns the size of the object in bytes if serialized by itself with no name.

Public function Const

void

 

IterateAttachments

(
    FCbFieldVisitor Visitor
)

Invoke the visitor for every attachment in the object.

Public function Const

bool

 

TryGetView

(
    FMemoryView& OutView
)

Try to get a view of the object as it would be serialized, such as by CopyTo.

Operators

Name Description

Public function Const

 

operator bool()

Whether the object has any fields.

Public function Const

FCbFieldView

 

operator[]

(
    FUtf8StringView Name
)

Find a field by case-sensitive name comparison.