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

A disassembler for CBO files. More...

#include <bond/tools/disassembler.h>

Public Member Functions

 Disassembler (Allocator &allocator)
 Constructs a Disassembler object.
 ~Disassembler ()
 Destroys a Disassembler object.
void Disassemble (const void *byteCode, size_t length, OutputStream &outputStream)
 Decodes the CBO data in the given buffer and writes disassembled output.
void Disassemble (InputStream &cboStream, OutputStream &outputStream)
 Reads CBO data from the given stream, starting at its current position, and writes disassembled output.
Disassembler & operator= (const Disassembler &other)=delete

Detailed Description

A disassembler for CBO files.

The Disassembler decodes CBO data and writes a human-readable representation of its contents, including the bytecode of its functions, to an OutputStream. A single Disassembler can be reused to disassemble many CBO buffers or streams.

See also
InputStream, OutputStream

Constructor & Destructor Documentation

◆ Disassembler()

Bond::Disassembler::Disassembler ( Allocator & allocator)
inlineexplicit

Constructs a Disassembler object.

Parameters
allocatorThe memory allocator used for temporary allocations during disassembly.

◆ ~Disassembler()

Bond::Disassembler::~Disassembler ( )
inline

Destroys a Disassembler object.

Member Function Documentation

◆ Disassemble() [1/2]

void Bond::Disassembler::Disassemble ( const void * byteCode,
size_t length,
OutputStream & outputStream )

Decodes the CBO data in the given buffer and writes disassembled output.

The data is first validated with a CboValidator, which throws a Bond::Exception if it is invalid.

Parameters
byteCodePointer to the start of the CBO data.
lengthThe number of bytes of CBO data.
outputStreamStream where the disassembled output is written.

◆ Disassemble() [2/2]

void Bond::Disassembler::Disassemble ( InputStream & cboStream,
OutputStream & outputStream )

Reads CBO data from the given stream, starting at its current position, and writes disassembled output.

The data is first validated with a CboValidator, which throws a Bond::Exception if it is invalid.

Parameters
cboStreamInput stream containing CBO data to disassemble.
outputStreamStream where the disassembled output is written.

◆ operator=()

Disassembler & Bond::Disassembler::operator= ( const Disassembler & other)
delete

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