Constructors

Synopses

Declared in <streams.h>

Construct a writer that overwrites and/or appends to an existing byte vector.

VectorWriter(
    std::vector<unsigned char>& vchDataIn,
    size_t nPosIn);

Construct a writer and immediately serialize the given items into the vector.

template<typename... Args>
VectorWriter(
    std::vector<unsigned char>& vchDataIn,
    size_t nPosIn,
    Args&&... args);

Parameters

Name

Description

vchDataIn

Referenced byte vector to overwrite/append.

nPosIn

Starting position; vector index where writes should start. The vector will initially grow as necessary to max(nPosIn, vec.size()). So to append, use vec.size().

args

Items to serialize into the vector starting at nPosIn.

Created with MrDocs