Ark Server API (ASA) - Wiki
|
#include "CoreTypes.h"
#include "Memory/MemoryFwd.h"
#include "Memory/MemoryView.h"
#include "Misc/EnumClassFlags.h"
#include "Serialization/CompactBinary.h"
Go to the source code of this file.
Enumerations | |
enum class | ECbValidateMode : uint32 { None = 0x0 , Default = 0x1 , Names = 0x2 , Format = 0x4 , Padding = 0x8 , Package = 0x10 , PackageHash = 0x20 , All = 0x3F , None = 0 , Default = 1 << 0 , Names = 1 << 1 , Format = 1 << 2 , Padding = 1 << 3 , Package = 1 << 4 , PackageHash = 1 << 5 , All = Default | Names | Format | Padding | Package | PackageHash } |
enum class | ECbValidateError : uint32 { None = 0x0 , OutOfBounds = 0x1 , InvalidType = 0x2 , DuplicateName = 0x4 , MissingName = 0x8 , ArrayName = 0x10 , InvalidString = 0x20 , InvalidInteger = 0x40 , InvalidFloat = 0x80 , NonUniformObject = 0x100 , NonUniformArray = 0x200 , Padding = 0x400 , InvalidPackageFormat = 0x800 , InvalidPackageHash = 0x1000 , DuplicateAttachments = 0x2000 , MultiplePackageObjects = 0x4000 , NullPackageObject = 0xFFFF8000 , NullPackageAttachment = 0x10000 , None = 0 , OutOfBounds = 1 << 0 , InvalidType = 1 << 1 , DuplicateName = 1 << 2 , MissingName = 1 << 3 , ArrayName = 1 << 4 , InvalidString = 1 << 5 , InvalidInteger = 1 << 6 , InvalidFloat = 1 << 7 , NonUniformObject = 1 << 8 , NonUniformArray = 1 << 9 , Padding = 1 << 10 , InvalidPackageFormat = 1 << 11 , InvalidPackageHash = 1 << 12 , DuplicateAttachments = 1 << 13 , MultiplePackageObjects = 1 << 14 , NullPackageObject = 1 << 15 , NullPackageAttachment = 1 << 16 } |
|
strong |
Flags for compact binary validation errors. Multiple flags may be combined.
Definition at line 77 of file CompactBinaryValidation.h.
|
strong |
Flags for validating compact binary data.
Definition at line 17 of file CompactBinaryValidation.h.
ENUM_CLASS_FLAGS | ( | ECbValidateError | ) |
ENUM_CLASS_FLAGS | ( | ECbValidateMode | ) |
ECbValidateError ValidateCompactBinary | ( | const FCbArray & | Value, |
ECbValidateMode | Mode ) |
ECbValidateError ValidateCompactBinary | ( | const FCbAttachment & | Value, |
ECbValidateMode | Mode ) |
ECbValidateError ValidateCompactBinary | ( | const FCbField & | Value, |
ECbValidateMode | Mode ) |
Validate the compact binary data for one value as specified by the mode flags.
Validation recurses into attachments, objects, arrays, and fields within the top-level value.
ECbValidateError ValidateCompactBinary | ( | const FCbObject & | Value, |
ECbValidateMode | Mode ) |
ECbValidateError ValidateCompactBinary | ( | const FCbPackage & | Value, |
ECbValidateMode | Mode ) |
ECbValidateError ValidateCompactBinary | ( | FMemoryView | View, |
ECbValidateMode | Mode, | ||
ECbFieldType | Type = ECbFieldType::HasFieldType ) |
Validate the compact binary data for one field in the view as specified by the mode flags.
Only one top-level field is processed from the view, and validation recurses into any array or object within that field. To validate multiple consecutive top-level fields, call the function once for each top-level field. If the given view might contain multiple top-level fields, then either exclude the Padding flag from the Mode or use MeasureCompactBinary to break up the view into its constituent fields before validating.
View | A memory view containing at least one top-level field. |
Mode | A combination of the flags for the types of validation to perform. |
Type | HasFieldType means that View contains the type. Otherwise, use the given type. |
ECbValidateError ValidateCompactBinaryAttachment | ( | FMemoryView | View, |
ECbValidateMode | Mode ) |
Validate the compact binary attachment pointed to by the view as specified by the mode flags.
The attachment is validated with ValidateCompactBinary by using the validation mode specified. Include ECbValidateMode::Package to validate the attachment format and hash.
View | A memory view containing a package. |
Mode | A combination of the flags for the types of validation to perform. |
ECbValidateError ValidateCompactBinaryPackage | ( | FMemoryView | View, |
ECbValidateMode | Mode ) |
Validate the compact binary package pointed to by the view as specified by the mode flags.
The package, and attachments, are validated with ValidateCompactBinary by using the validation mode specified. Include ECbValidateMode::Package to validate the package format and hashes.
View | A memory view containing a package. |
Mode | A combination of the flags for the types of validation to perform. |
ECbValidateError ValidateCompactBinaryRange | ( | FMemoryView | View, |
ECbValidateMode | Mode ) |
Validate the compact binary data for every field in the view as specified by the mode flags.
This function expects the entire view to contain fields. Any trailing region of the view which does not contain a valid field will produce an OutOfBounds or InvalidType error instead of the Padding error that would be produced by the single field validation function.