1 #ifndef _REF_TRANSMIT_H_
2 #define _REF_TRANSMIT_H_
7 * @brief Stub of obj_ref instances
9 * @details Instances of this class are used to transport
10 * information about objects marshalled by references. On
11 * its basis are generated fake obj_ref instances that allow
12 * to access the real object.
14 class rpc_stub
: public serialized_object
{
16 virtual ~rpc_stub() { }
20 * @brief Serializer of objects transported by reference.
22 * @details This is a base class for all serializers able to
23 * marshall objects that can be transmitted only by reference.
25 class ref_transmit
: public object_serializer
{
29 * This method serializes object by creating a stub which
30 * allows to locate and acces the certain instance of
31 * class from anywhere in ODS network.
32 * @param obj object that is to be serialized
33 * @return object stub, ready to be sent
35 virtual serialized_object
serialize(p
<object
> obj
) = 0;
39 * This method creates a fake instance of obj_ref basing
40 * of received stub. That instance allows to transparently
41 * transport calls between client and server.
42 * @param stub serialized instance of obj_ref
43 * @return fake instance of obj_ref
45 virtual p
<object
> deserialize(const serialized_object
&stub
) = 0;