7#include <bond/core/config.h>
8#include <bond/core/detail/recursionguard.h>
11#include "select_protocol.h"
19template <
typename Protocols = BuiltInProtocols,
typename T,
typename Writer>
22 Apply<Protocols>(Serializer<Writer, Protocols>(output), obj);
27template <
typename Protocols = BuiltInProtocols,
typename Reader,
typename T>
35template <
typename T,
typename Protocols = BuiltInProtocols,
typename Reader>
45template <
typename Protocols = BuiltInProtocols,
typename Reader,
typename T>
53template <
typename T,
typename Protocols = BuiltInProtocols,
typename Reader>
63template <
typename Protocols,
typename T,
typename Writer>
64inline void Marshal(
const T& obj, Writer& output)
66 Apply<Protocols>(Marshaler<Writer, Protocols>(output), obj);
71template <
typename Protocols = BuiltInProtocols,
typename Buffer,
typename T>
74 SelectProtocolAndApply<T, Protocols>(input, To<T, Protocols>(obj));
79template <
typename T,
typename Protocols = BuiltInProtocols,
typename Buffer>
83 SelectProtocolAndApply<T, Protocols>(input, To<T, Protocols>(tmp));
89template <
typename Protocols = BuiltInProtocols,
typename Buffer,
typename T>
92 SelectProtocolAndApply<T, Protocols>(input, boost::ref(obj));
97template <
typename Protocols = BuiltInProtocols,
typename Buffer,
typename T>
100 SelectProtocolAndApply<Protocols>(schema, input, To<T, Protocols>(obj));
105template <
typename T,
typename Protocols = BuiltInProtocols,
typename Buffer>
109 SelectProtocolAndApply<Protocols>(schema, input, To<T, Protocols>(tmp));
116template <
typename Protocols = BuiltInProtocols,
typename Buffer,
typename T>
119 SelectProtocolAndApply<Protocols>(schema, input, boost::ref(obj));
125template <
typename Protocols = BuiltInProtocols,
typename T,
typename Reader,
typename Writer>
126inline void Merge(
const T& obj, Reader input, Writer& output)
128 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
static void SetMaxDepth(uint32_t value)
Sets the maximum recursion depth permitted.
Definition recursionguard.h:52
namespace bond
Definition apply.h:17
void Serialize(const T &obj, Writer &output)
Serialize an object using a protocol writer.
Definition bond.h:20
void Deserialize(Reader input, T &obj)
Deserialize an object from a protocol reader.
Definition bond.h:28
void Marshal(const T &obj, Writer &output)
Marshal an object using a protocol writer.
Definition bond.h:64
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:126
void SetDeserializeMaxDepth(uint32_t value)
Sets the maximum recursion depth permitted for deserialization operations.
Definition bond.h:132
void Unmarshal(Buffer input, T &obj)
Unmarshal an object from data stream.
Definition bond.h:72