MySQL 8.4.2
Source Code Documentation
mysql::serialization::Serializer_default< Archive_concrete_type > Class Template Reference

Basic serializer that is implementing Serializer interface. More...

#include <serializer_default.h>

Inheritance diagram for mysql::serialization::Serializer_default< Archive_concrete_type >:
[legend]

Public Types

using Base_type = Serializer< Serializer_default< Archive_concrete_type >, Archive_concrete_type >
 
- Public Types inherited from mysql::serialization::Serializer< Serializer_default< Archive_concrete_type >, Archive_concrete_type >
using Serializer_current_type = Serializer< Serializer_default< Archive_concrete_type >, Archive_concrete_type >
 

Public Member Functions

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...
 
- Public Member Functions inherited from mysql::serialization::Serializer< Serializer_default< Archive_concrete_type >, Archive_concrete_type >
bool is_error () const
 
bool is_good () const
 
const Serialization_errorget_error ()
 
Serializer_current_typeoperator<< (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_typeoperator>> (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...
 

Static Public Member Functions

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 Public Member Functions inherited from mysql::serialization::Serializer< Serializer_default< Archive_concrete_type >, Archive_concrete_type >
static std::size_t get_size (const T &arg)
 

Public Attributes

friend Base_type
 
friend Archive_concrete_type
 

Protected Member Functions

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...
 
- Protected Member Functions inherited from mysql::serialization::Serializer< Serializer_default< Archive_concrete_type >, Archive_concrete_type >
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...
 

Additional Inherited Members

- Static Protected Member Functions inherited from mysql::serialization::Serializer< Serializer_default< Archive_concrete_type >, Archive_concrete_type >
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 field object written to an archive. More...
 
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 serializable object written to an archive. More...
 
static constexpr std::size_t get_max_size ()
 Function returns maximum size of the field written to an archive, based on its type. More...
 
static constexpr std::size_t get_max_size ()
 Function returns maximum size of the Serializable_concrete_type class object data written to an archive, based on its type. More...
 
- Protected Attributes inherited from mysql::serialization::Serializer< Serializer_default< Archive_concrete_type >, Archive_concrete_type >
Level_type m_level
 Level of the serializable tree. More...
 
Archive_concrete_type m_archive
 Archive that stores the data. More...
 
Serialization_error m_error
 Holds information about error. More...
 

Detailed Description

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_typeType of the archive

Member Typedef Documentation

◆ Base_type

Constructor & Destructor Documentation

◆ ~Serializer_default()

Member Function Documentation

◆ decode()

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined>
void mysql::serialization::Serializer_default< Archive_concrete_type >::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.

Template Parameters
Field_typeType of field
field_size_definedDefined field size in archive
Parameters
[in]levelLevel of the serializable tree, may be ignored, used mainly for text formatting
[in]field_idExpected field id
[in]serializable_end_posEnd position of current serializable type
[in]field_definitionDefinition of the field
Note
To be implemented in Serializer_derived_type

◆ decode_field() [1/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::decode_field ( Field_type field)
protected

Function used internally to decode field_id and handle optional fields, version for basic types.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be loaded

◆ decode_field() [2/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::decode_field ( Field_type field,
Serializer_array_tag  = {} 
)
protected

Function used internally to decode field_id and handle optional fields, version for std::array.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be loaded

◆ decode_field() [3/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::decode_field ( Field_type field,
Serializer_enum_tag  = {} 
)
protected

Function used internally to decode field_id and handle optional fields, version for enumeration types.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be loaded

◆ decode_field() [4/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::decode_field ( Field_type field,
Serializer_map_tag  = {} 
)
protected

Function used internally to decode field_id and handle optional fields, version for std::map.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be loaded

◆ decode_field() [5/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::decode_field ( Field_type field,
Serializer_serializable_tag  = {} 
)
protected

Function used internally to decode field_id and handle optional fields, version for serializable.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be loaded

◆ decode_field() [6/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::decode_field ( Field_type field,
Serializer_set_tag  = {} 
)
protected

Function used internally to decode field_id and handle optional fields, version for std::set.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be loaded

◆ decode_field() [7/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::decode_field ( Field_type field,
Serializer_vector_list_tag  = {} 
)
protected

Function used internally to decode field_id and handle optional fields, version for vector.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be loaded

◆ decode_field_id()

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined>
bool mysql::serialization::Serializer_default< Archive_concrete_type >::decode_field_id ( Level_type  level,
Field_id_type  field_id,
Field_definition< Field_type, field_size_defined > &  field_definition 
)
protected

Function used internally to decode field_id and handle optional fields.

Template Parameters
Field_typeType of field
field_size_definedDefined field size in archive
Parameters
[in]levelLevel of the serializable tree, may be ignored, used mainly for text formatting
[in]field_idField id
[in]field_definitionDefinition of the field
Returns
Answer to question Is field provided?

◆ decode_serializable_metadata()

template<class Archive_concrete_type >
template<class Serializable_type >
std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::decode_serializable_metadata ( Level_type  level,
Field_id_type  field_id,
Serializable_type &  serializable,
bool  skip_id 
)

This function loads serializable metadata.

Template Parameters
Serializable_typeserializable data type
Parameters
[in]levelLevel of the serializable tree, may be ignored, used mainly for text formatting
[in]field_idField id
[in]serializableSerializable object universal reference
[in]skip_idSkip encoding of serializable id (for repeated fields)
Returns
Number of bytes decoded

◆ encode()

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined>
void mysql::serialization::Serializer_default< Archive_concrete_type >::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.

Template Parameters
Field_typeType of field
field_size_definedDefined field size in archive
Parameters
[in]levelLevel of the serializable tree, may be ignored, used mainly for text formatting
[in]field_idField id
[in]field_definitionDefinition of the field
Note
To be implemented in Serializer_derived_type

◆ encode_field() [1/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::encode_field ( const Field_type field)
protected

Function used internally to encode field_id and handle optional fields, version for basic types.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ encode_field() [2/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::encode_field ( const Field_type field,
Serializer_array_tag  = {} 
)
protected

Function used internally to encode field_id and handle optional fields, version for std::array.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ encode_field() [3/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::encode_field ( const Field_type field,
Serializer_enum_tag  = {} 
)
protected

Function used internally to encode field_id and handle optional fields, version for enumeration types.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ encode_field() [4/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::encode_field ( const Field_type field,
Serializer_map_tag  = {} 
)
protected

Function used internally to encode field_id and handle optional fields, version for std::map.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ encode_field() [5/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::encode_field ( const Field_type field,
Serializer_serializable_tag  = {} 
)
protected

Function used internally to encode field_id and handle optional fields, version for serializable.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ encode_field() [6/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::encode_field ( const Field_type field,
Serializer_set_tag  = {} 
)
protected

Function used internally to encode field_id and handle optional fields, version for std::set.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ encode_field() [7/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
void mysql::serialization::Serializer_default< Archive_concrete_type >::encode_field ( const Field_type field,
Serializer_vector_list_tag  = {} 
)
protected

Function used internally to encode field_id and handle optional fields, version for vector.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ encode_field_id()

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined>
bool mysql::serialization::Serializer_default< Archive_concrete_type >::encode_field_id ( Level_type  level,
Field_id_type  field_id,
const Field_definition< Field_type, field_size_defined > &  field_definition 
)
protected

Function used internally to encode field_id and handle optional fields.

Template Parameters
Field_typeType of field
field_size_definedDefined field size in archive
Parameters
[in]levelLevel of the serializable tree, may be ignored, used mainly for text formatting
[in]field_idField id
[in]field_definitionDefinition of the field
Returns
Answer to question Is field provided?

◆ encode_serializable_metadata()

template<class Archive_concrete_type >
template<class Serializable_type >
void mysql::serialization::Serializer_default< Archive_concrete_type >::encode_serializable_metadata ( Level_type  level,
Field_id_type  field_id,
const Serializable_type &  serializable,
bool  skip_id 
)

This function saves serializable metadata.

Template Parameters
Serializable_typeserializable data type
Parameters
[in]levelLevel of the serializable tree, may be ignored, used mainly for text formatting
[in]field_idField id
[in]serializableSerializable object universal reference
[in]skip_idSkip encoding of serializable id (for repeated fields)

◆ get_field_size() [1/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::get_field_size ( const Field_type field)
static

Function used internally to calculate size of fields, version for basic types.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ get_field_size() [2/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::get_field_size ( const Field_type field,
Serializer_array_tag  = {} 
)
static

Function used internally to calculate size of fields, version for std::array.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ get_field_size() [3/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::get_field_size ( const Field_type field,
Serializer_enum_tag  = {} 
)
static

Function used internally to calculate size of fields, version for enumeration types.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ get_field_size() [4/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::get_field_size ( const Field_type field,
Serializer_map_tag  = {} 
)
static

Function used internally to calculate size of fields, version for std::map.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ get_field_size() [5/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::get_field_size ( const Field_type field,
Serializer_serializable_tag  = {} 
)
static

Function used internally to calculate size of fields, version for serializable.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ get_field_size() [6/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::get_field_size ( const Field_type field,
Serializer_set_tag  = {} 
)
static

Function used internally to calculate size of fields, version for std::set.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ get_field_size() [7/7]

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined, typename Enabler >
std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::get_field_size ( const Field_type field,
Serializer_vector_list_tag  = {} 
)
static

Function used internally to calculate size of fields, version for vector.

Template Parameters
Field_typeType of field
Parameters
[in]fieldField that will be saved

◆ get_max_size() [1/2]

template<class Archive_concrete_type >
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 mysql::serialization::Serializer_default< Archive_concrete_type >::get_max_size ( )
inlinestaticconstexpr

Function returns maximum size of the field written to an archive, based on its type.

Template Parameters
Field_typeType of field
field_size_definedDefined field size in archive

◆ get_max_size() [2/2]

template<class Archive_concrete_type >
template<class Serializable_concrete_type >
static constexpr std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::get_max_size ( )
inlinestaticconstexpr

Function returns maximum size of the field written to an archive, based on its type.

Template Parameters
Field_typeType of field
field_size_definedDefined field size in archive

◆ get_size_field_def()

template<class Archive_concrete_type >
template<class Field_type , Field_size field_size_defined>
std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::get_size_field_def ( Field_id_type  field_id,
const Field_definition< Field_type, field_size_defined > &  field_definition 
)
static

Function returns size of serialized field_definition object.

Template Parameters
Field_typeType of field
field_size_definedDefined field size in archive
Parameters
[in]field_idField id
[in]field_definitionDefinition of the field

◆ get_size_serializable()

template<class Archive_concrete_type >
template<class Serializable_concrete_type >
std::size_t mysql::serialization::Serializer_default< Archive_concrete_type >::get_size_serializable ( Field_id_type  field_id,
const Serializable_concrete_type &  serializable,
bool  skip_id = false 
)
static

Function returns size of serialized field_definition object.

Template Parameters
Serializable_concrete_typeType of serializable obj
Parameters
[in]field_idField id
[in]serializableSerializable universal reference for which size will be calculated
[in]skip_idSkip serializable id (for repeated fields)

Member Data Documentation

◆ Archive_concrete_type

template<class Archive_concrete_type >
friend mysql::serialization::Serializer_default< Archive_concrete_type >::Archive_concrete_type

◆ Base_type


The documentation for this class was generated from the following files: