![]() |
Master Core
v0.0.9 - 2abfd2849db8ba7a83957c64eb976b406713c123
|
Double ended buffer combining vector and stream-like interfaces. More...
#include <serialize.h>
Collaboration diagram for CDataStream: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) | |
| 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) |
| void | setstate (short bits, const char *psz) |
| bool | eof () const |
| bool | fail () const |
| bool | good () const |
| void | clear (short n) |
| short | exceptions () |
| short | exceptions (short mask) |
| 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, int nSize) |
| CDataStream & | ignore (int nSize) |
| CDataStream & | write (const char *pch, int 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) |
Public Attributes | |
| int | nType |
| int | nVersion |
Protected Types | |
| typedef CSerializeData | vector_type |
Protected Attributes | |
| vector_type | vch |
| unsigned int | nReadPos |
| short | state |
| short | exceptmask |
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.
Definition at line 839 of file serialize.h.
| typedef vector_type::allocator_type CDataStream::allocator_type |
Definition at line 851 of file serialize.h.
| typedef vector_type::const_iterator CDataStream::const_iterator |
Definition at line 858 of file serialize.h.
| typedef vector_type::const_reference CDataStream::const_reference |
Definition at line 855 of file serialize.h.
| typedef vector_type::difference_type CDataStream::difference_type |
Definition at line 853 of file serialize.h.
| typedef vector_type::iterator CDataStream::iterator |
Definition at line 857 of file serialize.h.
| typedef vector_type::reference CDataStream::reference |
Definition at line 854 of file serialize.h.
| typedef vector_type::reverse_iterator CDataStream::reverse_iterator |
Definition at line 859 of file serialize.h.
| typedef vector_type::size_type CDataStream::size_type |
Definition at line 852 of file serialize.h.
| typedef vector_type::value_type CDataStream::value_type |
Definition at line 856 of file serialize.h.
|
protected |
Definition at line 842 of file serialize.h.
Definition at line 861 of file serialize.h.
References Init().
Here is the call graph for this function:
|
inline |
Definition at line 866 of file serialize.h.
References Init().
Here is the call graph for this function:
|
inline |
Definition at line 872 of file serialize.h.
References Init().
Here is the call graph for this function:
|
inline |
Definition at line 878 of file serialize.h.
References Init().
Here is the call graph for this function:Definition at line 883 of file serialize.h.
References Init().
Here is the call graph for this function:
|
inline |
Definition at line 888 of file serialize.h.
References Init().
Here is the call graph for this function:
|
inline |
Definition at line 924 of file serialize.h.
References nReadPos.
Referenced by mastercore::ClassB_send(), CBloomFilter::contains(), createrawtransaction(), CNode::EndMessage(), GetAndClear(), getblock(), getblocktemplate(), CAddrInfo::GetNewBucket(), getrawtransaction(), gettransaction(), CAddrInfo::GetTriedBucket(), SignVerifyMessageDialog::on_signMessageButton_SM_clicked(), SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked(), operator+=(), ProcessBlock(), ProcessMessages(), CAddrDB::Read(), signrawtransaction(), str(), and CAddrDB::Write().
Here is the caller graph for this function:
|
inline |
Definition at line 925 of file serialize.h.
References nReadPos.
|
inline |
Definition at line 934 of file serialize.h.
Referenced by CNode::AbortMessage(), GetAndClear(), CDB::ReadAtCursor(), and CDB::Rewrite().
Here is the caller graph for this function:
|
inline |
Definition at line 1032 of file serialize.h.
|
inline |
Definition at line 1003 of file serialize.h.
References nReadPos.
|
inline |
Definition at line 929 of file serialize.h.
References nReadPos.
Referenced by ProcessMessage(), ReadKeyValue(), signrawtransaction(), and ThreadSocketHandler().
Here is the caller graph for this function:
|
inline |
Definition at line 926 of file serialize.h.
Referenced by mastercore::ClassB_send(), CBloomFilter::contains(), createrawtransaction(), CNode::EndMessage(), GetAndClear(), getblock(), getblocktemplate(), CAddrInfo::GetNewBucket(), getrawtransaction(), gettransaction(), CAddrInfo::GetTriedBucket(), SignVerifyMessageDialog::on_signMessageButton_SM_clicked(), SignVerifyMessageDialog::on_verifyMessageButton_VM_clicked(), operator+=(), ProcessBlock(), CAddrDB::Read(), signrawtransaction(), str(), and CAddrDB::Write().
Here is the caller graph for this function:
|
inline |
Definition at line 927 of file serialize.h.
|
inline |
Definition at line 1029 of file serialize.h.
References size().
Referenced by good().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 966 of file serialize.h.
References nReadPos.
Definition at line 983 of file serialize.h.
References nReadPos.
|
inline |
Definition at line 1033 of file serialize.h.
References exceptmask.
|
inline |
Definition at line 1034 of file serialize.h.
References exceptmask, and setstate().
Here is the call graph for this function:
|
inline |
Definition at line 1030 of file serialize.h.
|
inline |
Definition at line 1124 of file serialize.h.
References begin(), clear(), and end().
Referenced by CNode::EndMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 1102 of file serialize.h.
References GetSerializeSize().
Referenced by CLevelDBBatch::Erase(), CLevelDBWrapper::Exists(), CLevelDBWrapper::Read(), and CLevelDBBatch::Write().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 1039 of file serialize.h.
References nType.
|
inline |
Definition at line 1041 of file serialize.h.
References nVersion.
|
inline |
Definition at line 1031 of file serialize.h.
References eof().
Here is the call graph for this function:
|
inline |
Definition at line 1068 of file serialize.h.
References setstate().
Here is the call graph for this function:
|
inline |
Definition at line 1036 of file serialize.h.
References size().
Referenced by ProcessMessage().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 893 of file serialize.h.
Referenced by CDataStream().
Here is the caller graph for this function:Definition at line 935 of file serialize.h.
Referenced by operator+=().
Here is the caller graph for this function:Definition at line 936 of file serialize.h.
|
inline |
Definition at line 938 of file serialize.h.
References memcpy(), and nReadPos.
Here is the call graph for this function:
|
inline |
Definition at line 952 of file serialize.h.
References memcpy(), and nReadPos.
Here is the call graph for this function:
|
inline |
Definition at line 902 of file serialize.h.
References begin(), end(), and insert().
Here is the call graph for this function:
|
inline |
Definition at line 1109 of file serialize.h.
References Serialize().
Here is the call graph for this function:
|
inline |
Definition at line 1117 of file serialize.h.
References Unserialize().
Here is the call graph for this function:
|
inline |
Definition at line 932 of file serialize.h.
References nReadPos.
Definition at line 933 of file serialize.h.
References nReadPos.
|
inline |
Definition at line 1035 of file serialize.h.
|
inline |
Definition at line 1045 of file serialize.h.
References memcpy(), nReadPos, and setstate().
Here is the call graph for this function:
|
inline |
Definition at line 1042 of file serialize.h.
References nVersion.
|
inline |
Definition at line 931 of file serialize.h.
Referenced by CLevelDBBatch::Erase(), CDB::Erase(), CLevelDBWrapper::Exists(), CDB::Exists(), ProcessGetData(), CLevelDBWrapper::Read(), CDB::Read(), RelayTransaction(), CLevelDBBatch::Write(), and CDB::Write().
Here is the caller graph for this function:
|
inline |
Definition at line 930 of file serialize.h.
Referenced by CNetMessage::CNetMessage().
Here is the caller graph for this function:
|
inline |
Definition at line 1009 of file serialize.h.
|
inline |
Definition at line 1094 of file serialize.h.
Referenced by operator<<().
Here is the caller graph for this function:
|
inline |
Definition at line 1022 of file serialize.h.
Referenced by exceptions(), ignore(), and read().
Here is the caller graph for this function:
|
inline |
Definition at line 1038 of file serialize.h.
Referenced by CDB::ReadAtCursor().
Here is the caller graph for this function:
|
inline |
Definition at line 1040 of file serialize.h.
Referenced by ProcessMessage(), and CNetMessage::SetVersion().
Here is the caller graph for this function:
|
inline |
Definition at line 928 of file serialize.h.
References nReadPos.
Referenced by CNode::BeginMessage(), CNode::EndMessage(), eof(), CLevelDBBatch::Erase(), CDB::Erase(), CLevelDBWrapper::Exists(), CDB::Exists(), CNode::GetTotalRecvSize(), in_avail(), ProcessMessage(), CLevelDBWrapper::Read(), CDB::Read(), CDB::ReadAtCursor(), CDB::Rewrite(), WalletModel::sendCoins(), CLevelDBBatch::Write(), and CDB::Write().
Here is the caller graph for this function:
|
inline |
Definition at line 915 of file serialize.h.
References begin(), and end().
Referenced by RecentRequestsTableModel::addNewRequest(), and CBlockTreeDB::LoadBlockIndexGuts().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 1085 of file serialize.h.
Referenced by CDB::ReadAtCursor().
Here is the caller graph for this function:
|
inline |
Definition at line 1043 of file serialize.h.
References nVersion.
|
friend |
Definition at line 908 of file serialize.h.
|
protected |
Definition at line 846 of file serialize.h.
Referenced by exceptions().
|
protected |
Definition at line 844 of file serialize.h.
Referenced by begin(), Compact(), empty(), erase(), insert(), operator[](), read(), and size().
| int CDataStream::nType |
Definition at line 848 of file serialize.h.
Referenced by GetType().
| int CDataStream::nVersion |
Definition at line 849 of file serialize.h.
Referenced by GetVersion(), ReadVersion(), and WriteVersion().
|
protected |
Definition at line 845 of file serialize.h.
|
protected |
Definition at line 843 of file serialize.h.
1.8.8