10 #ifndef MSGPACK_V2_CREATE_OBJECT_VISITOR_HPP
11 #define MSGPACK_V2_CREATE_OBJECT_VISITOR_HPP
13 #include <boost/assert.hpp>
36 #if !defined(MSGPACK_USE_CPP03)
90 obj->
via.
u64 =
static_cast<uint64_t
>(v);
111 BOOST_ASSERT(v ||
size == 0);
123 std::memcpy(tmp, v,
size);
135 BOOST_ASSERT(v ||
size == 0);
147 std::memcpy(tmp, v,
size);
159 BOOST_ASSERT(v ||
size == 0);
171 std::memcpy(tmp, v,
size);
188 if (num_elements == 0) {
193 #if SIZE_MAX == UINT_MAX
222 if (num_kv_pairs == 0) {
227 #if SIZE_MAX == UINT_MAX
Definition: create_object_visitor.hpp:28
bool visit_float64(double v)
Definition: create_object_visitor.hpp:104
bool end_array()
Definition: create_object_visitor.hpp:212
bool visit_ext(const char *v, uint32_t size)
Definition: create_object_visitor.hpp:158
bool end_map()
Definition: create_object_visitor.hpp:252
std::vector< msgpack::object * > m_stack
Definition: create_object_visitor.hpp:268
bool visit_positive_integer(uint64_t v)
Definition: create_object_visitor.hpp:80
bool visit_negative_integer(int64_t v)
Definition: create_object_visitor.hpp:86
void set_referenced(bool referenced)
Definition: create_object_visitor.hpp:67
bool m_referenced
Definition: create_object_visitor.hpp:270
msgpack::object m_obj
Definition: create_object_visitor.hpp:267
msgpack::object const & data() const
Definition: create_object_visitor.hpp:59
create_object_visitor & operator=(create_object_visitor &&other)
Definition: create_object_visitor.hpp:47
void insufficient_bytes(size_t, size_t)
Definition: create_object_visitor.hpp:259
bool end_array_item()
Definition: create_object_visitor.hpp:208
msgpack::zone const & zone() const
Definition: create_object_visitor.hpp:63
void init()
Definition: create_object_visitor.hpp:54
bool end_map_value()
Definition: create_object_visitor.hpp:248
void set_zone(msgpack::zone &zone)
Definition: create_object_visitor.hpp:65
bool start_map_key()
Definition: create_object_visitor.hpp:238
bool visit_str(const char *v, uint32_t size)
Definition: create_object_visitor.hpp:110
unpack_limit m_limit
Definition: create_object_visitor.hpp:266
bool visit_nil()
Definition: create_object_visitor.hpp:69
msgpack::zone & zone()
Definition: create_object_visitor.hpp:64
msgpack::zone * m_zone
Definition: create_object_visitor.hpp:269
bool end_map_key()
Definition: create_object_visitor.hpp:241
bool referenced() const
Definition: create_object_visitor.hpp:66
bool start_array_item()
Definition: create_object_visitor.hpp:205
bool start_array(uint32_t num_elements)
Definition: create_object_visitor.hpp:182
bool visit_float32(float v)
Definition: create_object_visitor.hpp:98
unpack_reference_func m_func
Definition: create_object_visitor.hpp:264
create_object_visitor(create_object_visitor &&other)
Definition: create_object_visitor.hpp:37
bool visit_boolean(bool v)
Definition: create_object_visitor.hpp:74
bool visit_bin(const char *v, uint32_t size)
Definition: create_object_visitor.hpp:134
bool start_map_value()
Definition: create_object_visitor.hpp:245
create_object_visitor(unpack_reference_func f, void *user_data, unpack_limit const &limit)
Definition: create_object_visitor.hpp:30
void parse_error(size_t, size_t)
Definition: create_object_visitor.hpp:256
bool start_map(uint32_t num_kv_pairs)
Definition: create_object_visitor.hpp:216
void * m_user_data
Definition: create_object_visitor.hpp:265
Definition: unpack_decl.hpp:87
std::size_t bin() const
Definition: unpack_decl.hpp:105
std::size_t str() const
Definition: unpack_decl.hpp:104
std::size_t map() const
Definition: unpack_decl.hpp:103
std::size_t depth() const
Definition: unpack_decl.hpp:107
std::size_t array() const
Definition: unpack_decl.hpp:102
std::size_t ext() const
Definition: unpack_decl.hpp:106
Definition: cpp03_zone.hpp:31
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition: cpp03_zone.hpp:256
std::size_t size(T const &t)
Definition: size_equal_only.hpp:24
@ EXT
Definition: object_fwd_decl.hpp:42
@ FLOAT64
Definition: object_fwd_decl.hpp:33
@ BOOLEAN
Definition: object_fwd_decl.hpp:29
@ MAP
Definition: object_fwd_decl.hpp:41
@ NIL
Definition: object_fwd_decl.hpp:28
@ STR
Definition: object_fwd_decl.hpp:38
@ ARRAY
Definition: object_fwd_decl.hpp:40
@ BIN
Definition: object_fwd_decl.hpp:39
@ POSITIVE_INTEGER
Definition: object_fwd_decl.hpp:30
@ NEGATIVE_INTEGER
Definition: object_fwd_decl.hpp:31
@ FLOAT32
Definition: object_fwd_decl.hpp:32
Definition: adaptor_base.hpp:15
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
Definition: unpack_exception.hpp:61
Definition: unpack_exception.hpp:88
Definition: unpack_exception.hpp:106
Definition: unpack_exception.hpp:97
Definition: unpack_exception.hpp:43
Definition: unpack_exception.hpp:70
uint32_t size
Definition: object_fwd.hpp:23
msgpack::object * ptr
Definition: object_fwd.hpp:24
uint32_t size
Definition: object_fwd.hpp:38
const char * ptr
Definition: object_fwd.hpp:39
const char * ptr
Definition: object_fwd.hpp:46
uint32_t size
Definition: object_fwd.hpp:45
Definition: object.hpp:30
uint32_t size
Definition: object_fwd.hpp:28
msgpack::object_kv * ptr
Definition: object_fwd.hpp:29
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
Definition: unpack_exception.hpp:34
Definition: unpack_exception.hpp:79
bool boolean
Definition: object_fwd.hpp:77
msgpack::object_array array
Definition: object_fwd.hpp:85
msgpack::object_ext ext
Definition: object_fwd.hpp:89
msgpack::object_str str
Definition: object_fwd.hpp:87
uint64_t u64
Definition: object_fwd.hpp:78
int64_t i64
Definition: object_fwd.hpp:79
msgpack::object_bin bin
Definition: object_fwd.hpp:88
double f64
Definition: object_fwd.hpp:84
msgpack::object_map map
Definition: object_fwd.hpp:86
#define MSGPACK_EMBED_STACK_SIZE
Definition: unpack_define.hpp:16
#define MSGPACK_NULLPTR
Definition: cpp_config_decl.hpp:85
#define MSGPACK_ZONE_ALIGNOF(type)
Definition: cpp03_zone_decl.hpp:30
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:66