Fabcoin Core  0.16.2
P2P Digital Currency
Classes | Macros | Enumerations | Functions | Variables
serialize.h File Reference
#include <compat/endian.h>
#include <algorithm>
#include <assert.h>
#include <ios>
#include <limits>
#include <map>
#include <memory>
#include <set>
#include <stdint.h>
#include <string>
#include <string.h>
#include <utility>
#include <vector>
#include <prevector.h>
#include <uint256.h>
Include dependency graph for serialize.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  deserialize_type
 Dummy data type to identify deserializing constructors. More...
 
class  CFlatData
 Wrapper for serializing arrays and POD. More...
 
class  CVarInt< I >
 
class  CCompactSize
 
class  LimitedString< Limit >
 
struct  CSerActionSerialize
 Support for ADD_SERIALIZE_METHODS and READWRITE macro. More...
 
struct  CSerActionUnserialize
 
class  CSizeComputer
 

Macros

#define READWRITE(obj)   (::SerReadWrite(s, (obj), ser_action))
 
#define READWRITEMANY(...)   (::SerReadWriteMany(s, ser_action, __VA_ARGS__))
 
#define ADD_SERIALIZE_METHODS
 Implement three methods for serializable objects. More...
 
#define FLATDATA(obj)   REF(CFlatData((char*)&(obj), (char*)&(obj) + sizeof(obj)))
 
#define VARINT(obj)   REF(WrapVarInt(REF(obj)))
 
#define COMPACTSIZE(obj)   REF(CCompactSize(REF(obj)))
 
#define LIMITED_STRING(obj, n)   REF(LimitedString< n >(REF(obj)))
 

Enumerations

enum  { SER_NETWORK = (1 << 0), SER_DISK = (1 << 1), SER_GETHASH = (1 << 2) }
 

Functions

template<typename T >
TREF (const T &val)
 Used to bypass the rule against non-const reference to temporary where it makes sense with wrappers such as CFlatData or CTxDB. More...
 
template<typename T >
TNCONST_PTR (const T *val)
 Used to acquire a non-const pointer "this" to generate bodies of const serialization operations from a template. More...
 
template<typename Stream >
void ser_writedata8 (Stream &s, uint8_t obj)
 
template<typename Stream >
void ser_writedata16 (Stream &s, uint16_t obj)
 
template<typename Stream >
void ser_writedata32 (Stream &s, uint32_t obj)
 
template<typename Stream >
void ser_writedata32be (Stream &s, uint32_t obj)
 
template<typename Stream >
void ser_writedata64 (Stream &s, uint64_t obj)
 
template<typename Stream >
uint8_t ser_readdata8 (Stream &s)
 
template<typename Stream >
uint16_t ser_readdata16 (Stream &s)
 
template<typename Stream >
uint32_t ser_readdata32 (Stream &s)
 
template<typename Stream >
uint32_t ser_readdata32be (Stream &s)
 
template<typename Stream >
uint256 ser_readdata256 (Stream &s)
 
template<typename Stream >
uint64_t ser_readdata64 (Stream &s)
 
uint64_t ser_double_to_uint64 (double x)
 
uint32_t ser_float_to_uint32 (float x)
 
double ser_uint64_to_double (uint64_t y)
 
float ser_uint32_to_float (uint32_t y)
 
template<typename Stream >
void Serialize (Stream &s, char a)
 
template<typename Stream >
void Serialize (Stream &s, int8_t a)
 
template<typename Stream >
void Serialize (Stream &s, uint8_t a)
 
template<typename Stream >
void Serialize (Stream &s, int16_t a)
 
template<typename Stream >
void Serialize (Stream &s, uint16_t a)
 
template<typename Stream >
void Serialize (Stream &s, int32_t a)
 
template<typename Stream >
void Serialize (Stream &s, uint32_t a)
 
template<typename Stream >
void Serialize (Stream &s, int64_t a)
 
template<typename Stream >
void Serialize (Stream &s, uint64_t a)
 
template<typename Stream >
void Serialize (Stream &s, float a)
 
template<typename Stream >
void Serialize (Stream &s, double a)
 
template<typename Stream >
void Unserialize (Stream &s, char &a)
 
template<typename Stream >
void Unserialize (Stream &s, int8_t &a)
 
template<typename Stream >
void Unserialize (Stream &s, uint8_t &a)
 
