Minimal stream for overwriting and/or appending to an existing byte vector.
More...
#include <streams.h>
|
| 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) More...
|
|
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) |
|
Minimal stream for overwriting and/or appending to an existing byte vector.
The referenced vector will grow as necessary.
Definition at line 65 of file streams.h.
◆ CVectorWriter() [1/2]
CVectorWriter::CVectorWriter |
( |
int |
nTypeIn, |
|
|
int |
nVersionIn, |
|
|
std::vector< uint8_t > & |
vchDataIn, |
|
|
size_t |
nPosIn |
|
) |
| |
|
inline |
- Parameters
-
[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(). |
Definition at line 75 of file streams.h.
◆ CVectorWriter() [2/2]
template<typename... Args>
CVectorWriter::CVectorWriter |
( |
int |
nTypeIn, |
|
|
int |
nVersionIn, |
|
|
std::vector< uint8_t > & |
vchDataIn, |
|
|
size_t |
nPosIn, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
(other params same as above)
- Parameters
-
[in] | args | A list of items to serialize starting at nPosIn. |
Definition at line 88 of file streams.h.
◆ GetType()
int CVectorWriter::GetType |
( |
| ) |
const |
|
inline |
◆ GetVersion()
int CVectorWriter::GetVersion |
( |
| ) |
const |
|
inline |
◆ operator<<()
◆ seek()
void CVectorWriter::seek |
( |
size_t |
nSize | ) |
|
|
inline |
◆ write()
void CVectorWriter::write |
( |
Span< const std::byte > |
src | ) |
|
|
inline |
◆ nPos
size_t CVectorWriter::nPos |
|
private |
◆ nType
const int CVectorWriter::nType |
|
private |
◆ nVersion
const int CVectorWriter::nVersion |
|
private |
◆ vchData
std::vector<uint8_t>& CVectorWriter::vchData |
|
private |
The documentation for this class was generated from the following file: