asmjit::CodeBuffer Struct Reference

Code or data buffer.

Public Members

Public Types

Member Functions

Overloaded Operators
Accessors
Iterators

Member Enumeration Documentation

CodeBuffer::Flags : uint32_tenum

Code buffer flags.

ConstantDescription
kFlagIsExternal 

Buffer is external (not allocated by asmjit).

kFlagIsFixed 

Buffer is fixed (cannot be reallocated).

Member Function Documentation

uint8_t& CodeBuffer::operator[](size_t index)noexcept[1/2]

Returns a referebce to the byte at the given index.

const uint8_t& CodeBuffer::operator[](size_t index) constnoexcept[2/2]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

uint32_t CodeBuffer::flags() constnoexcept

Returns code buffer flags, see Flags.

bool CodeBuffer::hasFlag(uint32_t flag) constnoexcept

Tests whether the code buffer has the given flag set.

bool CodeBuffer::isFixed() constnoexcept

Tests whether this code buffer has a fixed size.

Fixed size means that the code buffer is fixed and cannot grow.

bool CodeBuffer::isExternal() constnoexcept

Tests whether the data in this code buffer is external.

External data can only be provided by users, it's never used by AsmJit.

bool CodeBuffer::isAllocated() constnoexcept

Tests whether the data in this code buffer is allocated (non-null).

bool CodeBuffer::empty() constnoexcept

Tests whether the code buffer is empty.

size_t CodeBuffer::size() constnoexcept

Returns the size of the data.

size_t CodeBuffer::capacity() constnoexcept

Returns the capacity of the data.

uint8_t* CodeBuffer::data()noexcept[1/2]

Returns the pointer to the data the buffer references.

const uint8_t* CodeBuffer::data() constnoexcept[2/2]

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Member Data Documentation

uint8_t* CodeBuffer::_data

The content of the buffer (data).

size_t CodeBuffer::_size

Number of bytes of data used.

size_t CodeBuffer::_capacity

Buffer capacity (in bytes).

uint32_t CodeBuffer::_flags

Buffer flags.