MessagePack for C++
unpack_decl.hpp
Go to the documentation of this file.
1 //
2 // MessagePack for C++ deserializing routine
3 //
4 // Copyright (C) 2016 KONDO Takatoshi
5 //
6 // Distributed under the Boost Software License, Version 1.0.
7 // (See accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 //
10 #ifndef MSGPACK_V2_UNPACK_DECL_HPP
11 #define MSGPACK_V2_UNPACK_DECL_HPP
12 
14 
15 namespace msgpack {
16 
20 
22 
23 using v1::unpack_error;
24 using v1::parse_error;
25 using v1::insufficient_bytes;
26 using v1::size_overflow;
27 using v1::array_size_overflow;
28 using v1::map_size_overflow;
29 using v1::str_size_overflow;
30 using v1::bin_size_overflow;
31 using v1::ext_size_overflow;
32 using v1::depth_size_overflow;
33 using v1::unpack_limit;
34 
35 namespace detail {
36 
37 using v1::detail::unpack_user;
38 
43 
48 
51 
53 
56 
57 using v1::detail::unpack_array;
59 using v1::detail::unpack_map;
64 
65 using v1::detail::unpack_stack;
66 
70 
72 
73 using v1::detail::fix_tag;
74 
75 using v1::detail::value;
76 
77 using v1::detail::load;
78 
79 } // detail
80 
81 
82 using v1::unpacked;
83 
85 class unpacker;
86 
87 template <typename unpack_visitor, typename referenced_buffer_hook>
89 
91 
104  const char* data, std::size_t len, std::size_t& off, bool& referenced,
105  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
106 
108 
120  const char* data, std::size_t len, std::size_t& off,
121  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
122 
124 
136  const char* data, std::size_t len, bool& referenced,
137  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
138 
140 
151  const char* data, std::size_t len,
152  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
153 
154 
156 
168 void unpack(
169  msgpack::object_handle& result,
170  const char* data, std::size_t len, std::size_t& off, bool& referenced,
171  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
172 
174 
185 void unpack(
186  msgpack::object_handle& result,
187  const char* data, std::size_t len, std::size_t& off,
188  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
189 
191 
202 void unpack(
203  msgpack::object_handle& result,
204  const char* data, std::size_t len, bool& referenced,
205  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
206 
208 
218 void unpack(
219  msgpack::object_handle& result,
220  const char* data, std::size_t len,
221  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
222 
224 
238  msgpack::zone& z,
239  const char* data, std::size_t len, std::size_t& off, bool& referenced,
240  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
241 
243 
256  msgpack::zone& z,
257  const char* data, std::size_t len, std::size_t& off,
258  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
259 
261 
274  msgpack::zone& z,
275  const char* data, std::size_t len, bool& referenced,
276  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
277 
279 
291  msgpack::zone& z,
292  const char* data, std::size_t len,
293  unpack_reference_func f = MSGPACK_NULLPTR, void* user_data = MSGPACK_NULLPTR, unpack_limit const& limit = unpack_limit());
294 
295 namespace detail {
296 
298 unpack_imp(const char* data, std::size_t len, std::size_t& off,
299  msgpack::zone& result_zone, msgpack::object& result, bool& referenced,
300  unpack_reference_func f, void* user_data,
301  unpack_limit const& limit);
302 
303 
304 } // detail
305 
307 } // MSGPACK_API_VERSION_NAMESPACE(v2)
309 
310 } // namespace msgpack
311 
312 #endif // MSGPACK_V2_UNPACK_DECL_HPP
msgpack::detail::unpack_map_item
void unpack_map_item(msgpack::object &c, msgpack::object const &k, msgpack::object const &v)
Definition: unpack.hpp:146
msgpack::detail::unpack_ext
void unpack_ext(unpack_user &u, const char *p, std::size_t l, msgpack::object &o)
Definition: unpack.hpp:190
msgpack::detail::unpack_int64
void unpack_int64(int64_t d, msgpack::object &o)
Definition: unpack.hpp:92
msgpack::detail::unpack_int32
void unpack_int32(int32_t d, msgpack::object &o)
Definition: unpack.hpp:88
msgpack::detail::unpack_int16
void unpack_int16(int16_t d, msgpack::object &o)
Definition: unpack.hpp:84
msgpack::detail::load
msgpack::enable_if< sizeof(T)==sizeof(fix_tag)>::type load(uint32_t &dst, const char *n)
Definition: unpack.hpp:279
msgpack::unpack_reference_func
bool(* unpack_reference_func)(msgpack::type::object_type type, std::size_t size, void *user_data)
The type of reference or copy judging function.
Definition: unpack_decl.hpp:74
msgpack::detail::incr_count
void incr_count(void *buffer)
Definition: unpack.hpp:248
msgpack
Definition: adaptor_base.hpp:15
msgpack::detail::unpack_bin
void unpack_bin(unpack_user &u, const char *p, uint32_t l, msgpack::object &o)
Definition: unpack.hpp:174
msgpack::detail::unpack_double
void unpack_double(double d, msgpack::object &o)
Definition: unpack.hpp:99
msgpack::detail::unpack_uint32
void unpack_uint32(uint32_t d, msgpack::object &o)
Definition: unpack.hpp:74
msgpack::detail::unpack_int8
void unpack_int8(int8_t d, msgpack::object &o)
Definition: unpack.hpp:80
msgpack::parse_return
parse_return
Definition: parse_return.hpp:23
msgpack::detail::unpack_imp
parse_return unpack_imp(const char *data, std::size_t len, std::size_t &off, msgpack::zone &result_zone, msgpack::object &result, bool &referenced, unpack_reference_func f=MSGPACK_NULLPTR, void *user_data=MSGPACK_NULLPTR, unpack_limit const &limit=unpack_limit())
Definition: unpack.hpp:1338
msgpack::detail::unpack_false
void unpack_false(msgpack::object &o)
Definition: unpack.hpp:108
msgpack::unpack
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
MSGPACK_API_VERSION_NAMESPACE
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
msgpack::zone
Definition: cpp03_zone.hpp:22
msgpack::detail::unpack_array_item
void unpack_array_item(msgpack::object &c, msgpack::object const &o)
Definition: unpack.hpp:124
msgpack::unpacked
object_handle unpacked
Definition: unpack_decl.hpp:207
msgpack::detail::get_count
std::atomic< unsigned int > const & get_count(void *buffer)
Definition: unpack.hpp:263
msgpack::detail::unpack_uint64
void unpack_uint64(uint64_t d, msgpack::object &o)
Definition: unpack.hpp:77
msgpack::detail::unpack_uint16
void unpack_uint16(uint16_t d, msgpack::object &o)
Definition: unpack.hpp:71
msgpack::detail::unpack_float
void unpack_float(float d, msgpack::object &o)
Definition: unpack.hpp:96
msgpack::detail::unpack_nil
void unpack_nil(msgpack::object &o)
Definition: unpack.hpp:102
msgpack::basic_unpacker
Definition: unpack_decl.hpp:88
v2
msgpack::detail::unpack_str
void unpack_str(unpack_user &u, const char *p, uint32_t l, msgpack::object &o)
Definition: unpack.hpp:158
unpack_decl.hpp
MSGPACK_NULLPTR
#define MSGPACK_NULLPTR
Definition: cpp_config_decl.hpp:35
msgpack::detail::decr_count
void decr_count(void *buffer)
Definition: unpack.hpp:235
msgpack::object_handle
The class holds object and zone.
Definition: object.hpp:44
msgpack::detail::unpack_uint8
void unpack_uint8(uint8_t d, msgpack::object &o)
Definition: unpack.hpp:68
msgpack::detail::init_count
void init_count(void *buffer)
Definition: unpack.hpp:226
msgpack::object
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
msgpack::detail::unpack_true
void unpack_true(msgpack::object &o)
Definition: unpack.hpp:105
msgpack::unpack_limit
Definition: unpack_decl.hpp:87