Dash Core Source Documentation (0.16.0.1)
Find detailed information regarding the Dash Core source code.
Double ended buffer combining vector and stream-like interfaces. More...
#include <streams.h>
Public Types | |
typedef vector_type::allocator_type | allocator_type |
typedef vector_type::size_type | size_type |
typedef vector_type::difference_type | difference_type |
typedef vector_type::reference | reference |
typedef vector_type::const_reference | const_reference |
typedef vector_type::value_type | value_type |
typedef vector_type::iterator | iterator |
typedef vector_type::const_iterator | const_iterator |
typedef vector_type::reverse_iterator | reverse_iterator |
Public Member Functions | |
CDataStream (int nTypeIn, int nVersionIn) | |
CDataStream (const_iterator pbegin, const_iterator pend, int nTypeIn, int nVersionIn) | |
CDataStream (const char *pbegin, const char *pend, int nTypeIn, int nVersionIn) | |
CDataStream (const vector_type &vchIn, int nTypeIn, int nVersionIn) | |
CDataStream (const std::vector< char > &vchIn, int nTypeIn, int nVersionIn) | |
CDataStream (const std::vector< unsigned char > &vchIn, int nTypeIn, int nVersionIn) | |
template<typename... Args> | |
CDataStream (int nTypeIn, int nVersionIn, Args &&... args) | |
void | Init (int nTypeIn, int nVersionIn) |
CDataStream & | operator+= (const CDataStream &b) |
std::string | str () const |
const_iterator | begin () const |
iterator | begin () |
const_iterator | end () const |
iterator | end () |
size_type | size () const |
bool | empty () const |
void | resize (size_type n, value_type c=0) |
void | reserve (size_type n) |
const_reference | operator[] (size_type pos) const |
reference | operator[] (size_type pos) |
void | clear () |
iterator | insert (iterator it, const char x=char()) |
void | insert (iterator it, size_type n, const char x) |
value_type * | data () |
const value_type * | data () const |
void | insert (iterator it, std::vector< char >::const_iterator first, std::vector< char >::const_iterator last) |
void | insert (iterator it, const char *first, const char *last) |
iterator | erase (iterator it) |
iterator | erase (iterator first, iterator last) |
void | Compact () |
bool | Rewind (size_type n) |
bool | eof () const |
CDataStream * | rdbuf () |
int | in_avail () const |
void | SetType (int n) |
int | GetType () const |
void | SetVersion (int n) |
int | GetVersion () const |
void | read (char *pch, size_t nSize) |
void | ignore (int nSize) |
void | write (const char *pch, size_t nSize) |
template<typename Stream > | |
void | Serialize (Stream &s) const |
template<typename T > | |
CDataStream & | operator<< (const T &obj) |
template<typename T > | |
CDataStream & | operator>> (T &obj) |
void | GetAndClear (CSerializeData &d) |
void | Xor (const std::vector< unsigned char > &key) |
XOR the contents of this stream with a certain key. More... | |
Protected Types | |
typedef CSerializeData | vector_type |
Protected Attributes | |
vector_type | vch |
unsigned int | nReadPos |
int | nType |
int | nVersion |
Friends | |
CDataStream | operator+ (const CDataStream &a, const CDataStream &b) |
Detailed Description
Double ended buffer combining vector and stream-like interfaces.
and << read and write unformatted data using the above serialization templates.
Fills with data in linear time; some stringstream implementations take N^2 time.
Member Typedef Documentation
◆ allocator_type
typedef vector_type::allocator_type CDataStream::allocator_type |
◆ const_iterator
typedef vector_type::const_iterator CDataStream::const_iterator |
◆ const_reference
typedef vector_type::const_reference CDataStream::const_reference |
◆ difference_type
typedef vector_type::difference_type CDataStream::difference_type |
◆ iterator
typedef vector_type::iterator CDataStream::iterator |
◆ reference
typedef vector_type::reference CDataStream::reference |
◆ reverse_iterator
typedef vector_type::reverse_iterator CDataStream::reverse_iterator |
◆ size_type
typedef vector_type::size_type CDataStream::size_type |
◆ value_type
typedef vector_type::value_type CDataStream::value_type |
◆ vector_type
|
protected |
Constructor & Destructor Documentation
◆ CDataStream() [1/7]
|
inlineexplicit |
◆ CDataStream() [2/7]
|
inline |
◆ CDataStream() [3/7]
|
inline |
◆ CDataStream() [4/7]
|
inline |
◆ CDataStream() [5/7]
|
inline |
◆ CDataStream() [6/7]
|
inline |
◆ CDataStream() [7/7]
|
inline |
Definition at line 155 of file streams.h.
References Init(), and SerializeMany().
Member Function Documentation
◆ begin() [1/2]
|
inline |
Definition at line 190 of file streams.h.
Referenced by CBloomFilter::contains(), EncodeHexTx(), CBLSIESMultiRecipientObjects< Object >::Encrypt(), CBlockHeaderAndShortTxIDs::FillShortTxIDSelector(), GetAndClear(), getblock(), getblockheader(), getblockheaders(), gettxoutproof(), CBloomFilter::insert(), CZMQPublishRawBlockNotifier::NotifyBlock(), CZMQPublishRawChainLockNotifier::NotifyChainLock(), CZMQPublishRawChainLockSigNotifier::NotifyChainLock(), operator+=(), llmq::CDKGSessionManager::ProcessMessage(), CFlatDB< T >::Read(), rest_block(), rest_getutxos(), rest_headers(), rest_tx(), SetTxPayload(), str(), CSimplifiedMNListDiff::ToJson(), and CFlatDB< T >::Write().
◆ begin() [2/2]
|
inline |
◆ clear()
|
inline |
Definition at line 200 of file streams.h.
Referenced by CBLSIESMultiRecipientObjects< Object >::Encrypt(), CDBBatch::Erase(), GetAndClear(), BerkeleyBatch::ReadAtCursor(), BerkeleyBatch::Rewrite(), and CDBBatch::Write().
◆ Compact()
|
inline |
◆ data() [1/2]
|
inline |
Definition at line 203 of file streams.h.
Referenced by CDBWrapper::CompactRange(), CBLSIESEncryptedBlob::Decrypt(), CBLSIESEncryptedObject< Object >::Encrypt(), CDBBatch::Erase(), BerkeleyBatch::Erase(), CDBWrapper::EstimateSize(), BerkeleyBatch::Exists(), CDBWrapper::Exists(), GetCrashInfoStrNoDebugInfo(), CWallet::IsFullyMixed(), CDBTransaction< Parent, CommitTarget >::DataStreamCmp::less(), BerkeleyBatch::Read(), BerkeleyBatch::ReadAtCursor(), CDBWrapper::ReadDataStream(), BerkeleyBatch::Rewrite(), CDBIterator::Seek(), WalletModel::sendCoins(), CDBBatch::Write(), and BerkeleyBatch::Write().
◆ data() [2/2]
|
inline |
◆ empty()
|
inline |
Definition at line 195 of file streams.h.
Referenced by DecodeHexTx(), GetTxPayload(), ProcessMessage(), and ReadKeyValue().
◆ end() [1/2]
|
inline |
Definition at line 192 of file streams.h.
References vch.
Referenced by CBloomFilter::contains(), EncodeHexTx(), CBLSIESMultiRecipientObjects< Object >::Encrypt(), CBlockHeaderAndShortTxIDs::FillShortTxIDSelector(), GetAndClear(), getblock(), getblockheader(), getblockheaders(), gettxoutproof(), CBloomFilter::insert(), operator+=(), CFlatDB< T >::Read(), rest_block(), rest_getutxos(), rest_headers(), rest_tx(), SetTxPayload(), str(), CSimplifiedMNListDiff::ToJson(), and CFlatDB< T >::Write().
◆ end() [2/2]
◆ eof()
◆ erase() [1/2]
◆ erase() [2/2]
◆ GetAndClear()
|
inline |
◆ GetType()
|
inline |
◆ GetVersion()
|
inline |
◆ ignore()
|
inline |
◆ in_avail()
|
inline |
◆ Init()
|
inline |
◆ insert() [1/4]
Definition at line 201 of file streams.h.
References vch.
Referenced by CAccountingEntry::SerializationOp().
◆ insert() [2/4]
◆ insert() [3/4]
|
inline |
◆ insert() [4/4]
|
inline |
◆ operator+=()
|
inline |
◆ operator<<()
|
inline |
Definition at line 351 of file streams.h.
References Serialize().
◆ operator>>()
|
inline |
Definition at line 359 of file streams.h.
References Unserialize().
◆ operator[]() [1/2]
|
inline |
◆ operator[]() [2/2]
◆ rdbuf()
|
inline |
◆ read()
|
inline |
◆ reserve()
|
inline |
Definition at line 197 of file streams.h.
Referenced by CDBWrapper::CompactRange(), CDBBatch::Erase(), BerkeleyBatch::Erase(), CDBWrapper::EstimateSize(), BerkeleyBatch::Exists(), CDBWrapper::Exists(), CDBTransaction< RootTransaction, RootTransaction >::KeyToDataStream(), ProcessGetData(), BerkeleyBatch::Read(), CDBWrapper::Read(), CDBWrapper::ReadDataStream(), CDBIterator::Seek(), CDBBatch::Write(), and BerkeleyBatch::Write().
◆ resize()
|
inline |
Definition at line 196 of file streams.h.
Referenced by CNetMessage::CNetMessage(), and CNetMessage::readData().
◆ Rewind()
|
inline |
Definition at line 277 of file streams.h.
References nReadPos.
Referenced by DeserializeAndCheckBlockTest(), and DeserializeBlockTest().
◆ Serialize()
|
inline |
◆ SetType()
|
inline |
Definition at line 294 of file streams.h.
References nType.
Referenced by BerkeleyBatch::ReadAtCursor().
◆ SetVersion()
|
inline |
Definition at line 296 of file streams.h.
References nVersion.
Referenced by CNetMessage::SetVersion().
◆ size()
|
inline |
Definition at line 194 of file streams.h.
Referenced by CDBWrapper::CompactRange(), CBLSIESEncryptedObject< Object >::Encrypt(), eof(), CDBBatch::Erase(), BerkeleyBatch::Erase(), CDBTransaction< RootTransaction, RootTransaction >::Erase(), CDBWrapper::EstimateSize(), BerkeleyBatch::Exists(), CDBWrapper::Exists(), GetCrashInfoStrNoDebugInfo(), in_avail(), CWallet::IsFullyMixed(), CDBTransaction< Parent, CommitTarget >::DataStreamCmp::less(), CZMQPublishRawBlockNotifier::NotifyBlock(), CZMQPublishRawChainLockNotifier::NotifyChainLock(), CZMQPublishRawChainLockSigNotifier::NotifyChainLock(), llmq::CDKGSessionManager::ProcessMessage(), llmq::CSigSharesManager::ProcessMessage(), ProcessMessage(), BerkeleyBatch::Read(), BerkeleyBatch::ReadAtCursor(), CNetMessage::readData(), CDBWrapper::ReadDataStream(), llmq::CRecoveredSigsDb::RemoveRecoveredSig(), BerkeleyBatch::Rewrite(), CDBIterator::Seek(), WalletModel::sendCoins(), CDBBatch::Write(), BerkeleyBatch::Write(), CDBTransaction< RootTransaction, RootTransaction >::Write(), and Xor().
◆ str()
|
inline |
Definition at line 181 of file streams.h.
References begin(), and end().
Referenced by RecentRequestsTableModel::addNewRequest(), rest_block(), rest_getutxos(), rest_headers(), and rest_tx().
◆ write()
|
inline |
Definition at line 336 of file streams.h.
References vch.
Referenced by DeserializeAndCheckBlockTest(), DeserializeBlockTest(), and BerkeleyBatch::ReadAtCursor().
◆ Xor()
|
inline |
XOR the contents of this stream with a certain key.
- Parameters
-
[in] key The key used to XOR the data in this stream.
Definition at line 376 of file streams.h.
Referenced by CDBIterator::GetValue(), CDBWrapper::ReadDataStream(), and CDBBatch::Write().
Friends And Related Function Documentation
◆ operator+
|
friend |
Member Data Documentation
◆ nReadPos
|
protected |
◆ nType
|
protected |
◆ nVersion
|
protected |
Definition at line 111 of file streams.h.
Referenced by GetVersion(), Init(), and SetVersion().
◆ vch
|
protected |
The documentation for this class was generated from the following file:
- src/streams.h