10#ifndef MSGPACK_V1_TYPE_VECTOR_UNSIGNED_CHAR_HPP
11#define MSGPACK_V1_TYPE_VECTOR_UNSIGNED_CHAR_HPP
29template <
typename Alloc>
30struct convert<std::vector<unsigned char, Alloc> > {
33 case msgpack::type::BIN:
36#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
37#pragma GCC diagnostic push
38#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
41#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
42#pragma GCC diagnostic pop
46 case msgpack::type::STR:
49#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
50#pragma GCC diagnostic push
51#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
54#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7)) && !defined(__clang__)
55#pragma GCC diagnostic pop
67template <
typename Alloc>
68struct pack<std::vector<unsigned char, Alloc> > {
69 template <
typename Stream>
74 o.
pack_bin_body(
reinterpret_cast<char const*
>(&v.front()), size);
81template <
typename Alloc>
82struct object<std::vector<unsigned char, Alloc> > {
85 o.
type = msgpack::type::BIN;
87 o.
via.
bin.
ptr =
reinterpret_cast<char const*
>(&v.front());
93template <
typename Alloc>
97 o.
type = msgpack::type::BIN;
102 std::memcpy(ptr, &v.front(), size);
The class template that supports continuous packing.
Definition pack.hpp:33
packer< Stream > & pack_bin(uint32_t l)
Packing bin header and length.
Definition pack.hpp:1290
packer< Stream > & pack_bin_body(const char *b, uint32_t l)
Packing bin body.
Definition pack.hpp:1309
Definition object_fwd.hpp:231
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition cpp03_zone.hpp:255
Definition adaptor_base.hpp:15
uint32_t checked_get_container_size(T size)
Definition check_container_size.hpp:55
msgpack::object const & operator()(msgpack::object const &o, std::vector< unsigned char, Alloc > &v) const
Definition vector_unsigned_char.hpp:31
Definition adaptor_base.hpp:27
void operator()(msgpack::object &o, const std::vector< unsigned char, Alloc > &v) const
Definition vector_unsigned_char.hpp:83
void operator()(msgpack::object::with_zone &o, const std::vector< unsigned char, Alloc > &v) const
Definition vector_unsigned_char.hpp:95
Definition adaptor_base.hpp:43
Definition adaptor_base.hpp:38
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::vector< unsigned char, Alloc > &v) const
Definition vector_unsigned_char.hpp:70
Definition adaptor_base.hpp:32
msgpack::zone & zone
Definition object.hpp:37
uint32_t size
Definition object_fwd.hpp:38
const char * ptr
Definition object_fwd.hpp:39
const char * ptr
Definition object_fwd.hpp:34
uint32_t size
Definition object_fwd.hpp:33
Object class that corresponding to MessagePack format object.
Definition object_fwd.hpp:75
union_type via
Definition object_fwd.hpp:93
msgpack::type::object_type type
Definition object_fwd.hpp:92
msgpack::object_str str
Definition object_fwd.hpp:87
msgpack::object_bin bin
Definition object_fwd.hpp:88
#define MSGPACK_ZONE_ALIGNOF(type)
Definition cpp03_zone_decl.hpp:30
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition versioning.hpp:66