Skip to content

AByteBufferView#

Acts like std::string_view but for AByteBuffer.

Header:#include <AUI/Common/AByteBufferView.h>
CMake:aui_link(my_target PUBLIC aui::core)

Detailed Description#

Note

don't use const reference of AByteBufferView. Passing by const reference forces compiler to use memory instead of registers.

Note

AByteBufferView is intended for const access to memory data. As a function argument, consider to use std::span<std::byte> instead for non-const access.

Public Methods#

at#


template<typename T >
const T& AByteBufferView::at(size_t byteIndex)

Gets value of specified type by byte index relative to the beginning of internal buffer.

Arguments
byteIndex
byte offset realtive to the beginning of internal buffer
Returns
data

Examples#

examples/7guis/cells/src/AST.cpp

7GUIs Cells - Spreadsheet processor (Excel).

                });
            }
        };
        auto out = std::make_unique<FunctionCall>();
        out->function = functions::predefined().at(expect<token::Identifier>().name.uppercase());
        mIterator++;
        expect<token::LPar>();
        mIterator++;

        for (;;) {