24#ifndef MYSQL_SERIALIZATION_ARCHIVE_BINARY_H
25#define MYSQL_SERIALIZATION_ARCHIVE_BINARY_H
47 template <
typename Field_type>
51 template <
typename Field_type>
55 template <
typename Field_type, Field_size defined_field_size>
62 template <
typename Field_type>
64 static constexpr auto value_size = Field_type::value_size;
67 value_size>(arg.get());
74 template <
class Field_type>
Binary archive implementation based on vector of bytes.
Definition: archive_binary.h:44
static std::size_t get_size(Field_type &&arg)
Function returns size of serialized argument.
Definition: archive_binary.h:63
std::size_t read_pos
Read position.
Definition: archive_binary.h:85
void peek(Field_type &&field)
Peeks selected field wrapper (reads data without updating read stream position)
Definition: archive_binary_impl.hpp:78
void seek_to(std::size_t num_pos)
Moves the current read position to current position + size.
Definition: archive_binary.h:78
std::size_t get_read_pos() const
Gets current read pos.
Definition: archive_binary.h:81
static constexpr std::size_t get_max_size()
Function returns maximum size of the Type.
Definition: archive_binary.h:56
std::vector< unsigned char > & get_raw_data()
Function for the API user to access data in the archive.
Definition: archive_binary.cpp:30
Archive_binary & operator>>(Field_type &&arg)
Reads argument from this archive.
Definition: archive_binary_impl.hpp:57
std::vector< unsigned char > m_stream
Internal data stream.
Definition: archive_binary.h:84
Archive_binary & operator<<(Field_type &&arg)
Ingests argument into this archive.
Definition: archive_binary_impl.hpp:30
Interface for archives (file archive, byte vector archive, string archive etc.), available only to in...
Definition: archive.h:50
uint16_t value_type
Definition: vt100.h:184
Definition: sql_resultset.h:36
helper structure created for partial specialization of get_max_size function of Archive_binary,...
Definition: archive_binary_field_max_size_calculator.h:44
This class is to provide functionality to encode/decode the primitive types into/out of defined strea...
Definition: primitive_type_codec.h:113