A base class to serialize objects. More...
#include <serializer.hpp>
Public Member Functions | |
virtual void | on_attribute (const char *id, char &x, const field_attributes &attr)=0 |
Interface to serialize a char with given id. | |
virtual void | on_attribute (const char *id, short &x, const field_attributes &attr)=0 |
Interface to serialize a short with given id. | |
virtual void | on_attribute (const char *id, int &x, const field_attributes &attr)=0 |
Interface to serialize a int with given id. | |
virtual void | on_attribute (const char *id, long &x, const field_attributes &attr)=0 |
Interface to serialize a long with given id. | |
virtual void | on_attribute (const char *id, long long &x, const field_attributes &attr)=0 |
Interface to serialize a long long with given id. | |
virtual void | on_attribute (const char *id, unsigned char &x, const field_attributes &attr)=0 |
Interface to serialize a unsigned char with given id. | |
virtual void | on_attribute (const char *id, unsigned short &x, const field_attributes &attr)=0 |
Interface to serialize a unsigned short with given id. | |
virtual void | on_attribute (const char *id, unsigned int &x, const field_attributes &attr)=0 |
Interface to serialize a unsigned int with given id. | |
virtual void | on_attribute (const char *id, unsigned long long &x, const field_attributes &attr)=0 |
Interface to serialize a unsigned long long with given id. | |
virtual void | on_attribute (const char *id, unsigned long &x, const field_attributes &attr)=0 |
Interface to serialize a unsigned long with given id. | |
virtual void | on_attribute (const char *id, bool &x, const field_attributes &attr)=0 |
Interface to serialize a bool with given id. | |
virtual void | on_attribute (const char *id, float &x, const field_attributes &attr)=0 |
Interface to serialize a float with given id. | |
virtual void | on_attribute (const char *id, double &x, const field_attributes &attr)=0 |
Interface to serialize a double with given id. | |
virtual void | on_attribute (const char *id, char *x, const field_attributes &attr)=0 |
Interface to serialize a char string with given id. | |
virtual void | on_attribute (const char *id, std::string &x, const field_attributes &attr)=0 |
Interface to serialize a string with given id. | |
virtual void | on_attribute (const char *id, matador::time &x, const field_attributes &attr)=0 |
Interface to serialize a time with given id. | |
virtual void | on_attribute (const char *id, matador::date &x, const field_attributes &attr)=0 |
Interface to serialize a date with given id. | |
virtual void | on_belongs_to (const char *id, matador::identifiable_holder &x, cascade_type cascade)=0 |
Interface to serialize an object with given id and cascade type. | |
virtual void | on_has_one (const char *id, matador::identifiable_holder &x, cascade_type cascade)=0 |
Interface to serialize an object with given id and cascade type. | |
virtual void | on_has_many (const char *, abstract_container &, const char *, const char *, cascade_type)=0 |
Interface to serialize a relation with given id. | |
virtual void | on_has_many (const char *, abstract_container &, cascade_type)=0 |
Interface to serialize a relation with given id. | |
A base class to serialize objects.
This class can be used as base class to create a concrete serializer class to serialize objects.
It is used if one need to pass a base class of a serializer instead a template.
|
pure virtual |
Interface to serialize a bool with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a char with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a char string with given id.
id | The id of the value |
x | The string value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a double with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a float with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a int with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a long with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a long long with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a date with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a time with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a short with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a string with given id.
id | The id of the value |
x | The string to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a unsigned char with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a unsigned int with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a unsigned long with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a unsigned long long with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize a unsigned short with given id.
id | The id of the value |
x | The value to be serialized |
attr | The field attributes |
|
pure virtual |
Interface to serialize an object with given id and cascade type.
id | The id of the value |
x | The object to be serialized |
cascade | The cascade type |
|
pure virtual |
Interface to serialize a relation with given id.
id | The id of the value |
x | The value to be serialized |
cascade | The cascade type |
|
pure virtual |
Interface to serialize a relation with given id.
id | The id of the value |
x | The value to be serialized |
owner_id | The name of the owner field |
item_id | The name of the item field |
cascade | The cascade type |
|
pure virtual |
Interface to serialize an object with given id and cascade type.
id | The id of the value |
x | The object to be serialized |
cascade | The cascade type |