template<typename Stream >
void Unserialize (Stream &s, int16_t &a)
 
template<typename Stream >
void Unserialize (Stream &s, uint16_t &a)
 
template<typename Stream >
void Unserialize (Stream &s, int32_t &a)
 
template<typename Stream >
void Unserialize (Stream &s, uint32_t &a)
 
template<typename Stream >
void Unserialize (Stream &s, int64_t &a)
 
template<typename Stream >
void Unserialize (Stream &s, uint64_t &a)
 
template<typename Stream >
void Unserialize (Stream &s, float &a)
 
template<typename Stream >
void Unserialize (Stream &s, double &a)
 
template<typename Stream >
void Serialize (Stream &s, bool a)
 
template<typename Stream >
void Unserialize (Stream &s, bool &a)
 
unsigned int GetSizeOfCompactSize (uint64_t nSize)
 Compact Size size < 253 – 1 byte size <= USHRT_MAX – 3 bytes (253 + 2 bytes) size <= UINT_MAX – 5 bytes (254 + 4 bytes) size > UINT_MAX – 9 bytes (255 + 8 bytes) More...
 
void WriteCompactSize (CSizeComputer &os, uint64_t nSize)
 
template<typename Stream >
void WriteCompactSize (Stream &os, uint64_t nSize)
 
template<typename Stream >
uint64_t ReadCompactSize (Stream &is)
 
template<typename Stream >
uint256 ReadUint256 (Stream &is)
 
template<typename I >
unsigned int GetSizeOfVarInt (I n)
 Variable-length integers: bytes are a MSB base-128 encoding of the number. More...
 
template<typename I >
void WriteVarInt (CSizeComputer &os, I n)
 
template<typename Stream , typename I >
void WriteVarInt (Stream &os, I n)
 
template<typename Stream , typename I >
I ReadVarInt (Stream &is)
 
template<typename I >
CVarInt< IWrapVarInt (I &n)
 
template<typename Stream , typename C >
void Serialize (Stream &os, const std::basic_string< C > &str)
 Forward declarations. More...
 
template<typename Stream , typename C >
void Unserialize (Stream &is, std::basic_string< C > &str)
 
template<typename Stream , unsigned int N, typename T >
void Serialize_impl (Stream &os, const prevector< N, T > &v, const unsigned char &)
 prevector prevectors of unsigned char are a special case and are intended to be serialized as a single opaque blob. More...
 
template<typename Stream , unsigned int N, typename T , typename V >
void Serialize_impl (Stream &os, const prevector< N, T > &v, const V &)
 
template<typename Stream , unsigned int N, typename T >
void Serialize (Stream &os, const prevector< N, T > &v)
 
template<typename Stream , unsigned int N, typename T >
void Unserialize_impl (Stream &is, prevector< N, T > &v, const unsigned char &)
 
template<typename Stream , unsigned int N, typename T , typename V >
void Unserialize_impl (Stream &is, prevector< N, T > &v, const V &)
 
template<typename Stream , unsigned int N, typename T >
void Unserialize (Stream &is, prevector< N, T > &v)
 
template<typename Stream , typename T , typename A >
void Serialize_impl (Stream &os, const std::vector< T, A > &v, const unsigned char &)
 vector vectors of unsigned char are a special case and are intended to be serialized as a single opaque blob. More...
 
template<typename Stream , typename T , typename A , typename V >
void Serialize_impl (Stream &os, const std::vector< T, A > &v, const V &)
 
template<typename Stream , typename T , typename A >
void Serialize (Stream &os, const std::vector< T, A > &v)
 
template<typename Stream , typename T , typename A >
void Unserialize_impl (Stream &is, std::vector< T, A > &v, const unsigned char &)
 
template<typename Stream , typename T , typename A , typename V >
void Unserialize_impl (Stream &is, std::vector< T, A > &v, const V &)
 
template<typename Stream , typename T , typename A >
void Unserialize (Stream &is, std::vector< T, A > &v)
 
template<typename Stream , typename K , typename T >
void Serialize (Stream &os, const std::pair< K, T > &item)
 pair More...
 
template<typename Stream , typename K , typename T >
void Unserialize (Stream &is, std::pair< K, T > &item)
 
template<typename Stream , typename K , typename T , typename Pred , typename A >
void Serialize (Stream &os, const std::map< K, T, Pred, A > &m)
 map More...
 
