Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Bond::CboValidator Class Reference

A validator for Bond CBO bytecode streams. More...

#include <bond/tools/cbovalidator.h>

Classes

struct  Result
 Summary information produced during CBO validation. More...

Public Member Functions

Result Validate (const void *byteCode, size_t length)
 Validates CBO data from an in-memory byte buffer.
Result Validate (InputStream &stream)
 Validates CBO data from an input stream, starting at its current position.

Detailed Description

A validator for Bond CBO bytecode streams.

The CboValidator verifies the structure of serialized CBO data and reports summary information about the validated contents, such as the number of entries in each table, which CboLoader uses to size its allocations. A Bond::Exception is thrown if the CBO data is invalid, incomplete or has an unsupported format version.

See also
CboLoader, InputStream

Member Function Documentation

◆ Validate() [1/2]

Result Bond::CboValidator::Validate ( const void * byteCode,
size_t length )

Validates CBO data from an in-memory byte buffer.

Parameters
byteCodePointer to the beginning of the byte buffer.
lengthThe number of bytes in the buffer.
Returns
A Result containing decoded metadata and aggregate counts.

◆ Validate() [2/2]

Result Bond::CboValidator::Validate ( InputStream & stream)

Validates CBO data from an input stream, starting at its current position.

Parameters
streamInput stream containing CBO data. Its position is left after the validated data, so it must be reset before the data is read again.
Returns
A Result containing decoded metadata and aggregate counts.

The documentation for this class was generated from the following file:
  • include/bond/tools/cbovalidator.h