Go to the documentation of this file.
10 #ifndef MSGPACK_V1_CPP11_DEFINE_ARRAY_HPP
11 #define MSGPACK_V1_CPP11_DEFINE_ARRAY_HPP
24 template <
typename Tuple, std::
size_t N>
26 template <
typename Packer>
27 static void pack(Packer& pk, Tuple
const& t) {
29 pk.pack(std::get<N-1>(t));
34 if(
size <= N-1) {
return; }
43 template <
typename Tuple>
45 template <
typename Packer>
46 static void pack(Packer& pk, Tuple
const& t) {
47 pk.pack(std::get<0>(t));
51 if(
size <= 0) {
return; }
59 template <
typename... Args>
65 template <
typename Packer>
68 pk.pack_array(
sizeof...(Args));
87 std::tuple<Args&...>
a;
94 template <
typename Packer>
113 return define_array<>();
116 template <
typename... Args>
128 #endif // MSGPACK_V1_CPP11_DEFINE_ARRAY_HPP
Definition: cpp03_define_array.hpp:26
static void unpack(msgpack::object const &o, Tuple &t)
Definition: cpp11_define_array.hpp:49
std::tuple tuple_type
Definition: cpp11_define_array.hpp:93
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition: cpp03_zone.hpp:246
Definition: cpp11_define_array.hpp:60
Definition: adaptor_base.hpp:15
#define MSGPACK_ZONE_ALIGNOF(type)
Definition: cpp03_zone_decl.hpp:30
void msgpack_object(msgpack::object *o, msgpack::zone &) const
Definition: cpp11_define_array.hpp:103
void msgpack_pack(Packer &pk) const
Definition: cpp11_define_array.hpp:95
void msgpack_pack(Packer &pk) const
Definition: cpp11_define_array.hpp:66
static void object(msgpack::object *o, msgpack::zone &z, Tuple const &t)
Definition: cpp11_define_array.hpp:37
std::tuple< Args... > tuple_type
Definition: cpp11_define_array.hpp:62
msgpack::object_handle unpack(const char *data, std::size_t len, std::size_t &off, bool &referenced, unpack_reference_func f, void *user_data, unpack_limit const &limit)
Unpack msgpack::object from a buffer.
Definition: unpack.hpp:1382
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
union_type via
Definition: object_fwd.hpp:93
Definition: cpp03_zone.hpp:22
msgpack::object * ptr
Definition: object_fwd.hpp:24
static void pack(Packer &pk, Tuple const &t)
Definition: cpp11_define_array.hpp:46
void pack(msgpack::packer< Stream > &o, const T &v)
Definition: object.hpp:1201
void msgpack_object(msgpack::object *o, msgpack::zone &z) const
Definition: cpp11_define_array.hpp:78
std::size_t size(T const &t)
Definition: size_equal_only.hpp:24
define_array(Args &... args)
Definition: cpp11_define_array.hpp:63
uint32_t size
Definition: object_fwd.hpp:23
void msgpack_unpack(msgpack::object const &o)
Definition: cpp11_define_array.hpp:99
msgpack::object_array array
Definition: object_fwd.hpp:85
@ ARRAY
Definition: object_fwd_decl.hpp:41
static void unpack(msgpack::object const &o, Tuple &t)
Definition: cpp11_define_array.hpp:31
void msgpack_unpack(msgpack::object const &o)
Definition: cpp11_define_array.hpp:72
Definition: cpp11_define_array.hpp:25
std::tuple< Args &... > a
Definition: cpp11_define_array.hpp:87
Definition: object_fwd.hpp:236
static void pack(Packer &pk, Tuple const &t)
Definition: cpp11_define_array.hpp:27
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
std::enable_if< has_as< T >::value >::type convert_helper(msgpack::object const &o, T &t)
Definition: cpp11_convert_helper.hpp:27
define_array make_define_array()
Definition: cpp03_define_array.hpp:4274
msgpack::type::object_type type
Definition: object_fwd.hpp:92
define_array value_type
Definition: cpp11_define_array.hpp:92
static void object(msgpack::object *o, msgpack::zone &z, Tuple const &t)
Definition: cpp11_define_array.hpp:54
define_array< Args... > value_type
Definition: cpp11_define_array.hpp:61