Ark Server API (ASA) - Wiki
|
#include <CompactBinaryPackage.h>
Classes | |
struct | FBinaryValue |
struct | FObjectValue |
Private Member Functions | |
template<typename... ArgTypes, decltype(FBinaryValue(DeclVal< ArgTypes >()...)) * = nullptr> | |
FCbAttachment (TInPlaceType< FBinaryValue >, ArgTypes &&... Args) | |
Private Attributes | |
TVariant< TYPE_OF_NULLPTR, FObjectValue, FBinaryValue, FCompressedBuffer > | Value |
An attachment is either null, raw binary, compressed binary, or an object.
Attachments are always identified by their raw hash, even when stored compressed.
An attachment is serialized as a sequence of compact binary fields with no name. It is invalid to serialize a null attachment. A raw binary attachment is serialized as an empty Binary field when empty, and otherwise as a BinaryAttachment field containing the raw hash, followed by the raw binary data in a Binary field. A compressed binary attachment is serialized as Binary with a compressed buffer as the value. An object is serialized as an empty Object field when empty, and otherwise as an ObjectAttachment field containing the hash, followed by the object data in an Object field.
Definition at line 37 of file CompactBinaryPackage.h.
|
inlineprivate |
Definition at line 69 of file CompactBinaryPackage.h.
|
default |
Construct a null attachment.
Construct an object attachment. Value is cloned if not owned.
Definition at line 83 of file CompactBinaryPackage.h.
|
inlineexplicit |
Definition at line 85 of file CompactBinaryPackage.h.
Definition at line 87 of file CompactBinaryPackage.h.
Definition at line 89 of file CompactBinaryPackage.h.
|
inlineexplicit |
Construct a raw binary attachment from a shared/composite buffer. Value is cloned if not owned.
Definition at line 94 of file CompactBinaryPackage.h.
|
inlineexplicit |
Definition at line 97 of file CompactBinaryPackage.h.
|
inlineexplicit |
Construct a compressed binary attachment. Value is cloned if not owned.
Definition at line 101 of file CompactBinaryPackage.h.
|
inlineexplicit |
Construct a compressed binary attachment. Value is cloned if not owned.
Definition at line 111 of file CompactBinaryPackage.h.
|
inline |
Access the attachment as raw binary in a single contiguous buffer. Defaults to a null buffer on error.
Definition at line 426 of file CompactBinaryPackage.h.
|
inline |
Access the attachment as raw binary. Defaults to a null buffer on error.
Definition at line 435 of file CompactBinaryPackage.h.
|
inline |
Access the attachment as compressed binary. Defaults to a null buffer on error.
Definition at line 444 of file CompactBinaryPackage.h.
|
inline |
Access the attachment as an object. Defaults to an empty object on error.
Definition at line 417 of file CompactBinaryPackage.h.
FIoHash FCbAttachment::GetHash | ( | ) | const |
Returns the hash of the attachment value.
|
inline |
Returns whether the attachment is raw binary.
Definition at line 145 of file CompactBinaryPackage.h.
|
inline |
Returns whether the attachment is compressed binary.
Definition at line 148 of file CompactBinaryPackage.h.
|
inline |
Whether the attachment has a null value.
Definition at line 139 of file CompactBinaryPackage.h.
|
inline |
Returns whether the attachment is an object.
Definition at line 142 of file CompactBinaryPackage.h.
|
inlineexplicit |
Whether the attachment has a non-null value.
Definition at line 136 of file CompactBinaryPackage.h.
|
inline |
Definition at line 155 of file CompactBinaryPackage.h.
|
inline |
Definition at line 156 of file CompactBinaryPackage.h.
|
inline |
Compares attachments by their hash. Any discrepancy in type must be handled externally.
Definition at line 154 of file CompactBinaryPackage.h.
|
inline |
Reset this to a null attachment.
Definition at line 121 of file CompactBinaryPackage.h.
Save the attachment into the archive as a stream of compact binary fields.
Save the attachment into the writer as a stream of compact binary fields.
bool FCbAttachment::TryLoad | ( | FArchive & | Ar, |
FCbBufferAllocator | Allocator = FUniqueBuffer::Alloc ) |
Load the attachment from compact binary as written by Save.
The attachments value will be loaded into an owned buffer.
Ar | Archive to read the attachment from. An error state is set on failure. |
Allocator | Allocator for the attachment value buffer. |
bool FCbAttachment::TryLoad | ( | FCbFieldIterator & | Fields | ) |
Load the attachment from compact binary as written by Save.
The attachment references the input iterator if it is owned, and otherwise clones the value.
The iterator is advanced as attachment fields are consumed from it.
|
private |
Definition at line 185 of file CompactBinaryPackage.h.