24#ifndef MYSQL_SERIALIZATION_ARCHIVE_TEXT_H
25#define MYSQL_SERIALIZATION_ARCHIVE_TEXT_H
46 template <
typename Field_type>
50 template <
typename Field_type>
73 template <
class Field_type>
79 m_stream.seekg(pos + num_pos, std::ios_base::beg);
83 template <
typename T, Field_size S>
89 template <
typename T, Field_size S>
Archive implementation based on stringstream.
Definition: archive_text.h:43
std::size_t get_read_pos() const
Gets current read pos.
Definition: archive_text.h:95
void put_entry_separator() override
This method needs to define field entry separator to be inserted after the field entry,...
Definition: archive_text.cpp:43
static constexpr std::size_t get_max_size()
Function returns size of serialized argument.
Definition: archive_text.h:90
std::stringstream m_stream
Internal data stream.
Definition: archive_text.h:98
Archive_text & operator>>(Field_type &&arg)
Reads argument from this archive.
Definition: archive_text_impl.hpp:43
static std::size_t get_size(Field_wrapper< T, S > &&arg)
Function returns size of serialized argument.
Definition: archive_text.h:84
void seek_to(std::size_t num_pos)
Moves the current read position to current position + size.
Definition: archive_text.h:77
std::size_t get_size_written() const
Returns archive size - size of data written to the archive.
Definition: archive_text.h:57
std::string get_raw_data()
Function for the API user to access data in the archive.
Definition: archive_text.cpp:30
void put_field_separator() override
This method needs to define field separator to be inserted after the field, note that some formats wo...
Definition: archive_text.cpp:32
void peek(Field_type &&field)
Peeks selected field wrapper (reads data without updating read stream position)
Definition: archive_text_impl.hpp:56
Archive_text & operator<<(Field_type &&arg)
Ingests argument into this archive.
Definition: archive_text_impl.hpp:30
void put_level_separator() override
This method needs to define level separator to be inserted after the level, note that some formats wo...
Definition: archive_text.cpp:54
Interface for archives (file archive, byte vector archive, string archive etc.), available only to in...
Definition: archive.h:50
Wrapper for fields to hold field reference and user-defined, compile-time field size.
Definition: field_wrapper.h:43
Definition: sql_resultset.h:36