template<typename Stream , typename K , typename T , typename Pred , typename A >
void Unserialize (Stream &is, std::map< K, T, Pred, A > &m)
 
template<typename Stream , typename K , typename Pred , typename A >
void Serialize (Stream &os, const std::set< K, Pred, A > &m)
 set More...
 
template<typename Stream , typename K , typename Pred , typename A >
void Unserialize (Stream &is, std::set< K, Pred, A > &m)
 
template<typename Stream , typename T >
void Serialize (Stream &os, const std::shared_ptr< const T > &p)
 shared_ptr More...
 
template<typename Stream , typename T >
void Unserialize (Stream &os, std::shared_ptr< const T > &p)
 
template<typename Stream , typename T >
void Serialize (Stream &os, const std::unique_ptr< const T > &p)
 unique_ptr More...
 
template<typename Stream , typename T >
void Unserialize (Stream &os, std::unique_ptr< const T > &p)
 
template<typename Stream , typename T >
void Serialize (Stream &os, const T &a)
 If none of the specialized versions above matched, default to calling member function. More...
 
template<typename Stream , typename T >
void Unserialize (Stream &is, T &a)
 
template<typename Stream , typename T >
void SerReadWrite (Stream &s, const T &obj, CSerActionSerialize ser_action)
 
template<typename Stream , typename T >
void SerReadWrite (Stream &s, T &obj, CSerActionUnserialize ser_action)
 
template<typename Stream >
void SerializeMany (Stream &s)
 
template<typename Stream , typename Arg >
void SerializeMany (Stream &s, Arg &&arg)
 
template<typename Stream , typename Arg , typename... Args>
void SerializeMany (Stream &s, Arg &&arg, Args &&...args)
 
template<typename Stream >
void UnserializeMany (Stream &s)
 
template<typename Stream , typename Arg >
void UnserializeMany (Stream &s, Arg &arg)
 
template<typename Stream , typename Arg , typename... Args>
void UnserializeMany (Stream &s, Arg &arg, Args &...args)
 
template<typename Stream , typename... Args>
void SerReadWriteMany (Stream &s, CSerActionSerialize ser_action, Args &&...args)
 
template<typename Stream , typename... Args>
void SerReadWriteMany (Stream &s, CSerActionUnserialize ser_action, Args &...args)
 
template<typename T >
size_t GetSerializeSize (const T &t, int nType, int nVersion=0)
 
template<typename S , typename T >
size_t GetSerializeSize (const S &s, const T &t)
 

Variables

constexpr deserialize_type deserialize {}
 

Macro Definition Documentation

#define ADD_SERIALIZE_METHODS
Value:
template<typename Stream> \
void Serialize(Stream& s) const { \
NCONST_PTR(this)->SerializationOp(s, CSerActionSerialize()); \
} \
template<typename Stream> \
void Unserialize(Stream& s) { \
SerializationOp(s, CSerActionUnserialize()); \
}
void Serialize(Stream &s, char a)
Definition: serialize.h:198
Support for ADD_SERIALIZE_METHODS and READWRITE macro.
Definition: serialize.h:853
void Unserialize(Stream &s, char &a)
Definition: serialize.h:210
T * NCONST_PTR(const T *val)
Used to acquire a non-const pointer "this" to generate bodies of const serialization operations from ...
Definition: serialize.h:59

Implement three methods for serializable objects.

These are actually wrappers over "SerializationOp" template, which implements the body of each class' serialization code. Adding "ADD_SERIALIZE_METHODS" in the body of the class causes these wrappers to be added as members.

Definition at line 188 of file serialize.h.

#define COMPACTSIZE (   obj)    REF(CCompactSize(REF(obj)))

Definition at line 390 of file serialize.h.

#define FLATDATA (   obj)    REF(CFlatData((char*)&(obj), (char*)&(obj) + sizeof(obj)))

Definition at line 388 of file serialize.h.

#define LIMITED_STRING (   obj,
 
)    REF(LimitedString< n >(REF(obj)))

Definition at line 391 of file serialize.h.

#define READWRITE (   obj)    (::SerReadWrite(s, (obj), ser_action))

Definition at line 179 of file serialize.h.

#define READWRITEMANY (   ...)    (::SerReadWriteMany(s, ser_action, __VA_ARGS__))

