Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
streams.h
Go to the documentation of this file.
37 * @param[in] nPosIn Starting position. Vector index where writes should start. The vector will initially
40 CVectorWriter(int nTypeIn, int nVersionIn, std::vector<unsigned char>& vchDataIn, size_t nPosIn) : nType(nTypeIn), nVersion(nVersionIn), vchData(vchDataIn), nPos(nPosIn)
50 CVectorWriter(int nTypeIn, int nVersionIn, std::vector<unsigned char>& vchDataIn, size_t nPosIn, Args&&... args) : CVectorWriter(nTypeIn, nVersionIn, vchDataIn, nPosIn)
62 vchData.insert(vchData.end(), reinterpret_cast<const unsigned char*>(pch) + nOverwrite, reinterpret_cast<const unsigned char*>(pch) + nSize);
129 CDataStream(const_iterator pbegin, const_iterator pend, int nTypeIn, int nVersionIn) : vch(pbegin, pend)
134 CDataStream(const char* pbegin, const char* pend, int nTypeIn, int nVersionIn) : vch(pbegin, pend)
139 CDataStream(const vector_type& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
144 CDataStream(const std::vector<char>& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
149 CDataStream(const std::vector<unsigned char>& vchIn, int nTypeIn, int nVersionIn) : vch(vchIn.begin(), vchIn.end())
206 void insert(iterator it, std::vector<char>::const_iterator first, std::vector<char>::const_iterator last)
468 throw std::ios_base::failure(feof(file) ? "CAutoFile::read: end of file" : "CAutoFile::read: fread failed");
479 throw std::ios_base::failure(feof(file) ? "CAutoFile::ignore: end of file" : "CAutoFile::read: fread failed");
544 throw std::ios_base::failure(feof(src) ? "CBufferedFile::Fill: end of file" : "CBufferedFile::Fill: fread failed");
552 CBufferedFile(FILE *fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nTypeIn, int nVersionIn) :
553 nType(nTypeIn), nVersion(nVersionIn), nSrcPos(0), nReadPos(0), nReadLimit((uint64_t)(-1)), nRewind(nRewindIn), vchBuf(nBufSize, 0)
CDataStream(const_iterator pbegin, const_iterator pend, int nTypeIn, int nVersionIn)
Definition: streams.h:129
CDataStream(const std::vector< unsigned char > &vchIn, int nTypeIn, int nVersionIn)
Definition: streams.h:149
CDataStream(const vector_type &vchIn, int nTypeIn, int nVersionIn)
Definition: streams.h:139
void Xor(const std::vector< unsigned char > &key)
XOR the contents of this stream with a certain key.
Definition: streams.h:376
Double ended buffer combining vector and stream-like interfaces.
Definition: streams.h:103
vector_type::reverse_iterator reverse_iterator
Definition: streams.h:122
friend CDataStream operator+(const CDataStream &a, const CDataStream &b)
Definition: streams.h:174
void insert(iterator it, std::vector< char >::const_iterator first, std::vector< char >::const_iterator last)
Definition: streams.h:206
bool IsNull() const
Return true if the wrapped FILE* is nullptr, false otherwise.
Definition: streams.h:455
CVectorWriter(int nTypeIn, int nVersionIn, std::vector< unsigned char > &vchDataIn, size_t nPosIn, Args &&... args)
Definition: streams.h:50
CDataStream(int nTypeIn, int nVersionIn, Args &&... args)
Definition: streams.h:155
CDataStream(const std::vector< char > &vchIn, int nTypeIn, int nVersionIn)
Definition: streams.h:144
CBufferedFile(FILE *fileIn, uint64_t nBufSize, uint64_t nRewindIn, int nTypeIn, int nVersionIn)
Definition: streams.h:552
CDataStream(const char *pbegin, const char *pend, int nTypeIn, int nVersionIn)
Definition: streams.h:134
CAutoFile & operator=(const CAutoFile &)=delete
void insert(iterator it, const char *first, const char *last)
Definition: streams.h:220
std::vector< char, zero_after_free_allocator< char > > CSerializeData
Definition: zeroafterfree.h:46
Definition: streams.h:29
Non-refcounted RAII wrapper around a FILE* that implements a ring buffer to deserialize from...
Definition: streams.h:519
CBufferedFile & operator=(const CBufferedFile &)=delete
CVectorWriter(int nTypeIn, int nVersionIn, std::vector< unsigned char > &vchDataIn, size_t nPosIn)
Definition: streams.h:40