Bond 0.9
C++ Bond Runtime Library API Documentation
Loading...
Searching...
No Matches
Tools

These classes implement tools for querying, validating and debugging Bond parse trees and compiled code. More...

Classes

class  Bond::CboValidator
 A validator for Bond CBO bytecode streams. More...
class  Bond::Disassembler
 A disassembler for Bond bytecode and CBO streams. More...
class  Bond::NativeBindingGenerator
 A generator for C++ native binding declarations and definitions. More...
struct  Bond::ParseNodeCount
 A set of counters for Bond parse node types. More...
class  Bond::ParseNodeCounter
 A parse tree traverser that counts encountered parse nodes. More...
class  Bond::ParseTreePrinter
 A printer for Bond parse trees. More...
class  Bond::PrettyPrinter
 A formatter for Bond parse trees. More...

Functions

uint32_t Bond::EncodeSizeAndType (uint32_t size, SignatureType type)
 Packs a size and SignatureType into a single encoded integer.
void Bond::DecodeSizeAndType (uint32_t sizeAndType, uint32_t &size, SignatureType &type)
 Unpacks an encoded size-and-type value.
PointerSize Bond::DecodePointerSize (uint16_t flags)
 Decodes pointer size information from CBO flags.
uint16_t Bond::EncodePointerSize (uint16_t flags, PointerSize pointerSize)
 Encodes pointer size information into CBO flags.
bool Bond::IsCBOFormatLoadable (uint32_t majorVersion, uint32_t minorVersion)
 Determines whether a CBO format version can be loaded.
bool Bond::IsCBOFormatSupported (uint32_t majorVersion, uint32_t minorVersion)
 Determines whether a CBO format version is fully supported.

Variables

constexpr StringView Bond::BOND_LIST_BLOB_ID {"List"}
 Four-character blob identifier used for list blobs in CBO data.
constexpr StringView Bond::BOND_FUNCTION_BLOB_ID {"Func"}
 Four-character blob identifier used for function blobs in CBO data.
constexpr StringView Bond::BOND_DATA_BLOB_ID {"Data"}
 Four-character blob identifier used for data blobs in CBO data.
constexpr size_t Bond::BOND_BLOB_ID_LENGTH = 4
 Number of bytes in a CBO blob identifier.

Detailed Description

These classes implement tools for querying, validating and debugging Bond parse trees and compiled code.

Function Documentation

◆ DecodePointerSize()

PointerSize Bond::DecodePointerSize ( uint16_t flags)
inline

Decodes pointer size information from CBO flags.

Parameters
flagsCBO header flags containing encoded pointer size information.
Returns
The decoded pointer size.

◆ DecodeSizeAndType()

void Bond::DecodeSizeAndType ( uint32_t sizeAndType,
uint32_t & size,
SignatureType & type )
inline

Unpacks an encoded size-and-type value.

Parameters
sizeAndTypePacked value previously produced by EncodeSizeAndType().
sizeOutput parameter receiving the decoded size.
typeOutput parameter receiving the decoded signature type.

◆ EncodePointerSize()

uint16_t Bond::EncodePointerSize ( uint16_t flags,
PointerSize pointerSize )
inline

Encodes pointer size information into CBO flags.

Parameters
flagsExisting CBO header flags.
pointerSizePointer size value to encode.
Returns
Updated flags containing the encoded pointer size bit.

◆ EncodeSizeAndType()

uint32_t Bond::EncodeSizeAndType ( uint32_t size,
SignatureType type )
inline

Packs a size and SignatureType into a single encoded integer.

Parameters
sizeThe size value to encode.
typeThe signature type to encode.
Returns
A packed integer containing both values.

◆ IsCBOFormatLoadable()

bool Bond::IsCBOFormatLoadable ( uint32_t majorVersion,
uint32_t minorVersion )
inline

Determines whether a CBO format version can be loaded.

Parameters
majorVersionMajor version number of the CBO format.
minorVersionMinor version number of the CBO format.
Returns
True if the major version is within the supported loadable range.

◆ IsCBOFormatSupported()

bool Bond::IsCBOFormatSupported ( uint32_t majorVersion,
uint32_t minorVersion )
inline

Determines whether a CBO format version is fully supported.

Parameters
majorVersionMajor version number of the CBO format.
minorVersionMinor version number of the CBO format.
Returns
True if the major/minor version pair is within the supported range.

Variable Documentation

◆ BOND_BLOB_ID_LENGTH

size_t Bond::BOND_BLOB_ID_LENGTH = 4
constexpr

Number of bytes in a CBO blob identifier.

◆ BOND_DATA_BLOB_ID

StringView Bond::BOND_DATA_BLOB_ID {"Data"}
constexpr

Four-character blob identifier used for data blobs in CBO data.

◆ BOND_FUNCTION_BLOB_ID

StringView Bond::BOND_FUNCTION_BLOB_ID {"Func"}
constexpr

Four-character blob identifier used for function blobs in CBO data.

◆ BOND_LIST_BLOB_ID

StringView Bond::BOND_LIST_BLOB_ID {"List"}
constexpr

Four-character blob identifier used for list blobs in CBO data.