TCbFieldIterator

Iterator for [FCbField](API\Runtime\Core\Serialization\FCbField)[View] that can operate on any contiguous range of fields.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

FieldType

TCbFieldIterator

FCbFieldIterator

FCbFieldViewIterator

References

Module

Core

Header

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

Include

#include "Serialization/CompactBinary.h"

Syntax

template<typename FieldType>
class TCbFieldIterator : public FieldType

Remarks

Iterator for FCbField[View] that can operate on any contiguous range of fields.

The iterator is the current field that the iterator points to and exposes the full interface of FCbField[View]. An iterator that is at the end is equivalent to a field with no value.

The iterator represents a range of fields from the current field to the last field.

Constructors

Name Description

Public function

TCbFieldIterator()

Construct an empty field range.

Protected function

TCbFieldIterator

(
    FieldType InField
)

Construct a field range that contains exactly one field.

Protected function

TCbFieldIterator

(
    FieldType&& InField,
    const void* InFieldsEnd
)

Construct a field range from the first field and a pointer to the end of the last field.

Functions

Name Description

Public function Const

void

 

AppendRangeHash

(
    FIoHashBuilder& Builder
)

Append the hash of every field in the range.

Public function Const

constexpr TC...

 

begin()

DO NOT USE DIRECTLY. These functions enable range-based for loop support.

Public function Const

void

 

CopyRangeTo

(
    FArchive& Ar
)

Copy the field range into an archive, as if calling CopyTo on every field.

Public function Const

void

 

CopyRangeTo

(
    FMutableMemoryView Buffer
)

Copy the field range into a buffer of exactly GetRangeSize() bytes.

Public function Const

constexpr FC...

 

end()

Public function Const

constexpr bo...

 

Equals

(
    const TCbFieldIterator< OtherFieldT...
)

Protected function Static

const void &...

 

GetFieldsEnd

(
    const TCbFieldIterator< OtherFieldT...
)

Returns the end of the last field, or null for an iterator at the end.

Public function Const

FIoHash

 

GetRangeHash()

Calculate the hash of every field in the range.

Public function Const

uint64

 

GetRangeSize()

Returns the size of the fields in the range in bytes.

Public function Const

void

 

IterateRangeAttachments

(
    FCbFieldVisitor Visitor
)

Invoke the visitor for every attachment in the field range.

Public function

void

 

Reset()

Reset this to an empty field range.

Public function Const

bool

 

TryGetRangeView

(
    FMemoryView& OutView
)

Try to get a view of every field in the range as they would be serialized.

Operators

Name Description

Public function Const

constexpr bo...

 

operator!=

(
    const FCbIteratorSentinel&
)

Public function Const

constexpr bo...

 

operator!=

(
    const TCbFieldIterator< OtherFieldT...
)

Public function

constexpr Fi...

 

operator*()

Public function

TCbFieldIter...

 

operator++()

Public function

TCbFieldIter...

 

operator++

(
    int
)

Public function Const

constexpr bo...

 

operator==

(
    const TCbFieldIterator< OtherFieldT...
)

Public function Const

constexpr bo...

 

operator==

(
    const FCbIteratorSentinel&
)

Public function

constexpr Fi...

 

operator->()