Ark Server API (ASA) - Wiki
Loading...
Searching...
No Matches
TCbFieldIterator< FieldType > Class Template Reference

#include <CompactBinary.h>

+ Inheritance diagram for TCbFieldIterator< FieldType >:
+ Collaboration diagram for TCbFieldIterator< FieldType >:

Public Member Functions

constexpr TCbFieldIterator ()=default
 
TCbFieldIteratoroperator++ ()
 
TCbFieldIterator operator++ (int)
 
constexpr FieldType & operator* ()
 
constexpr FieldType * operator-> ()
 
void Reset ()
 
uint64 GetRangeSize () const
 
FIoHash GetRangeHash () const
 
void AppendRangeHash (FIoHashBuilder &Builder) const
 
template<typename OtherFieldType >
constexpr bool Equals (const TCbFieldIterator< OtherFieldType > &Other) const
 
template<typename OtherFieldType >
constexpr bool operator== (const TCbFieldIterator< OtherFieldType > &Other) const
 
template<typename OtherFieldType >
constexpr bool operator!= (const TCbFieldIterator< OtherFieldType > &Other) const
 
constexpr bool operator== (const FCbIteratorSentinel &) const
 
constexpr bool operator!= (const FCbIteratorSentinel &) const
 
void CopyRangeTo (FMutableMemoryView Buffer) const
 
void CopyRangeTo (FArchive &Ar) const
 
void IterateRangeAttachments (FCbFieldVisitor Visitor) const
 
bool TryGetRangeView (FMemoryView &OutView) const
 
constexpr TCbFieldIterator begin () const
 
constexpr FCbIteratorSentinel end () const
 

Protected Member Functions

constexpr TCbFieldIterator (FieldType InField)
 
constexpr TCbFieldIterator (FieldType &&InField, const void *InFieldsEnd)
 

Static Protected Member Functions

template<typename OtherFieldType >
static const voidGetFieldsEnd (const TCbFieldIterator< OtherFieldType > &It)
 

Private Attributes

const voidFieldsEnd = nullptr
 

Friends

template<typename OtherType >
class TCbFieldIterator
 

Detailed Description

template<typename FieldType>
class TCbFieldIterator< FieldType >

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.

Definition at line 341 of file CompactBinary.h.

Constructor & Destructor Documentation

◆ TCbFieldIterator() [1/3]

template<typename FieldType >
constexpr TCbFieldIterator< FieldType >::TCbFieldIterator ( )
constexprdefault

Construct an empty field range.

◆ TCbFieldIterator() [2/3]

template<typename FieldType >
constexpr TCbFieldIterator< FieldType >::TCbFieldIterator ( FieldType InField)
inlineexplicitconstexprprotected

Construct a field range that contains exactly one field.

Definition at line 425 of file CompactBinary.h.

◆ TCbFieldIterator() [3/3]

template<typename FieldType >
constexpr TCbFieldIterator< FieldType >::TCbFieldIterator ( FieldType && InField,
const void * InFieldsEnd )
inlineconstexprprotected

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

Parameters
InFieldThe first field, or the default field if there are no fields.
InFieldsEndA pointer to the end of the value of the last field, or null.

Definition at line 437 of file CompactBinary.h.

Member Function Documentation

◆ AppendRangeHash()

template<typename FieldType >
void TCbFieldIterator< FieldType >::AppendRangeHash ( FIoHashBuilder & Builder) const

Append the hash of every field in the range.

◆ begin()

template<typename FieldType >
constexpr TCbFieldIterator TCbFieldIterator< FieldType >::begin ( ) const
inlineconstexpr

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

Definition at line 420 of file CompactBinary.h.

◆ CopyRangeTo() [1/2]

template<typename FieldType >
void TCbFieldIterator< FieldType >::CopyRangeTo ( FArchive & Ar) const

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

◆ CopyRangeTo() [2/2]

template<typename FieldType >
void TCbFieldIterator< FieldType >::CopyRangeTo ( FMutableMemoryView Buffer) const

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

◆ end()

