NPRPC docs

class Vector_Direct

C++

template <typename T> class Vector_Direct

Accessor for a vector<T> field while building or reading a message. Vector_Direct1 and Vector_Direct2 add element access.

include/nprpc/flat.hpp:390

Constructors

Vector_Direct<T>(flat_buffer &buffer, std::uint32_t offset)

The field at offset in buffer; created by generated code.

include/nprpc/flat.hpp:426

Methods

void length(size_t length) noexcept

Allocates length elements in the buffer, replacing the old ones. Accessors obtained earlier may be invalidated by the reallocation.

include/nprpc/flat.hpp:412

std::uint32_t offset() const noexcept

Byte offset of the field within the buffer.

include/nprpc/flat.hpp:423

std::uint32_t size() const noexcept

Number of elements.

include/nprpc/flat.hpp:409