![]() |
Dash Core
0.12.2.1
P2P Digital Currency
|
#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) |
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 () |
void | SetType (int n) |
int | GetType () |
void | SetVersion (int n) |
int | GetVersion () |
void | ReadVersion () |
void | WriteVersion () |
CDataStream & | read (char *pch, size_t nSize) |
CDataStream & | ignore (int nSize) |
CDataStream & | write (const char *pch, size_t nSize) |
template<typename Stream > | |
void | Serialize (Stream &s, int nType, int nVersion) const |
template<typename T > | |
unsigned int | GetSerializeSize (const T &obj) |
template<typename T > | |
CDataStream & | operator<< (const T &obj) |
template<typename T > | |
CDataStream & | operator>> (T &obj) |
void | GetAndClear (CSerializeData &data) |
void | Xor (const std::vector< unsigned char > &key) |
Public Attributes | |
int | nType |
int | nVersion |
Protected Types | |
typedef CSerializeData | vector_type |
Protected Attributes | |
vector_type | vch |
unsigned int | nReadPos |
Friends | |
CDataStream | operator+ (const CDataStream &a, const CDataStream &b) |
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.
typedef vector_type::allocator_type CDataStream::allocator_type |
typedef vector_type::const_iterator CDataStream::const_iterator |
typedef vector_type::const_reference CDataStream::const_reference |
typedef vector_type::difference_type CDataStream::difference_type |
typedef vector_type::iterator CDataStream::iterator |
typedef vector_type::reference CDataStream::reference |
typedef vector_type::reverse_iterator CDataStream::reverse_iterator |
typedef vector_type::size_type CDataStream::size_type |
typedef vector_type::value_type CDataStream::value_type |
|
protected |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 118 of file streams.h.
Referenced by CBloomFilter::contains(), EncodeHexTx(), CConnman::EndMessage(), GetAndClear(), getblock(), getblockheader(), getblockheaders(), gettxoutproof(), CBloomFilter::insert(), masternodebroadcast(), CZMQPublishRawBlockNotifier::NotifyBlock(), operator+=(), ProcessMessages(), CConnman::PushMessage(), CFlatDB< T >::Read(), CAddrDB::Read(), CBanDB::Read(), rest_block(), rest_getutxos(), rest_headers(), rest_tx(), CAccountingEntry::SerializationOp(), CAlert::Sign(), str(), CFlatDB< T >::Write(), CAddrDB::Write(), and CBanDB::Write().
|
inline |
Definition at line 128 of file streams.h.
Referenced by GetAndClear(), CDB::ReadAtCursor(), and CDB::Rewrite().
|
inline |
Definition at line 123 of file streams.h.
Referenced by ProcessMessage(), CConnman::PushMessage(), ReadKeyValue(), and signrawtransaction().
|
inline |
Definition at line 120 of file streams.h.
Referenced by CBloomFilter::contains(), EncodeHexTx(), CConnman::EndMessage(), GetAndClear(), getblock(), getblockheader(), getblockheaders(), gettxoutproof(), CBloomFilter::insert(), masternodebroadcast(), operator+=(), CConnman::PushMessage(), CFlatDB< T >::Read(), CAddrDB::Read(), CBanDB::Read(), rest_block(), rest_getutxos(), rest_headers(), rest_tx(), CAccountingEntry::SerializationOp(), CAlert::Sign(), str(), CFlatDB< T >::Write(), CAddrDB::Write(), and CBanDB::Write().
|
inline |
|
inline |
Definition at line 280 of file streams.h.
Referenced by CDBBatch::Erase(), CDBWrapper::Exists(), CDBWrapper::Read(), CDBIterator::Seek(), and CDBBatch::Write().
|
inline |
|
inline |
Definition at line 218 of file streams.h.
Referenced by ProcessMessage().
|
inline |
Definition at line 89 of file streams.h.
Referenced by CDataStream().
Definition at line 129 of file streams.h.
Referenced by CAccountingEntry::SerializationOp().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Definition at line 125 of file streams.h.
Referenced by CDBBatch::Erase(), CDB::Erase(), CDB::Exists(), CDBWrapper::Exists(), ProcessGetData(), CDB::Read(), CDBWrapper::Read(), CConnman::RelayTransaction(), CDBIterator::Seek(), CDBBatch::Write(), and CDB::Write().
|
inline |
Definition at line 124 of file streams.h.
Referenced by CNetMessage::CNetMessage(), and CNetMessage::readData().
|
inline |
Definition at line 272 of file streams.h.
Referenced by operator<<().
|
inline |
Definition at line 220 of file streams.h.
Referenced by CDB::ReadAtCursor().
|
inline |
Definition at line 222 of file streams.h.
Referenced by CNetMessage::SetVersion().
|
inline |
Definition at line 122 of file streams.h.
Referenced by CConnman::EndMessage(), eof(), CDBBatch::Erase(), CDB::Erase(), CDB::Exists(), CDBWrapper::Exists(), in_avail(), CZMQPublishRawBlockNotifier::NotifyBlock(), ProcessMessage(), CConnman::PushMessage(), CDB::Read(), CDBWrapper::Read(), CDB::ReadAtCursor(), CNetMessage::readData(), CDB::Rewrite(), CDBIterator::Seek(), WalletModel::sendCoins(), CDBBatch::Write(), CDB::Write(), and Xor().
|
inline |
Definition at line 109 of file streams.h.
Referenced by RecentRequestsTableModel::addNewRequest(), rest_block(), rest_getutxos(), rest_headers(), rest_tx(), and CAccountingEntry::SerializationOp().
|
inline |
Definition at line 264 of file streams.h.
Referenced by CDB::ReadAtCursor().
|
inline |
XOR the contents of this stream with a certain key.
[in] | key | The key used to XOR the data in this stream. |
Definition at line 312 of file streams.h.
Referenced by CDBIterator::GetValue(), and CDBWrapper::Read().
|
friend |
|
protected |
int CDataStream::nType |
Definition at line 37 of file streams.h.
Referenced by CDataStream(), GetSerializeSize(), GetType(), Init(), operator<<(), operator>>(), and SetType().
int CDataStream::nVersion |
Definition at line 38 of file streams.h.
Referenced by CDataStream(), GetSerializeSize(), GetVersion(), Init(), operator<<(), operator>>(), ReadVersion(), SetVersion(), and WriteVersion().
|
protected |