template<typename FieldType >
constexpr FCbIteratorSentinel TCbFieldIterator< FieldType >::end ( ) const
inlineconstexpr

Definition at line 421 of file CompactBinary.h.

◆ Equals()

template<typename FieldType >
constexpr bool TCbFieldIterator< FieldType >::Equals ( const TCbFieldIterator< OtherFieldType > & Other) const
inlineconstexpr

Definition at line 373 of file CompactBinary.h.

◆ GetFieldsEnd()

template<typename FieldType >
static const void * TCbFieldIterator< FieldType >::GetFieldsEnd ( const TCbFieldIterator< OtherFieldType > & It)
inlinestaticprotected

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

Definition at line 445 of file CompactBinary.h.

◆ GetRangeHash()

template<typename FieldType >
FIoHash TCbFieldIterator< FieldType >::GetRangeHash ( ) const

Calculate the hash of every field in the range.

◆ GetRangeSize()

template<typename FieldType >
uint64 TCbFieldIterator< FieldType >::GetRangeSize ( ) const

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

◆ IterateRangeAttachments()

template<typename FieldType >
void TCbFieldIterator< FieldType >::IterateRangeAttachments ( FCbFieldVisitor Visitor) const

Invoke the visitor for every attachment in the field range.

◆ operator!=() [1/2]

template<typename FieldType >
constexpr bool TCbFieldIterator< FieldType >::operator!= ( const FCbIteratorSentinel & ) const
inlineconstexpr

Definition at line 391 of file CompactBinary.h.

◆ operator!=() [2/2]

template<typename FieldType >
constexpr bool TCbFieldIterator< FieldType >::operator!= ( const TCbFieldIterator< OtherFieldType > & Other) const
inlineconstexpr

Definition at line 385 of file CompactBinary.h.

◆ operator*()

template<typename FieldType >
constexpr FieldType & TCbFieldIterator< FieldType >::operator* ( )
inlineconstexpr

Definition at line 356 of file CompactBinary.h.

◆ operator++() [1/2]

template<typename FieldType >
TCbFieldIterator & TCbFieldIterator< FieldType >::operator++ ( )

◆ operator++() [2/2]

template<typename FieldType >
TCbFieldIterator TCbFieldIterator< FieldType >::operator++ ( int )
inline

Definition at line 349 of file CompactBinary.h.

◆ operator->()

template<typename FieldType >
constexpr FieldType * TCbFieldIterator< FieldType >::operator-> ( )
inlineconstexpr

Definition at line 357 of file CompactBinary.h.

◆ operator==() [1/2]

template<typename FieldType >
constexpr bool TCbFieldIterator< FieldType >::operator== ( const FCbIteratorSentinel & ) const
inlineconstexpr

Definition at line 390 of file CompactBinary.h.

◆ operator==() [2/2]

template<typename FieldType >
constexpr bool TCbFieldIterator< FieldType >::operator== ( const TCbFieldIterator< OtherFieldType > & Other) const
inlineconstexpr

Definition at line 379 of file CompactBinary.h.

◆ Reset()

template<typename FieldType >
void TCbFieldIterator< FieldType >::Reset ( )
inline

Reset this to an empty field range.

Definition at line 360 of file CompactBinary.h.

◆ TryGetRangeView()

template<typename FieldType >
bool TCbFieldIterator< FieldType >::TryGetRangeView ( FMemoryView & OutView) const
inline

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

A view is available if each field contains its type. Access the equivalent for other field ranges through FCbFieldIterator::CloneRange or CopyRangeTo.

Definition at line 408 of file CompactBinary.h.

Friends And Related Symbol Documentation

◆ TCbFieldIterator

template<typename FieldType >
template<typename OtherType >
friend class TCbFieldIterator
friend

Definition at line 452 of file CompactBinary.h.

Member Data Documentation

◆ FieldsEnd

template<typename FieldType >
const void* TCbFieldIterator< FieldType >::FieldsEnd = nullptr
private

Pointer to the first byte past the end of the last field. Set to null at the end.

Definition at line 455 of file CompactBinary.h.


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