Bitcoin ABC 0.30.5
P2P Digital Currency
|
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 (Span< const uint8_t > sp, int type, int version) | |
CDataStream (Span< const value_type > sp, int nTypeIn, int nVersionIn) | |
template<typename... Args> | |
CDataStream (int nTypeIn, int nVersionIn, Args &&...args) | |
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=value_type{}) |
void | reserve (size_type n) |
const_reference | operator[] (size_type pos) const |
reference | operator[] (size_type pos) |
void | clear () |
iterator | insert (iterator it, const value_type x) |
void | insert (iterator it, size_type n, const value_type x) |
value_type * | data () |
const value_type * | data () const |
void | insert (iterator it, std::vector< value_type >::const_iterator first, std::vector< value_type >::const_iterator last) |
void | insert (iterator it, const value_type *first, const value_type *last) |
iterator | erase (iterator it) |
iterator | erase (iterator first, iterator last) |
void | Compact () |
bool | Rewind (std::optional< size_type > n=std::nullopt) |
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 (Span< value_type > dst) |
void | ignore (int nSize) |
void | write (Span< const value_type > src) |
template<typename Stream > | |
void | Serialize (Stream &s) const |
template<typename T > | |
CDataStream & | operator<< (const T &obj) |
template<typename T > | |
CDataStream & | operator>> (T &&obj) |
void | Xor (const std::vector< uint8_t > &key) |
XOR the contents of this stream with a certain key. More... | |
Protected Types | |
using | vector_type = SerializeData |
Protected Attributes | |
vector_type | vch |
unsigned int | nReadPos {0} |
int | nType |
int | nVersion |
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 |
|
inlineexplicit |
|
inlineexplicit |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |