1#ifndef joedb_type_io_declared
2#define joedb_type_io_declared
16 void write_string(std::ostream &out,
const std::string &s,
bool json =
false);
26 bool flush_left =
true
35 void write_int8(std::ostream &out, int8_t value);
40 void write_blob(std::ostream &out,
const Blob blob);
58 return in >> *(std::underlying_type<Table_Id>::type *)(&table_id);
62 return in >> *(std::underlying_type<Field_Id>::type *)(&field_id);
66 return in >> *(std::underlying_type<Record_Id>::type *)(&record_id);
69 #define PRIMITIVE_IO(type, type_id)\
70 inline type read_##type_id(std::istream &in)\
71 {type value = type(); in >> value; return value;}\
72 inline void write_##type_id(std::ostream &out, type value)\
void write_octal_character(std::ostream &out, uint8_t c)
std::istream & operator>>(std::istream &in, Table_Id &table_id)
uint8_t get_hex_digit_from_char(char c)
void write_boolean(std::ostream &out, bool value)
void write_string(std::ostream &out, const std::string &s, bool json)
void write_sql_string(std::ostream &out, const std::string &s)
uint32_t read_utf8_char(size_t &i, const std::string &s)
void write_justified(std::ostream &out, const std::string &s, size_t width, bool flush_left)
void write_hexa_character(std::ostream &out, uint8_t c)
bool read_boolean(std::istream &in)
size_t utf8_display_size(const std::string &s)
int8_t read_int8(std::istream &in)
void write_int8(std::ostream &out, int8_t value)
std::ostream & operator<<(std::ostream &out, Table_Id table_id)
void write_blob(std::ostream &out, Blob blob)
#define PRIMITIVE_IO(type, type_id)
char get_hex_char_from_digit(uint8_t n)
std::string read_string(std::istream &in)
Blob read_blob(std::istream &in)
constexpr std::underlying_type< Table_Id >::type to_underlying(Table_Id id)