24#ifndef MYSQL_SERIALIZATION_READ_ARCHIVE_BINARY_H
25#define MYSQL_SERIALIZATION_READ_ARCHIVE_BINARY_H
48 template <
typename Field_type>
52 template <
typename Field_type>
54 static constexpr auto value_size = Field_type::value_size;
57 value_size>(arg.get());
61 template <
typename T, Field_size S>
70 void set_stream(
const unsigned char *stream, std::size_t stream_size) {
81 template <
class Field_type>
Interface for archives (file archive, byte vector archive, string archive etc.), available only to in...
Definition: archive.h:50
Binary, read only archive implementation based on vector of bytes.
Definition: read_archive_binary.h:43
static constexpr std::size_t get_max_size()
Function returns maximum size of the Type.
Definition: read_archive_binary.h:62
std::size_t read_pos
Read position.
Definition: read_archive_binary.h:92
Read_archive_binary & operator>>(Field_type &&arg)
Reads argument from this archive.
Definition: read_archive_binary_impl.hpp:30
void seek_to(std::size_t num_pos)
Moves the current read position to current position + size.
Definition: read_archive_binary.h:85
std::size_t get_read_pos() const
Gets current read pos.
Definition: read_archive_binary.h:88
void set_stream(const unsigned char *stream, std::size_t stream_size)
Set up internal stream, this implementation of Archive does not own memory, it just reads it.
Definition: read_archive_binary.h:70
static std::size_t get_size(Field_type &&arg)
Function returns size of serialized argument.
Definition: read_archive_binary.h:53
std::size_t m_stream_size
Definition: read_archive_binary.h:93
void peek(Field_type &&field)
Peeks selected field wrapper (reads data without updating read stream position)
Definition: read_archive_binary_impl.hpp:49
const unsigned char * m_stream
Internal data stream.
Definition: read_archive_binary.h:91
const unsigned char * Internal_type
Definition: read_archive_binary.h:45
Internal_type & get_raw_data()
Function for the API user to access data in the archive.
Definition: read_archive_binary.cpp:30
uint16_t value_type
Definition: vt100.h:184
Definition: sql_resultset.h:36
static constexpr std::size_t get_max_size()
Calculates maximum encoded size of the fixed-length integer and floating point fields.
Definition: archive_binary_field_max_size_calculator.h:48
This class is to provide functionality to encode/decode the primitive types into/out of defined strea...
Definition: primitive_type_codec.h:113