UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
CompactBinaryValidation.cpp File Reference

Classes

class  FCbUniformFieldsValidator
 

Functions

ECbValidateError ValidateCompactBinary (FMemoryView View, ECbValidateMode Mode, ECbFieldType Type)
 
ECbValidateError ValidateCompactBinaryRange (FMemoryView View, ECbValidateMode Mode)
 
ECbValidateError ValidateCompactBinaryAttachment (FMemoryView View, ECbValidateMode Mode)
 
ECbValidateError ValidateCompactBinaryPackage (FMemoryView View, ECbValidateMode Mode)
 
ECbValidateError ValidateCompactBinary (const FCbField &Value, ECbValidateMode Mode)
 
ECbValidateError ValidateCompactBinary (const FCbArray &Value, ECbValidateMode Mode)
 
ECbValidateError ValidateCompactBinary (const FCbObject &Value, ECbValidateMode Mode)
 
ECbValidateError ValidateCompactBinary (const FCbPackage &Value, ECbValidateMode Mode)
 
ECbValidateError ValidateCompactBinary (const FCbAttachment &Value, ECbValidateMode Mode)
 

Function Documentation

◆ ValidateCompactBinary() [1/6]

ECbValidateError ValidateCompactBinary ( const FCbArray Value,
ECbValidateMode  Mode 
)

◆ ValidateCompactBinary() [2/6]

ECbValidateError ValidateCompactBinary ( const FCbAttachment Value,
ECbValidateMode  Mode 
)

◆ ValidateCompactBinary() [3/6]

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.

Returns
None on success, otherwise the flags for the types of errors that were detected.

◆ ValidateCompactBinary() [4/6]

ECbValidateError ValidateCompactBinary ( const FCbObject Value,
ECbValidateMode  Mode 
)

◆ ValidateCompactBinary() [5/6]

ECbValidateError ValidateCompactBinary ( const FCbPackage Value,
ECbValidateMode  Mode 
)

◆ ValidateCompactBinary() [6/6]

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.

Parameters
ViewA memory view containing at least one top-level field.
ModeA combination of the flags for the types of validation to perform.
TypeHasFieldType means that View contains the type. Otherwise, use the given type.
Returns
None on success, otherwise the flags for the types of errors that were detected.

◆ ValidateCompactBinaryAttachment()

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.

See also
ValidateCompactBinary
Parameters
ViewA memory view containing a package.
ModeA combination of the flags for the types of validation to perform.
Returns
None on success, otherwise the flags for the types of errors that were detected.

◆ ValidateCompactBinaryPackage()

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.

See also
ValidateCompactBinary
Parameters
ViewA memory view containing a package.
ModeA combination of the flags for the types of validation to perform.
Returns
None on success, otherwise the flags for the types of errors that were detected.

◆ ValidateCompactBinaryRange()

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.

See also
ValidateCompactBinary