MCPcopy Create free account
hub / github.com/ElementsProject/elements / CVectorWriter

Method CVectorWriter

src/streams.h:84–88  ·  view source on GitHub ↗

* @param[in] nTypeIn Serialization Type * @param[in] nVersionIn Serialization Version (including any flags) * @param[in] vchDataIn Referenced byte vector to overwrite/append * @param[in] 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(). */

Source from the content-addressed store, hash-verified

82 * grow as necessary to max(nPosIn, vec.size()). So to append, use vec.size().
83*/
84 CVectorWriter(int nTypeIn, int nVersionIn, std::vector<unsigned char>& vchDataIn, size_t nPosIn) : nType(nTypeIn), nVersion(nVersionIn), vchData(vchDataIn), nPos(nPosIn)
85 {
86 if(nPos > vchData.size())
87 vchData.resize(nPos);
88 }
89/*
90 * (other params same as above)
91 * @param[in] args A list of items to serialize starting at nPosIn.

Callers

nothing calls this directly

Calls 3

SerializeManyFunction · 0.85
sizeMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected