Electroneum
Loading...
Searching...
No Matches
binary_archive< true > Struct Reference

#include <binary_archive.h>

Inheritance diagram for binary_archive< true >:
Collaboration diagram for binary_archive< true >:

Public Member Functions

 binary_archive (stream_type &s)
template<class T>
void serialize_int (T v)
template<class T>
void serialize_uint (T v)
void serialize_blob (void *buf, size_t len, const char *delimiter="")
void serialize_string (std::string str, const char *delimiter="")
template<class T>
void serialize_varint (T &v)
template<class T>
void serialize_uvarint (T &v)
void begin_array (size_t s)
void begin_array ()
void delimit_array ()
void end_array ()
void begin_string (const char *delimiter="\"")
void end_string (const char *delimiter="\"")
void write_variant_tag (variant_tag_type t)
Public Member Functions inherited from binary_archive_base< std::ostream, true >
 binary_archive_base (stream_type &s)
void tag (const char *)
void begin_object ()
void end_object ()
void begin_variant ()
void end_variant ()
stream_typestream ()

Additional Inherited Members

Public Types inherited from binary_archive_base< std::ostream, true >
typedef std::ostream stream_type
typedef binary_archive_base< std::ostream, IsSaving > base_type
typedef boost::mpl::bool_< IsSaving > is_saving
typedef uint8_t variant_tag_type
Protected Attributes inherited from binary_archive_base< std::ostream, true >
stream_typestream_

Detailed Description

Definition at line 186 of file binary_archive.h.

Constructor & Destructor Documentation

◆ binary_archive()

binary_archive< true >::binary_archive ( stream_type & s)
inlineexplicit

Definition at line 188 of file binary_archive.h.

188: base_type(s) { }
binary_archive_base< std::ostream, IsSaving > base_type

Member Function Documentation

◆ begin_array() [1/2]

void binary_archive< true >::begin_array ( )
inline

Definition at line 230 of file binary_archive.h.

230{ }

◆ begin_array() [2/2]

void binary_archive< true >::begin_array ( size_t s)
inline

Definition at line 226 of file binary_archive.h.

227 {
229 }
Here is the call graph for this function:

◆ begin_string()

void binary_archive< true >::begin_string ( const char * delimiter = "\"")
inline

Definition at line 234 of file binary_archive.h.

234{ }

◆ delimit_array()

void binary_archive< true >::delimit_array ( )
inline

Definition at line 231 of file binary_archive.h.

231{ }

◆ end_array()

void binary_archive< true >::end_array ( )
inline

Definition at line 232 of file binary_archive.h.

232{ }

◆ end_string()

void binary_archive< true >::end_string ( const char * delimiter = "\"")
inline

Definition at line 235 of file binary_archive.h.

235{ }

◆ serialize_blob()

void binary_archive< true >::serialize_blob ( void * buf,
size_t len,
const char * delimiter = "" )
inline

Definition at line 204 of file binary_archive.h.

205 {
206 stream_.write((char *)buf, len);
207 }

◆ serialize_int()

template<class T>
void binary_archive< true >::serialize_int ( T v)
inline

Definition at line 191 of file binary_archive.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ serialize_string()

void binary_archive< true >::serialize_string ( std::string str,
const char * delimiter = "" )
inline

Definition at line 209 of file binary_archive.h.

210 {
211 stream_.write((char *)str.c_str(), str.size());
212 }

◆ serialize_uint()

template<class T>
void binary_archive< true >::serialize_uint ( T v)
inline

Definition at line 196 of file binary_archive.h.

197 {
198 for (size_t i = 0; i < sizeof(T); i++) {
199 stream_.put((char)(v & 0xff));
200 if (1 < sizeof(T)) v >>= 8;
201 }
202 }
Here is the caller graph for this function:

◆ serialize_uvarint()

template<class T>
void binary_archive< true >::serialize_uvarint ( T & v)
inline

Definition at line 221 of file binary_archive.h.

222 {
225 }
std::enable_if< std::is_integral< T >::value &&std::is_unsigned< T >::value, void >::type write_varint(OutputIt &&dest, T i)
writes a varint to a stream.
Definition varint.h:70
Here is the call graph for this function:
Here is the caller graph for this function:

◆ serialize_varint()

template<class T>
void binary_archive< true >::serialize_varint ( T & v)
inline

Definition at line 215 of file binary_archive.h.

216 {
218 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ write_variant_tag()

void binary_archive< true >::write_variant_tag ( variant_tag_type t)
inline

Definition at line 237 of file binary_archive.h.

237 {
239 }
Here is the call graph for this function:

The documentation for this struct was generated from the following file:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/serialization/binary_archive.h