Definition at line 180 of file serialize.h.

#define VARINT (   obj)    REF(WrapVarInt(REF(obj)))

Definition at line 389 of file serialize.h.

Enumeration Type Documentation

anonymous enum
Enumerator
SER_NETWORK 
SER_DISK 
SER_GETHASH 

Definition at line 171 of file serialize.h.

Function Documentation

template<typename T >
size_t GetSerializeSize ( const T t,
int  nType,
int  nVersion = 0 
)

Definition at line 989 of file serialize.h.

Here is the caller graph for this function:

template<typename S , typename T >
size_t GetSerializeSize ( const S s,
const T t 
)

Definition at line 995 of file serialize.h.

unsigned int GetSizeOfCompactSize ( uint64_t  nSize)
inline

Compact Size size < 253 – 1 byte size <= USHRT_MAX – 3 bytes (253 + 2 bytes) size <= UINT_MAX – 5 bytes (254 + 4 bytes) size > UINT_MAX – 9 bytes (255 + 8 bytes)

Definition at line 237 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename I >
unsigned int GetSizeOfVarInt ( I  n)
inline

Variable-length integers: bytes are a MSB base-128 encoding of the number.

The high bit in each byte signifies whether another digit follows. To make sure the encoding is one-to-one, one is subtracted from all but the last digit. Thus, the byte sequence a[] with length len, where all but the last byte has bit 128 set, encodes the number:

(a[len-1] & 0x7F) + sum(i=1..len-1, 128^i*((a[len-i-1] & 0x7F)+1))

Properties:

  • Very small (0-127: 1 byte, 128-16511: 2 bytes, 16512-2113663: 3 bytes)
  • Every integer has exactly one encoding
  • Encoding does not depend on size of original integer type
  • No redundancy: every (infinite) byte sequence corresponds to a list of encoded integers.

0: [0x00] 256: [0x81 0x00] 1: [0x01] 16383: [0xFE 0x7F] 127: [0x7F] 16384: [0xFF 0x00] 128: [0x80 0x00] 16511: [0xFF 0x7F] 255: [0x80 0x7F] 65535: [0x82 0xFE 0x7F] 2^32: [0x8E 0xFE 0xFE 0xFF 0x00]

Definition at line 335 of file serialize.h.

Here is the call graph for this function:

template<typename T >
T* NCONST_PTR ( const T val)
inline

Used to acquire a non-const pointer "this" to generate bodies of const serialization operations from a template.

Definition at line 59 of file serialize.h.

template<typename Stream >
uint64_t ReadCompactSize ( Stream &  is)

Definition at line 273 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
uint256 ReadUint256 ( Stream &  is)

Definition at line 305 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename I >
I ReadVarInt ( Stream &  is)

Definition at line 368 of file serialize.h.

Here is the call graph for this function:

template<typename T >
T& REF ( const T val)
inline

Used to bypass the rule against non-const reference to temporary where it makes sense with wrappers such as CFlatData or CTxDB.

Definition at line 49 of file serialize.h.

Here is the caller graph for this function:

uint64_t ser_double_to_uint64 ( double  x)
inline

Definition at line 137 of file serialize.h.

Here is the caller graph for this function:

uint32_t ser_float_to_uint32 ( float  x)
inline

Definition at line 143 of file serialize.h.

Here is the caller graph for this function:

template<typename Stream >
uint16_t ser_readdata16 ( Stream &  s)
inline

Definition at line 102 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
uint256 ser_readdata256 ( Stream &  s)
inline

Definition at line 122 of file serialize.h.

Here is the caller graph for this function:

template<typename Stream >
uint32_t ser_readdata32 ( Stream &  s)
inline

Definition at line 108 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
uint32_t ser_readdata32be ( Stream &  s)
inline

Definition at line 115 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
uint64_t ser_readdata64 ( Stream &  s)
inline

Definition at line 131 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
uint8_t ser_readdata8 ( Stream &  s)
inline

Definition at line 96 of file serialize.h.

Here is the caller graph for this function:

float ser_uint32_to_float ( uint32_t  y)
inline

Definition at line 155 of file serialize.h.

Here is the caller graph for this function:

double ser_uint64_to_double ( uint64_t  y)
inline

Definition at line 149 of file serialize.h.

Here is the caller graph for this function:

