VectorWriter::VectorWriter

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);
» more...

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);
» more...

Parameters

NameDescription
vchDataInReferenced byte vector to overwrite/append.
nPosInStarting 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().
argsItems to serialize into the vector starting at nPosIn.