Ark Server API (ASA) - Wiki
|
#include <CompactBinary.h>
Public Member Functions | |
FCbArrayView () | |
uint64 | Num () const |
FCbFieldView | AsFieldView () const |
operator bool () const | |
uint64 | GetSize () const |
FIoHash | GetHash () const |
void | AppendHash (FIoHashBuilder &Builder) const |
bool | Equals (const FCbArrayView &Other) const |
void | CopyTo (FMutableMemoryView Buffer) const |
void | CopyTo (FArchive &Ar) const |
void | IterateAttachments (FCbFieldVisitor Visitor) const |
bool | TryGetView (FMemoryView &OutView) const |
constexpr | FCbFieldView ()=default |
FCbFieldView (const void *Data, ECbFieldType Type=ECbFieldType::HasFieldType) | |
FCbFieldView (const FCbValue &Value) | |
FCbFieldViewIterator | CreateViewIterator () const |
FCbFieldViewIterator | begin () const |
constexpr FCbIteratorSentinel | end () const |
Static Public Member Functions | |
static FCbArrayView | FromFieldNoCheck (const FCbFieldView &Field) |
Private Member Functions | |
FCbArrayView (const FCbFieldView &Field) | |
Array of FCbField[View] that have no names.
Accessing a field of the array requires iteration. Access by index is not provided because the cost of accessing an item by index scales linearly with the index.
This type only provides a view into memory and does not perform any memory management itself. Use FCbArray to hold a reference to the underlying memory when necessary.
Definition at line 938 of file CompactBinary.h.
FCbArrayView::FCbArrayView | ( | ) |
Construct an array with no fields.
|
inlineexplicitprivate |
Construct an array from an array field. No type check is performed! Use via FromFieldNoCheck.
Definition at line 1005 of file CompactBinary.h.
void FCbArrayView::AppendHash | ( | FIoHashBuilder & | Builder | ) | const |
Append the hash of the array if serialized by itself with no name.
|
inline |
Access the array as an array field.
Definition at line 951 of file CompactBinary.h.
|
inline |
DO NOT USE DIRECTLY. These functions enable range-based for loop support.
Definition at line 822 of file CompactBinary.h.
Copy the array into an archive. This will write GetSize() bytes, with no name.
void FCbArrayView::CopyTo | ( | FMutableMemoryView | Buffer | ) | const |
Copy the array into a buffer of exactly GetSize() bytes, with no name.
FCbFieldViewIterator FCbFieldView::CreateViewIterator | ( | ) | const |
|
inlineconstexpr |
Definition at line 823 of file CompactBinary.h.
bool FCbArrayView::Equals | ( | const FCbArrayView & | Other | ) | const |
Whether this array is identical to the other array.
Performs a deep comparison of any contained arrays or objects and their fields. Comparison assumes that both fields are valid and are written in the canonical format. Fields must be written in the same order in arrays and objects, and name comparison is case sensitive. If these assumptions do not hold, this may return false for equivalent inputs. Validation can be done with the All mode to check these assumptions about the format of the inputs.
|
constexprdefault |
|
inlineexplicit |
Definition at line 621 of file CompactBinaryValue.h.
|
explicit |
|
inlinestatic |
Construct an array from an array field. No type check is performed!
Definition at line 954 of file CompactBinary.h.
FIoHash FCbArrayView::GetHash | ( | ) | const |
Calculate the hash of the array if serialized by itself with no name.
uint64 FCbArrayView::GetSize | ( | ) | const |
Returns the size of the array in bytes if serialized by itself with no name.
|
inline |
Invoke the visitor for every attachment in the array.
Definition at line 985 of file CompactBinary.h.
uint64 FCbArrayView::Num | ( | ) | const |
Returns the number of items in the array.
|
inlineexplicit |
Whether the array has any fields.
Definition at line 957 of file CompactBinary.h.
|
inline |
Try to get a view of the array as it would be serialized, such as by CopyTo.
A view is available if the array contains its type and has no name. Access the equivalent for other arrays through FCbArray::GetBuffer, FCbArray::Clone, or CopyTo.
Definition at line 993 of file CompactBinary.h.