24#ifndef MYSQL_SERIALIZATION_FIELD_DEFINITION_H
25#define MYSQL_SERIALIZATION_FIELD_DEFINITION_H
44template <
class Field_type, Field_size defined_field_size = sizeof(Field_type)>
Field definition provided by classes implementing Serializable interface.
Definition: field_definition.h:45
bool is_field_ignorable() const
Indicates whether this field can be ignored by decoders that do not know this field.
Definition: field_definition.h:117
Field_encode_predicate m_encode_predicate
Defines whether field will be encoded.
Definition: field_definition.h:133
Field_definition(Field_type &field, Field_encode_predicate encode_predicate, Unknown_field_policy unknown_field_policy, Field_missing_functor field_missing_functor)
Constructs field definition object.
Definition: field_definition.h:59
Field_type & get_ref()
Definition: field_definition.h:101
Field_definition(Field_type &field, Unknown_field_policy unknown_field_policy=Unknown_field_policy::ignore)
Constructs field definition object.
Definition: field_definition.h:70
Field_definition(Field_type &field, Field_encode_predicate encode_predicate, Unknown_field_policy unknown_field_policy=Unknown_field_policy::ignore)
Constructs field definition object.
Definition: field_definition.h:84
Unknown_field_policy m_unknown_field_policy
Defines what a decoder should do if the field is present but the decoder is a version that does not k...
Definition: field_definition.h:130
Field_definition(Field_type &field, Field_missing_functor field_missing_functor)
Constructs field definition object.
Definition: field_definition.h:95
void run_field_missing() const
Runs "field missing functor" in case field is not available in the provided encoded data.
Definition: field_definition.h:106
Field_missing_functor m_field_missing_functor
Function that is called for this field during decoding in case field is missing in the encoded messag...
Definition: field_definition.h:137
bool run_encode_predicate() const
Runs encode predicate functor.
Definition: field_definition.h:110
std::reference_wrapper< Field_type > Field_type_ref
Definition: field_definition.h:48
const Field_type & get_ref() const
Definition: field_definition.h:102
Field_type_ref m_ref
Field object reference.
Definition: field_definition.h:122
Field_encode_functor_type Field_encode_predicate
Type of the predicate telling serializer whether field is provided or not.
Definition: field_functor.h:47
Unknown_field_policy
Represents 'unknown field' policy - decision what needs to be done in case unknown field is encounter...
Definition: unknown_field_policy.h:39
@ ignore
Ignore this field.
Field_decode_functor_type Field_missing_functor
Type of the predicate telling serializer what to do in case field is not provided.
Definition: field_functor.h:43
Definition: sql_resultset.h:36
Used to distinguish between Serializable and Field_definition types.
Definition: serializable_type_tags.h:43