Bitcoin ABC 0.26.3
P2P Digital Currency
|
Minimal stream for overwriting and/or appending to an existing byte vector. More...
#include <streams.h>
Public Member Functions | |
CVectorWriter (int nTypeIn, int nVersionIn, std::vector< uint8_t > &vchDataIn, size_t nPosIn) | |
template<typename... Args> | |
CVectorWriter (int nTypeIn, int nVersionIn, std::vector< uint8_t > &vchDataIn, size_t nPosIn, Args &&...args) | |
(other params same as above) | |
void | write (Span< const std::byte > src) |
template<typename T > | |
CVectorWriter & | operator<< (const T &obj) |
int | GetVersion () const |
int | GetType () const |
void | seek (size_t nSize) |
Private Attributes | |
const int | nType |
const int | nVersion |
std::vector< uint8_t > & | vchData |
size_t | nPos |
Minimal stream for overwriting and/or appending to an existing byte vector.
The referenced vector will grow as necessary.
|
inline |
[in] | nTypeIn | Serialization Type |
[in] | nVersionIn | Serialization Version (including any flags) |
[in] | vchDataIn | Referenced byte vector to overwrite/append |
[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(). |
|
inline |