1 #ifndef _DATA_TRANSMIT_
2 #define _DATA_TRANSMIT_
4 #include "object_stream.h"
5 #include "object_serializer.h"
10 * @brief Data pack representing obj_val
12 * @details Instances of this class are data packs cointaining
13 * all fields of obj_val object.
15 class data_pack
: public serialized_object
{
17 virtual ~data_pack(){}
21 * @brief Serializer of objects transported by value.
23 * @details This is a base class for all serializers able to
24 * marshall objects that can be transmitted only by their value.
26 class data_transmit
: public object_serializer
{
30 * This method returns a stream of objects that can be
31 * used by an instance to serialize or deserialize
33 * @return stream of objects
35 virtual object_stream
&get_stream() const = 0;
39 * This method serializes object by creating a pack of data
40 * it is cointainging. In most implementations contribution
41 * of the object itself is required.
42 * @param obj object that is to be serialized
43 * @return pack of data, ready to be sent
45 virtual serialized_object
serialize(p
<object
> obj
) = 0;
49 * This method creates a exact copy of object basing on
50 * received pack of data. In most implementations
51 * contribution of the object itself is required.
52 * @param data received pack of data
53 * @return deserialized object
55 virtual p
<object
> deserialize(const serialized_object
&data
) = 0;