|
template<class Field_type , Field_size field_size_defined> |
void | encode (Level_type level, Field_id_type field_id, const Field_definition< Field_type, field_size_defined > &field_definition) |
| Function used to encode one field. More...
|
|
template<class Field_type , Field_size field_size_defined> |
void | decode (Level_type level, Field_id_type field_id, std::size_t serializable_end_pos, Field_definition< Field_type, field_size_defined > &field_definition) |
| Function used to decode one field. More...
|
|
template<class Serializable_type > |
void | encode_serializable_metadata (Level_type level, Field_id_type field_id, const Serializable_type &serializable, bool skip_id) |
| This function saves serializable metadata. More...
|
|
template<class Serializable_type > |
std::size_t | decode_serializable_metadata (Level_type level, Field_id_type field_id, Serializable_type &serializable, bool skip_id) |
| This function loads serializable metadata. More...
|
|
virtual | ~Serializer_default ()=default |
| Destructor. More...
|
|
bool | is_error () const |
|
bool | is_good () const |
|
const Serialization_error & | get_error () |
|
Serializer_current_type & | operator<< (const T &arg) |
| Function for the API user to serialize data. More...
|
|
Serializer< Serializer_default< Archive_concrete_type >, Archive_concrete_type > & | operator<< (const T &arg) |
|
Serializer_current_type & | operator>> (T &arg) |
| Function for the API user to serialize data. More...
|
|
Serializer< Serializer_default< Archive_concrete_type >, Archive_concrete_type > & | operator>> (T &arg) |
|
Archive_concrete_type & | get_archive () |
| Function for the API user to access reference of the archive. More...
|
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_bounded_size_type<Field_type>() == true>> |
static constexpr std::size_t | get_max_size () |
| Function returns maximum size of the field written to an archive, based on its type. More...
|
|
template<class Serializable_concrete_type > |
static constexpr std::size_t | get_max_size () |
| Function returns maximum size of the field written to an archive, based on its type. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_simple_type<Field_type>() == true>> |
static std::size_t | get_field_size (const Field_type &field) |
| Function used internally to calculate size of fields, version for basic types. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_enum_type<Field_type>() == true>> |
static std::size_t | get_field_size (const Field_type &field, Serializer_enum_tag={}) |
| Function used internally to calculate size of fields, version for enumeration types. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_vector_list_type<Field_type>() == true>> |
static std::size_t | get_field_size (const Field_type &field, Serializer_vector_list_tag={}) |
| Function used internally to calculate size of fields, version for vector. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_serializable_type<Field_type>() == true>> |
static std::size_t | get_field_size (const Field_type &field, Serializer_serializable_tag={}) |
| Function used internally to calculate size of fields, version for serializable. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_map_type<Field_type>() == true>> |
static std::size_t | get_field_size (const Field_type &field, Serializer_map_tag={}) |
| Function used internally to calculate size of fields, version for std::map. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_set_type<Field_type>() == true>> |
static std::size_t | get_field_size (const Field_type &field, Serializer_set_tag={}) |
| Function used internally to calculate size of fields, version for std::set. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_array_type_v<Field_type>() == true>> |
static std::size_t | get_field_size (const Field_type &field, Serializer_array_tag={}) |
| Function used internally to calculate size of fields, version for std::array. More...
|
|
template<class Field_type , Field_size field_size_defined> |
static std::size_t | get_size_field_def (Field_id_type field_id, const Field_definition< Field_type, field_size_defined > &field_definition) |
| Function returns size of serialized field_definition object. More...
|
|
template<class Serializable_concrete_type > |
static std::size_t | get_size_serializable (Field_id_type field_id, const Serializable_concrete_type &serializable, bool skip_id=false) |
| Function returns size of serialized field_definition object. More...
|
|
static std::size_t | get_size (const T &arg) |
|
|
template<class Field_type , Field_size field_size_defined> |
bool | decode_field_id (Level_type level, Field_id_type field_id, Field_definition< Field_type, field_size_defined > &field_definition) |
| Function used internally to decode field_id and handle optional fields. More...
|
|
template<class Field_type , Field_size field_size_defined> |
bool | encode_field_id (Level_type level, Field_id_type field_id, const Field_definition< Field_type, field_size_defined > &field_definition) |
| Function used internally to encode field_id and handle optional fields. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_simple_type<Field_type>() == true>> |
void | encode_field (const Field_type &field) |
| Function used internally to encode field_id and handle optional fields, version for basic types. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_simple_type<Field_type>() == true>> |
void | decode_field (Field_type &field) |
| Function used internally to decode field_id and handle optional fields, version for basic types. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_enum_type<Field_type>() == true>> |
void | encode_field (const Field_type &field, Serializer_enum_tag={}) |
| Function used internally to encode field_id and handle optional fields, version for enumeration types. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_enum_type<Field_type>() == true>> |
void | decode_field (Field_type &field, Serializer_enum_tag={}) |
| Function used internally to decode field_id and handle optional fields, version for enumeration types. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_vector_list_type<Field_type>() == true>> |
void | encode_field (const Field_type &field, Serializer_vector_list_tag={}) |
| Function used internally to encode field_id and handle optional fields, version for vector. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_vector_list_type<Field_type>() == true>> |
void | decode_field (Field_type &field, Serializer_vector_list_tag={}) |
| Function used internally to decode field_id and handle optional fields, version for vector. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_serializable_type<Field_type>() == true>> |
void | encode_field (const Field_type &field, Serializer_serializable_tag={}) |
| Function used internally to encode field_id and handle optional fields, version for serializable. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_serializable_type<Field_type>() == true>> |
void | decode_field (Field_type &field, Serializer_serializable_tag={}) |
| Function used internally to decode field_id and handle optional fields, version for serializable. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_map_type<Field_type>() == true>> |
void | encode_field (const Field_type &field, Serializer_map_tag={}) |
| Function used internally to encode field_id and handle optional fields, version for std::map. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_map_type<Field_type>() == true>> |
void | decode_field (Field_type &field, Serializer_map_tag={}) |
| Function used internally to decode field_id and handle optional fields, version for std::map. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_set_type<Field_type>() == true>> |
void | encode_field (const Field_type &field, Serializer_set_tag={}) |
| Function used internally to encode field_id and handle optional fields, version for std::set. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_set_type<Field_type>() == true>> |
void | decode_field (Field_type &field, Serializer_set_tag={}) |
| Function used internally to decode field_id and handle optional fields, version for std::set. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_array_type_v<Field_type>() == true>> |
void | encode_field (const Field_type &field, Serializer_array_tag={}) |
| Function used internally to encode field_id and handle optional fields, version for std::array. More...
|
|
template<class Field_type , Field_size field_size_defined, typename = std::enable_if_t<is_array_type_v<Field_type>() == true>> |
void | decode_field (Field_type &field, Serializer_array_tag={}) |
| Function used internally to decode field_id and handle optional fields, version for std::array. More...
|
|
Serializer_default< Archive_concrete_type > * | get_derived () |
| Casts this to derived type. More...
|
|
void | encode_field (Level_type level, Field_id_type field_id, const Field_definition< Field_type, field_size_defined > &field_definition) |
| Function used to encode one field. More...
|
|
void | decode_field (Level_type level, Field_id_type field_id, std::size_t serializable_end_pos, Field_definition< Field_type, field_size_defined > &field_definition) |
| Function used to decode one field. More...
|
|
void | encode_serializable (Level_type level, Field_id_type field_id, const Serializable_type &serializable, bool skip_id) |
| Function used to encode serializable field, this function saves serializable metadata and calls serializable encode method. More...
|
|
void | encode_serializable_fields (const Serializable_type &serializable, Level_type level) |
| Function used to encode fields of specializations of Serializable class, iterates over constant fields allowing them to be saved into an archive. More...
|
|
void | decode_serializable (Level_type level, Field_id_type field_id, std::size_t serializable_end_pos, Serializable_type &serializable, bool skip_id) |
| Function used to decode serializable field, this function loads serializable metadata and calls serializable decode method. More...
|
|
void | decode_serializable_fields (Serializable_type &serializable, Level_type level, std::size_t serializable_end_pos) |
| Function used to decode fields of specializations of Serializable class, iterates over non constant fields, allowing them to be filled with data from an archive. More...
|
|
void | clear_error () |
|
virtual | ~Serializer ()=default |
| Destructor. More...
|
|
template<class
Archive_concrete_type>
class mysql::serialization::Serializer_default< Archive_concrete_type >
Basic serializer that is implementing Serializer interface.
Serializes fields and appropriate metadata to ensure that messages are backward and forward compatible
- Template Parameters
-
Archive_concrete_type | Type of the archive |