1 #ifndef ISPN_HOTROD_PROTOSTREAMMARSHALLER_H
2 #define ISPN_HOTROD_PROTOSTREAMMARSHALLER_H
9 #include "message-wrapping.pb.h"
11 using namespace org::infinispan::protostream;
13 namespace infinispan {
21 void marshall(
const T& obj, std::vector<char>& b) {
22 std::vector<char> msg(obj.ByteSize());
23 obj.SerializeToArray(msg.data(),obj.ByteSize());
25 wm.set_wrappedmessagebytes(msg.data(), msg.size());
26 wm.set_wrappeddescriptorid(42);
27 b.resize(wm.ByteSize());
28 wm.SerializeToArray(b.data(),wm.ByteSize());
31 T* unmarshall(
const std::vector<char>& b) {
33 bt->ParseFromArray(b.data(),b.size());
43 static void release(std::vector<char> *buf) {
48 bt.ParseFromArray(b,size);
static void noRelease(std::vector< char > *)
Definition: ProtoStreamMarshaller.h:41
Definition: ProtoStreamMarshaller.h:20
static T unmarshall(char *b, size_t size)
Definition: ProtoStreamMarshaller.h:46
Definition: ProtoStreamMarshaller.h:39
Definition: Marshaller.h:13
static void release(std::vector< char > *buf)
Definition: ProtoStreamMarshaller.h:43