Bitcoin Core  0.20.99
P2P Digital Currency
Public Member Functions | Protected Attributes | List of all members
BigEndian< I > Class Template Reference

Serialization wrapper class for big-endian integers. More...

#include <serialize.h>

Public Member Functions

 BigEndian (I &val)
 
template<typename Stream >
void Serialize (Stream &s) const
 
template<typename Stream >
void Unserialize (Stream &s)
 

Protected Attributes

I & m_val
 

Detailed Description

template<typename I>
class BigEndian< I >

Serialization wrapper class for big-endian integers.

Use this wrapper around integer types that are stored in memory in native byte order, but serialized in big endian notation. This is only intended to implement serializers that are compatible with existing formats, and its use is not recommended for new data structures.

Only 16-bit types are supported for now.

Definition at line 553 of file serialize.h.

Constructor & Destructor Documentation

◆ BigEndian()

template<typename I >
BigEndian< I >::BigEndian ( I &  val)
inlineexplicit

Definition at line 558 of file serialize.h.

Member Function Documentation

◆ Serialize()

template<typename I >
template<typename Stream >
void BigEndian< I >::Serialize ( Stream &  s) const
inline

Definition at line 565 of file serialize.h.

Here is the call graph for this function:

◆ Unserialize()

template<typename I >
template<typename Stream >
void BigEndian< I >::Unserialize ( Stream &  s)
inline

Definition at line 571 of file serialize.h.

Here is the call graph for this function:

Member Data Documentation

◆ m_val

template<typename I >
I& BigEndian< I >::m_val
protected

Definition at line 556 of file serialize.h.


The documentation for this class was generated from the following file: