1#ifndef SERIALIZATION_BUFFER_HPP_8G2XAHRG
2#define SERIALIZATION_BUFFER_HPP_8G2XAHRG
4#include <vanetza/common/byte_buffer.hpp>
5#include <vanetza/common/byte_buffer_sink.hpp>
6#include <vanetza/common/byte_buffer_source.hpp>
7#include <vanetza/geonet/serialization.hpp>
8#include <boost/iostreams/stream_buffer.hpp>
21void serialize_into_buffer(
const T& t, ByteBuffer& buf)
23 byte_buffer_sink sink(buf);
24 boost::iostreams::stream_buffer<byte_buffer_sink> stream(sink);
25 OutputArchive ar(stream);
35void deserialize_from_buffer(T& t,
const ByteBuffer& buf)
37 byte_buffer_source source(buf);
38 boost::iostreams::stream_buffer<byte_buffer_source> stream(source);
39 InputArchive ar(stream);