template<typename Stream >
void ser_writedata16 ( Stream &  s,
uint16_t  obj 
)
inline

Definition at line 72 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
void ser_writedata32 ( Stream &  s,
uint32_t  obj 
)
inline

Definition at line 77 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
void ser_writedata32be ( Stream &  s,
uint32_t  obj 
)
inline

Definition at line 84 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
void ser_writedata64 ( Stream &  s,
uint64_t  obj 
)
inline

Definition at line 91 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
void ser_writedata8 ( Stream &  s,
uint8_t  obj 
)
inline

Definition at line 68 of file serialize.h.

Here is the caller graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
char  a 
)
inline

Definition at line 198 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
int8_t  a 
)
inline

Definition at line 199 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
uint8_t  a 
)
inline

Definition at line 200 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
int16_t  a 
)
inline

Definition at line 201 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
uint16_t  a 
)
inline

Definition at line 202 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
int32_t  a 
)
inline

Definition at line 203 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
uint32_t  a 
)
inline

Definition at line 204 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
int64_t  a 
)
inline

Definition at line 205 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
uint64_t  a 
)
inline

Definition at line 206 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
float  a 
)
inline

Definition at line 207 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
double  a 
)
inline

Definition at line 208 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Serialize ( Stream &  s,
bool  a 
)
inline

Definition at line 222 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename C >
void Serialize ( Stream &  os,
const std::basic_string< C > &  str 
)

Forward declarations.

string

Definition at line 589 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , unsigned int N, typename T >
void Serialize ( Stream &  os,
const prevector< N, T > &  v 
)
inline

Definition at line 627 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T , typename A >
void Serialize ( Stream &  os,
const std::vector< T, A > &  v 
)
inline

Definition at line 695 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename K , typename T >
void Serialize ( Stream &  os,
const std::pair< K, T > &  item 
)

pair

Definition at line 747 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename K , typename T , typename Pred , typename A >
void Serialize ( Stream &  os,
const std::map< K, T, Pred, A > &  m 
)

map

Definition at line 766 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename K , typename Pred , typename A >
void Serialize ( Stream &  os,
const std::set< K, Pred, A > &  m 
)

set

Definition at line 793 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T >
void Serialize ( Stream &  os,
const std::shared_ptr< const T > &  p 
)

shared_ptr

Definition at line 837 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T >
void Serialize ( Stream &  os,
const std::unique_ptr< const T > &  p 
)

unique_ptr

Definition at line 820 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T >
void Serialize ( Stream &  os,
const T a 
)
inline

If none of the specialized versions above matched, default to calling member function.

Definition at line 570 of file serialize.h.

template<typename Stream , unsigned int N, typename T >
void Serialize_impl ( Stream &  os,
const prevector< N, T > &  v,
const unsigned char &   
)

prevector prevectors of unsigned char are a special case and are intended to be serialized as a single opaque blob.

prevector

Definition at line 611 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream , unsigned int N, typename T , typename V >
void Serialize_impl ( Stream &  os,
const prevector< N, T > &  v,
const V &   
)

Definition at line 619 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T , typename A >
void Serialize_impl ( Stream &  os,
const std::vector< T, A > &  v,
const unsigned char &   
)

vector vectors of unsigned char are a special case and are intended to be serialized as a single opaque blob.

vector

Definition at line 679 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T , typename A , typename V >
void Serialize_impl ( Stream &  os,
const std::vector< T, A > &  v,
const V &   
)

Definition at line 687 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void SerializeMany ( Stream &  s)

Definition at line 930 of file serialize.h.

Here is the caller graph for this function:

template<typename Stream , typename Arg >
void SerializeMany ( Stream &  s,
Arg &&  arg 
)

Definition at line 935 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename Arg , typename... Args>
void SerializeMany ( Stream &  s,
Arg &&  arg,
Args &&...  args 
)

Definition at line 941 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T >
void SerReadWrite ( Stream &  s,
const T obj,
CSerActionSerialize  ser_action 
)
inline

Definition at line 863 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T >
void SerReadWrite ( Stream &  s,
T obj,
CSerActionUnserialize  ser_action 
)
inline

Definition at line 869 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename... Args>
void SerReadWriteMany ( Stream &  s,
CSerActionSerialize  ser_action,
Args &&...  args 
)
inline

