7#include <bond/core/config.h>
10#include "select_protocol.h"
18template <
typename Protocols = BuiltInProtocols,
typename T,
typename Writer>
21 Apply<Protocols>(Serializer<Writer, Protocols>(output), obj);
26template <
typename Protocols = BuiltInProtocols,
typename Reader,
typename T>
34template <
typename T,
typename Protocols = BuiltInProtocols,
typename Reader>
44template <
typename Protocols = BuiltInProtocols,
typename Reader,
typename T>
52template <
typename T,
typename Protocols = BuiltInProtocols,
typename Reader>
62template <
typename Protocols,
typename T,
typename Writer>
63inline void Marshal(
const T& obj, Writer& output)
65 Apply<Protocols>(Marshaler<Writer, Protocols>(output), obj);
70template <
typename Protocols = BuiltInProtocols,
typename Buffer,
typename T>
73 SelectProtocolAndApply<T, Protocols>(input, To<T, Protocols>(obj));
78template <
typename T,
typename Protocols = BuiltInProtocols,
typename Buffer>
82 SelectProtocolAndApply<T, Protocols>(input, To<T, Protocols>(tmp));
88template <
typename Protocols = BuiltInProtocols,
typename Buffer,
typename T>
91 SelectProtocolAndApply<T, Protocols>(input, boost::ref(obj));
96template <
typename Protocols = BuiltInProtocols,
typename Buffer,
typename T>
99 SelectProtocolAndApply<Protocols>(schema, input, To<T, Protocols>(obj));
104template <
typename T,
typename Protocols = BuiltInProtocols,
typename Buffer>
108 SelectProtocolAndApply<Protocols>(schema, input, To<T, Protocols>(tmp));
115template <
typename Protocols = BuiltInProtocols,
typename Buffer,
typename T>
118 SelectProtocolAndApply<Protocols>(schema, input, boost::ref(obj));
124template <
typename Protocols = BuiltInProtocols,
typename T,
typename Reader,
typename Writer>
125inline void Merge(
const T& obj, Reader input, Writer& output)
127 Apply<Protocols>(Merger<T, Writer, Protocols>(obj, output),
bonded<T>(input));
Represents runtime schema See User's Manual
Definition: runtime_schema.h:26
Represents data for a struct T known at compile-time.
Definition: bonded.h:63
namespace bond
Definition: apply.h:17
void Serialize(const T &obj, Writer &output)
Serialize an object using a protocol writer.
Definition: bond.h:19
void Deserialize(Reader input, T &obj)
Deserialize an object from a protocol reader.
Definition: bond.h:27
void Marshal(const T &obj, Writer &output)
Marshal an object using a protocol writer.
Definition: bond.h:63
void Merge(const T &obj, Reader input, Writer &output)
Merge an object with serialize data and write the result using a protocol writer.
Definition: bond.h:125
void Unmarshal(Buffer input, T &obj)
Unmarshal an object from data stream.
Definition: bond.h:71