Definition at line 966 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename... Args>
void SerReadWriteMany ( Stream &  s,
CSerActionUnserialize  ser_action,
Args &...  args 
)
inline

Definition at line 972 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
char &  a 
)
inline

Definition at line 210 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
int8_t &  a 
)
inline

Definition at line 211 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
uint8_t &  a 
)
inline

Definition at line 212 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
int16_t &  a 
)
inline

Definition at line 213 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
uint16_t &  a 
)
inline

Definition at line 214 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
int32_t &  a 
)
inline

Definition at line 215 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
uint32_t &  a 
)
inline

Definition at line 216 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
int64_t &  a 
)
inline

Definition at line 217 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
uint64_t &  a 
)
inline

Definition at line 218 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
float &  a 
)
inline

Definition at line 219 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
double &  a 
)
inline

Definition at line 220 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void Unserialize ( Stream &  s,
bool &  a 
)
inline

Definition at line 223 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename C >
void Unserialize ( Stream &  is,
std::basic_string< C > &  str 
)

Definition at line 597 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , unsigned int N, typename T >
void Unserialize ( Stream &  is,
prevector< N, T > &  v 
)
inline

Definition at line 668 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T , typename A >
void Unserialize ( Stream &  is,
std::vector< T, A > &  v 
)
inline

Definition at line 736 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename K , typename T >
void Unserialize ( Stream &  is,
std::pair< K, T > &  item 
)

Definition at line 754 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename K , typename T , typename Pred , typename A >
void Unserialize ( Stream &  is,
std::map< K, T, Pred, A > &  m 
)

Definition at line 774 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename K , typename Pred , typename A >
void Unserialize ( Stream &  is,
std::set< K, Pred, A > &  m 
)

Definition at line 801 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T >
void Unserialize ( Stream &  os,
std::shared_ptr< const T > &  p 
)

Definition at line 843 of file serialize.h.

template<typename Stream , typename T >
void Unserialize ( Stream &  os,
std::unique_ptr< const T > &  p 
)

Definition at line 826 of file serialize.h.

template<typename Stream , typename T >
void Unserialize ( Stream &  is,
T a 
)
inline

Definition at line 576 of file serialize.h.

template<typename Stream , unsigned int N, typename T >
void Unserialize_impl ( Stream &  is,
prevector< N, T > &  v,
const unsigned char &   
)

Definition at line 634 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream , unsigned int N, typename T , typename V >
void Unserialize_impl ( Stream &  is,
prevector< N, T > &  v,
const V &   
)

Definition at line 650 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T , typename A >
void Unserialize_impl ( Stream &  is,
std::vector< T, A > &  v,
const unsigned char &   
)

Definition at line 702 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename T , typename A , typename V >
void Unserialize_impl ( Stream &  is,
std::vector< T, A > &  v,
const V &   
)

Definition at line 718 of file serialize.h.

Here is the call graph for this function:

template<typename Stream >
void UnserializeMany ( Stream &  s)
inline

Definition at line 948 of file serialize.h.

Here is the caller graph for this function:

template<typename Stream , typename Arg >
void UnserializeMany ( Stream &  s,
Arg &  arg 
)
inline

Definition at line 953 of file serialize.h.

Here is the call graph for this function:

template<typename Stream , typename Arg , typename... Args>
void UnserializeMany ( Stream &  s,
Arg &  arg,
Args &...  args 
)
inline

Definition at line 959 of file serialize.h.

Here is the call graph for this function:

template<typename I >
CVarInt<I> WrapVarInt ( I n)

Definition at line 500 of file serialize.h.

Here is the call graph for this function:

void WriteCompactSize ( CSizeComputer os,
uint64_t  nSize 
)
inline

Definition at line 983 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream >
void WriteCompactSize ( Stream &  os,
uint64_t  nSize 
)

Definition at line 248 of file serialize.h.

Here is the call graph for this function:

template<typename I >
void WriteVarInt ( CSizeComputer os,
I  n 
)
inline

Definition at line 978 of file serialize.h.

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename Stream , typename I >
void WriteVarInt ( Stream &  os,
I  n 
)

Definition at line 351 of file serialize.h.

Here is the call graph for this function:

Variable Documentation

constexpr deserialize_type deserialize {}

Definition at line 42 of file serialize.h.