MessagePack for C++
Namespaces | Classes | Typedefs | Enumerations | Functions
msgpack Namespace Reference

Namespaces

 adaptor
 
 detail
 
 type
 

Classes

struct  array_size_overflow
 
class  basic_unpacker
 
struct  bin_size_overflow
 
struct  container_size_overflow
 
class  define
 
struct  depth_size_overflow
 
struct  enable_if
 
struct  ext_size_overflow
 
class  fbuffer
 
struct  gen_seq
 
struct  gen_seq< 0, Is... >
 
struct  has_as
 
struct  insufficient_bytes
 
struct  integral_constant
 
struct  is_array
 
struct  is_non_const_pointer
 
struct  is_pointer
 
struct  is_same
 
struct  map_size_overflow
 
struct  MsgpackTupleAs
 
struct  MsgpackTupleAs<>
 
struct  MsgpackTupleAsImpl
 
struct  MsgpackTupleConverter
 
struct  MsgpackTupleConverter< Tuple, 0 >
 
struct  MsgpackTupleConverter< Tuple, 1 >
 
struct  MsgpackTuplePacker
 
struct  MsgpackTuplePacker< Stream, Tuple, 0 >
 
struct  MsgpackTuplePacker< Stream, Tuple, 1 >
 
struct  MsgpackTupleToObjectWithZone
 
struct  MsgpackTupleToObjectWithZone< Tuple, 0 >
 
struct  MsgpackTupleToObjectWithZone< Tuple, 1 >
 
struct  null_visitor
 
struct  object
 Object class that corresponding to MessagePack format object. More...
 
struct  object_array
 
struct  object_bin
 
struct  object_ext
 
class  object_handle
 The class holds object and zone. More...
 
struct  object_kv
 
struct  object_map
 
struct  object_str
 
class  packer
 The class template that supports continuous packing. More...
 
struct  parse_error
 
class  parser
 Unpacking class for a stream deserialization. More...
 
struct  remove_const
 
struct  remove_cv
 
struct  remove_volatile
 
class  sbuffer
 
struct  seq
 
struct  size_overflow
 
struct  StdTupleAs
 
struct  StdTupleAs<>
 
struct  StdTupleAsImpl
 
struct  StdTupleConverter
 
struct  StdTupleConverter< Tuple, 0 >
 
struct  StdTuplePacker
 
struct  StdTuplePacker< Stream, Tuple, 0 >
 
struct  StdTupleToObjectWithZone
 
struct  StdTupleToObjectWithZone< Tuple, 0 >
 
struct  str_size_overflow
 
class  type_error
 
struct  underlying_type
 
struct  unique_ptr
 
struct  unpack_error
 
class  unpack_limit
 
class  unpacker
 Unpacking class for a stream deserialization. More...
 
class  vrefbuffer
 
class  zbuffer
 
class  zone
 
struct  zone_push_finalizer
 

Typedefs

typedef integral_constant< bool, true > true_type
 
typedef integral_constant< bool, false > false_type
 
template<template< class > class T, class... U>
using all_of = detail::all_of_imp< T< U >::value... >
 
typedef bool(* unpack_reference_func) (msgpack::type::object_type type, std::size_t size, void *user_data)
 The type of reference or copy judging function. More...
 
typedef object_handle unpacked
 
typedef enum msgpack::unpack_return unpack_return
 

Enumerations

enum  unpack_return {
  UNPACK_SUCCESS = 2, UNPACK_EXTRA_BYTES = 1, UNPACK_CONTINUE = 0, UNPACK_PARSE_ERROR = -1,
  UNPACK_SUCCESS = 2, UNPACK_EXTRA_BYTES = 1, UNPACK_CONTINUE = 0, UNPACK_PARSE_ERROR = -1,
  UNPACK_STOP_VISITOR = -2
}
 
enum  unpack_return {
  UNPACK_SUCCESS = 2, UNPACK_EXTRA_BYTES = 1, UNPACK_CONTINUE = 0, UNPACK_PARSE_ERROR = -1,
  UNPACK_SUCCESS = 2, UNPACK_EXTRA_BYTES = 1, UNPACK_CONTINUE = 0, UNPACK_PARSE_ERROR = -1,
  UNPACK_STOP_VISITOR = -2
}
 

Functions

template<typename T >
msgpack::enable_if< !is_array< T >::value, msgpack::object const & >::type operator>> (msgpack::object const &o, T &v)
 
template<typename T , std::size_t N>
msgpack::object const & operator>> (msgpack::object const &o, T(&v)[N])
 
template<typename Stream , typename T >
msgpack::enable_if< !is_array< T >::value, msgpack::packer< Stream > & >::type operator<< (msgpack::packer< Stream > &o, T const &v)
 
template<typename Stream , typename T , std::size_t N>
msgpack::packer< Stream > & operator<< (msgpack::packer< Stream > &o, const T(&v)[N])
 
template<typename T >
msgpack::enable_if< !is_array< T >::value >::type operator<< (msgpack::object &o, T const &v)
 
template<typename T , std::size_t N>
void operator<< (msgpack::v1::object &o, const T(&v)[N])
 
template<typename T >
msgpack::enable_if< !is_array< T >::value >::type operator<< (msgpack::object::with_zone &o, T const &v)
 
template<typename T , std::size_t N>
void operator<< (msgpack::object::with_zone &o, const T(&v)[N])
 
template<typename T , std::size_t N>
void operator<< (msgpack::object &o, const T(&v)[N])
 
template<typename T >
uint32_t checked_get_container_size (T size)
 
template<typename T >
T & move (T &t)
 
template<typename T >
T const & move (T const &t)
 
std::size_t aligned_size (std::size_t size, std::size_t align)
 
msgpack::object_kvbegin (msgpack::object_map &map)
 
const msgpack::object_kvbegin (const msgpack::object_map &map)
 
msgpack::object_kvend (msgpack::object_map &map)
 
const msgpack::object_kvend (const msgpack::object_map &map)
 
msgpack::objectbegin (msgpack::object_array &array)
 
const msgpack::objectbegin (const msgpack::object_array &array)
 
msgpack::objectend (msgpack::object_array &array)
 
const msgpack::objectend (const msgpack::object_array &array)
 
std::size_t aligned_zone_size (msgpack::object const &obj)
 
object_handle clone (msgpack::object const &obj)
 clone object More...
 
bool operator== (const msgpack::object &x, const msgpack::object &y)
 
template<typename T >
bool operator== (const msgpack::object &x, const T &y)
 
bool operator!= (const msgpack::object &x, const msgpack::object &y)
 
template<typename T >
bool operator== (const T &y, const msgpack::object &x)
 
template<typename T >
bool operator!= (const msgpack::object &x, const T &y)
 
template<typename T >
bool operator!= (const T &y, const msgpack::object &x)
 
void operator<< (msgpack::object &o, const msgpack_object &v)
 
template<typename T >
void convert (T &v, msgpack::object const &o)
 
template<typename Stream , typename T >
void pack (msgpack::packer< Stream > &o, const T &v)
 
template<typename Stream , typename T >
void pack_copy (msgpack::packer< Stream > &o, T v)
 
template<typename Stream >
msgpack::packer< Stream > & operator<< (msgpack::packer< Stream > &o, const msgpack::object &v)
 
template<typename Stream >
msgpack::packer< Stream > & operator<< (msgpack::packer< Stream > &o, const msgpack::object::with_zone &v)
 
std::ostream & operator<< (std::ostream &s, const msgpack::object &o)
 
template<typename Stream , typename T >
void pack (Stream *s, const T &v)
 Pack the value as MessagePack format into the stream. More...
 
template<typename Stream , typename T >
void pack (Stream &s, const T &v)
 Pack the value as MessagePack format into the stream. More...
 
msgpack::object_handle unpack (const char *data, std::size_t len, std::size_t &off, bool &referenced, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
msgpack::object_handle unpack (const char *data, std::size_t len, std::size_t &off, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
msgpack::object_handle unpack (const char *data, std::size_t len, bool &referenced, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
msgpack::object_handle unpack (const char *data, std::size_t len, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
void unpack (object_handle &result, const char *data, std::size_t len, std::size_t &off, bool &referenced, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
void unpack (object_handle &result, const char *data, std::size_t len, std::size_t &off, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
void unpack (object_handle &result, const char *data, std::size_t len, bool &referenced, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
void unpack (object_handle &result, const char *data, std::size_t len, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
msgpack::object unpack (msgpack::zone &z, const char *data, std::size_t len, std::size_t &off, bool &referenced, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
msgpack::object unpack (msgpack::zone &z, const char *data, std::size_t len, std::size_t &off, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
msgpack::object unpack (msgpack::zone &z, const char *data, std::size_t len, bool &referenced, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
msgpack::object unpack (msgpack::zone &z, const char *data, std::size_t len, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. More...
 
void unpack (object_handle *result, const char *data, std::size_t len, std::size_t *off=nullptr, bool *referenced=nullptr, unpack_reference_func f=nullptr, void *user_data=nullptr, unpack_limit const &limit=unpack_limit())
 Unpack msgpack::object from a buffer. [obsolete]. More...
 
void unpack (msgpack::object_handle &result, const char *data, std::size_t len, std::size_t &off, msgpack::v2::unpack_reference_func f, void *user_data, unpack_limit const &limit)
 
template<typename Visitor >
bool parse (const char *data, size_t len, size_t &off, Visitor &v)
 Unpack msgpack formatted data via a visitor. More...
 
template<typename Visitor >
bool parse (const char *data, size_t len, Visitor &v)
 Unpack msgpack formatted data via a visitor. More...
 

Typedef Documentation

template<template< class > class T, class... U>
using msgpack::all_of = typedef detail::all_of_imp<T<U>::value...>
typedef integral_constant<bool, false> msgpack::false_type
typedef bool(* msgpack::unpack_reference_func) (msgpack::type::object_type type, std::size_t size, void *user_data)

The type of reference or copy judging function.

Parameters
typemsgpack data type.
sizemsgpack data size.
user_dataThe user_data that is set by msgpack::unpack functions.
Returns
If the data should be referenced, then return true, otherwise (should be copied) false.

This function is called when unpacking STR, BIN, or EXT.

Enumeration Type Documentation

Enumerator
UNPACK_SUCCESS 
UNPACK_EXTRA_BYTES 
UNPACK_CONTINUE 
UNPACK_PARSE_ERROR 
UNPACK_SUCCESS 
UNPACK_EXTRA_BYTES 
UNPACK_CONTINUE 
UNPACK_PARSE_ERROR 
UNPACK_STOP_VISITOR 
Enumerator
UNPACK_SUCCESS 
UNPACK_EXTRA_BYTES 
UNPACK_CONTINUE 
UNPACK_PARSE_ERROR 
UNPACK_SUCCESS 
UNPACK_EXTRA_BYTES 
UNPACK_CONTINUE 
UNPACK_PARSE_ERROR 
UNPACK_STOP_VISITOR 

Function Documentation

std::size_t msgpack::aligned_size ( std::size_t  size,
std::size_t  align 
)
inline
std::size_t msgpack::aligned_zone_size ( msgpack::object const &  obj)
inline
msgpack::object_kv * msgpack::begin ( msgpack::object_map map)
inline
const msgpack::object_kv * msgpack::begin ( const msgpack::object_map map)
inline
msgpack::object * msgpack::begin ( msgpack::object_array array)
inline
const msgpack::object * msgpack::begin ( const msgpack::object_array array)
inline
template<typename T >
uint32_t msgpack::checked_get_container_size ( size)
inline

Referenced by msgpack::adaptor::pack< const char * >::operator()(), msgpack::adaptor::object_with_zone< const char * >::operator()(), msgpack::adaptor::pack< std::vector< bool, Alloc > >::operator()(), msgpack::adaptor::pack< std::string >::operator()(), msgpack::adaptor::pack< std::tuple< Args... > >::operator()(), msgpack::adaptor::pack< std::array< unsigned char, N > >::operator()(), msgpack::adaptor::pack< std::array< char, N > >::operator()(), msgpack::adaptor::object< const char * >::operator()(), msgpack::adaptor::as< T, typename msgpack::enable_if< boost::fusion::traits::is_sequence< T >::value &&boost::mpl::fold< T, boost::mpl::bool_< true >, boost::mpl::if_< boost::mpl::and_< boost::mpl::_1, msgpack::has_as< boost::mpl::_2 > >, boost::mpl::bool_< true >, boost::mpl::bool_< false > > >::type::value >::type >::operator()(), msgpack::adaptor::object< std::string >::operator()(), msgpack::adaptor::pack< std::forward_list< T, Alloc > >::operator()(), msgpack::adaptor::pack< std::unordered_set< Key, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::vector< bool, Alloc > >::operator()(), msgpack::adaptor::object< std::array< char, N > >::operator()(), msgpack::adaptor::object< std::array< unsigned char, N > >::operator()(), msgpack::adaptor::pack< std::unordered_map< K, V, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::list< T, Alloc > >::operator()(), msgpack::adaptor::pack< std::deque< T, Alloc > >::operator()(), msgpack::adaptor::pack< std::vector< unsigned char, Alloc > >::operator()(), msgpack::adaptor::pack< std::set< T, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::string >::operator()(), msgpack::adaptor::pack< std::vector< char, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::forward_list< T, Alloc > >::operator()(), msgpack::adaptor::pack< std::vector< T, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::array< char, N > >::operator()(), msgpack::adaptor::object_with_zone< std::array< unsigned char, N > >::operator()(), msgpack::adaptor::object_with_zone< std::unordered_set< Key, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::list< T, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::unordered_map< K, V, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::deque< T, Alloc > >::operator()(), msgpack::adaptor::object< std::vector< char, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::set< T, Compare, Alloc > >::operator()(), msgpack::adaptor::object< std::vector< unsigned char, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::vector< T, Alloc > >::operator()(), msgpack::adaptor::convert< T, typename msgpack::enable_if< boost::fusion::traits::is_sequence< T >::value >::type >::operator()(), msgpack::adaptor::pack< type::assoc_vector< K, V, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::vector< char, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::vector< unsigned char, Alloc > >::operator()(), msgpack::adaptor::pack< char[N]>::operator()(), msgpack::adaptor::object_with_zone< type::assoc_vector< K, V, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::array< T, N > >::operator()(), msgpack::adaptor::pack< T, typename msgpack::enable_if< boost::fusion::traits::is_sequence< T >::value >::type >::operator()(), msgpack::adaptor::pack< const char[N]>::operator()(), msgpack::adaptor::object_with_zone< std::array< T, N > >::operator()(), msgpack::adaptor::pack< unsigned char[N]>::operator()(), msgpack::adaptor::pack< std::unordered_multiset< Key, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< T, typename msgpack::enable_if< boost::fusion::traits::is_sequence< T >::value >::type >::operator()(), msgpack::adaptor::pack< const unsigned char[N]>::operator()(), msgpack::adaptor::pack< std::unordered_multimap< K, V, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::unordered_multiset< Key, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::pack< std::multiset< T, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::unordered_multimap< K, V, Hash, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< std::tuple< Args... > >::operator()(), msgpack::adaptor::object_with_zone< char[N]>::operator()(), msgpack::adaptor::object_with_zone< std::multiset< T, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< const char[N]>::operator()(), msgpack::adaptor::pack< std::map< K, V, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< unsigned char[N]>::operator()(), msgpack::adaptor::object_with_zone< std::map< K, V, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< const unsigned char[N]>::operator()(), msgpack::adaptor::object< char[N]>::operator()(), msgpack::adaptor::object< const char[N]>::operator()(), msgpack::adaptor::pack< msgpack::type::array_ref< T > >::operator()(), msgpack::adaptor::pack< msgpack::type::array_ref< T[N]> >::operator()(), msgpack::adaptor::object_with_zone< msgpack::type::array_ref< T > >::operator()(), msgpack::adaptor::pack< std::multimap< K, V, Compare, Alloc > >::operator()(), msgpack::adaptor::object_with_zone< msgpack::type::array_ref< T[N]> >::operator()(), and msgpack::adaptor::object_with_zone< std::multimap< K, V, Compare, Alloc > >::operator()().

object_handle msgpack::clone ( msgpack::object const &  obj)
inline

clone object

Clone (deep copy) object. The copied object is located on newly allocated zone.

Parameters
objcopy source object
Returns
object_handle that holds deep copied object and zone.

References aligned_zone_size(), and move().

template<typename T >
void msgpack::convert ( T &  v,
msgpack::object const &  o 
)
inline
msgpack::object_kv * msgpack::end ( msgpack::object_map map)
inline
const msgpack::object_kv * msgpack::end ( const msgpack::object_map map)
inline
msgpack::object * msgpack::end ( msgpack::object_array array)
inline
const msgpack::object * msgpack::end ( const msgpack::object_array array)
inline
template<typename T >
T& msgpack::move ( T &  t)
template<typename T >
T const& msgpack::move ( T const &  t)
bool msgpack::operator!= ( const msgpack::object x,
const msgpack::object y 
)
inline
template<typename T >
bool msgpack::operator!= ( const msgpack::object x,
const T &  y 
)
inline
template<typename T >
bool msgpack::operator!= ( const T &  y,
const msgpack::object x 
)
inline
template<typename T , std::size_t N>
void msgpack::operator<< ( msgpack::object o,
const T(&)  v[N] 
)
template<typename Stream , typename T , std::size_t N>
msgpack::packer< Stream > & msgpack::operator<< ( msgpack::packer< Stream > &  o,
const T(&)  v[N] 
)
inline
template<typename Stream , typename T >
msgpack::enable_if< !is_array< T >::value, msgpack::packer< Stream > & >::type msgpack::operator<< ( msgpack::packer< Stream > &  o,
T const &  v 
)
inline
template<typename T >
msgpack::enable_if< !is_array< T >::value >::type msgpack::operator<< ( msgpack::object o,
T const &  v 
)
inline
template<typename T , std::size_t N>
void msgpack::operator<< ( msgpack::v1::object &  o,
const T(&)  v[N] 
)
inline
template<typename T >
msgpack::enable_if< !is_array< T >::value >::type msgpack::operator<< ( msgpack::object::with_zone o,
T const &  v 
)
inline
template<typename T , std::size_t N>
void msgpack::operator<< ( msgpack::object::with_zone o,
const T(&)  v[N] 
)
inline
void msgpack::operator<< ( msgpack::object o,
const msgpack_object &  v 
)
inline
template<typename Stream >
msgpack::packer< Stream > & msgpack::operator<< ( msgpack::packer< Stream > &  o,
const msgpack::object v 
)
inline
template<typename Stream >
msgpack::packer< Stream > & msgpack::operator<< ( msgpack::packer< Stream > &  o,
const msgpack::object::with_zone v 
)
inline
std::ostream & msgpack::operator<< ( std::ostream &  s,
const msgpack::object o 
)
inline
bool msgpack::operator== ( const msgpack::object x,
const msgpack::object y 
)
inline
template<typename T >
bool msgpack::operator== ( const msgpack::object x,
const T &  y 
)
inline
template<typename T >
bool msgpack::operator== ( const T &  y,
const msgpack::object x 
)
inline
template<typename T >
msgpack::enable_if< !is_array< T >::value, msgpack::object const & >::type msgpack::operator>> ( msgpack::object const &  o,
T &  v 
)
inline
template<typename T , std::size_t N>
msgpack::object const & msgpack::operator>> ( msgpack::object const &  o,
T(&)  v[N] 
)
inline
template<typename Stream , typename T >
void msgpack::pack ( Stream *  s,
const T &  v 
)
inline

Pack the value as MessagePack format into the stream.

This function template is left for compatibility. Use void pack(Stream& s, const T& v) instead of the function template.

Template Parameters
StreamAny type that have a member function Stream write(const char*, size_t s)
TAny type that is adapted to MessagePack
Parameters
sThe pointer to packing destination stream
vPacking value

References msgpack::packer< Stream >::pack().

template<typename Stream , typename T >
void msgpack::pack ( Stream &  s,
const T &  v 
)
inline

Pack the value as MessagePack format into the stream.

Template Parameters
StreamAny type that have a member function Stream write(const char*, size_t s)
TAny type that is adapted to MessagePack
Parameters
sPacking destination stream
vPacking value

References msgpack::packer< Stream >::pack().

template<typename Stream , typename T >
void msgpack::pack ( msgpack::packer< Stream > &  o,
const T &  v 
)
inline
template<typename Stream , typename T >
void msgpack::pack_copy ( msgpack::packer< Stream > &  o,
v 
)
inline

References pack().

template<typename Visitor >
bool msgpack::parse ( const char *  data,
size_t  len,
size_t &  off,
Visitor &  v 
)
inline

Unpack msgpack formatted data via a visitor.

Parameters
dataThe pointer to the buffer.
lenThe length of the buffer.
offThe offset position of the buffer. It is read and overwritten.
vThe visitor that satisfies visitor concept. https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_visitor#visitor-concept
Returns
if unpacking process finishs without error then return true, otherwise return false.

References msgpack::detail::parse_imp(), UNPACK_EXTRA_BYTES, and UNPACK_SUCCESS.

Referenced by parse().

template<typename Visitor >
bool msgpack::parse ( const char *  data,
size_t  len,
Visitor &  v 
)
inline

Unpack msgpack formatted data via a visitor.

Parameters
dataThe pointer to the buffer.
lenThe length of the buffer.
vThe visitor that satisfies visitor concept. https://github.com/msgpack/msgpack-c/wiki/v2_0_cpp_visitor#visitor-concept
Returns
if unpacking process finishs without error then return true, otherwise return false.

References parse().

void msgpack::unpack ( msgpack::object_handle result,
const char *  data,
std::size_t  len,
std::size_t &  off,
msgpack::v2::unpack_reference_func  f,
void *  user_data,
unpack_limit const &  limit 
)
inline
object_handle msgpack::unpack ( const char *  data,
std::size_t  len,
std::size_t &  off,
bool &  referenced,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
dataThe pointer to the buffer.
lenThe length of the buffer.
offThe offset position of the buffer. It is read and overwritten.
referencedIf the unpacked object contains reference of the buffer, then set as true, otherwise false.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.
Returns
object_handle that contains unpacked data.

References move(), UNPACK_CONTINUE, UNPACK_EXTRA_BYTES, msgpack::detail::unpack_imp(), UNPACK_PARSE_ERROR, and UNPACK_SUCCESS.

Referenced by unpack(), and msgpack::unpacker::visitor().

object_handle msgpack::unpack ( const char *  data,
std::size_t  len,
std::size_t &  off,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
dataThe pointer to the buffer.
lenThe length of the buffer.
offThe offset position of the buffer. It is read and overwritten.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.
Returns
object_handle that contains unpacked data.

References msgpack::detail::create_object_visitor::referenced(), and unpack().

object_handle msgpack::unpack ( const char *  data,
std::size_t  len,
bool &  referenced,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
dataThe pointer to the buffer.
lenThe length of the buffer.
referencedIf the unpacked object contains reference of the buffer, then set as true, otherwise false.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.
Returns
object_handle that contains unpacked data.

References unpack().

object_handle msgpack::unpack ( const char *  data,
std::size_t  len,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
dataThe pointer to the buffer.
lenThe length of the buffer.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.
Returns
object_handle that contains unpacked data.

References msgpack::detail::create_object_visitor::referenced(), and unpack().

void msgpack::unpack ( object_handle result,
const char *  data,
std::size_t  len,
std::size_t &  off,
bool &  referenced,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
resultThe object_handle that contains unpacked data.
dataThe pointer to the buffer.
lenThe length of the buffer.
offThe offset position of the buffer. It is read and overwritten.
referencedIf the unpacked object contains reference of the buffer, then set as true, otherwise false.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.

References move(), msgpack::object_handle::set(), UNPACK_CONTINUE, UNPACK_EXTRA_BYTES, msgpack::detail::unpack_imp(), UNPACK_PARSE_ERROR, UNPACK_SUCCESS, and msgpack::object_handle::zone().

void msgpack::unpack ( object_handle result,
const char *  data,
std::size_t  len,
std::size_t &  off,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
resultThe object_handle that contains unpacked data.
dataThe pointer to the buffer.
lenThe length of the buffer.
offThe offset position of the buffer. It is read and overwritten.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.

References msgpack::detail::create_object_visitor::referenced(), and unpack().

void msgpack::unpack ( object_handle result,
const char *  data,
std::size_t  len,
bool &  referenced,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
resultThe object_handle that contains unpacked data.
dataThe pointer to the buffer.
lenThe length of the buffer.
referencedIf the unpacked object contains reference of the buffer, then set as true, otherwise false.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.

References unpack().

void msgpack::unpack ( object_handle result,
const char *  data,
std::size_t  len,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
resultThe object_handle that contains unpacked data.
dataThe pointer to the buffer.
lenThe length of the buffer.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.

References msgpack::detail::create_object_visitor::referenced(), and unpack().

msgpack::object msgpack::unpack ( msgpack::zone z,
const char *  data,
std::size_t  len,
std::size_t &  off,
bool &  referenced,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
zThe msgpack::zone that is used as a memory of unpacked msgpack objects.
dataThe pointer to the buffer.
lenThe length of the buffer.
offThe offset position of the buffer. It is read and overwritten.
referencedIf the unpacked object contains reference of the buffer, then set as true, otherwise false.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.
Returns
msgpack::object that contains unpacked data.

References UNPACK_CONTINUE, UNPACK_EXTRA_BYTES, msgpack::detail::unpack_imp(), UNPACK_PARSE_ERROR, and UNPACK_SUCCESS.

msgpack::object msgpack::unpack ( msgpack::zone z,
const char *  data,
std::size_t  len,
std::size_t &  off,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
zThe msgpack::zone that is used as a memory of unpacked msgpack objects.
dataThe pointer to the buffer.
lenThe length of the buffer.
offThe offset position of the buffer. It is read and overwritten.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.
Returns
msgpack::object that contains unpacked data.

References msgpack::detail::create_object_visitor::referenced(), and unpack().

msgpack::object msgpack::unpack ( msgpack::zone z,
const char *  data,
std::size_t  len,
bool &  referenced,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
zThe msgpack::zone that is used as a memory of unpacked msgpack objects.
dataThe pointer to the buffer.
lenThe length of the buffer.
referencedIf the unpacked object contains reference of the buffer, then set as true, otherwise false.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.
Returns
msgpack::object that contains unpacked data.

References unpack().

msgpack::object msgpack::unpack ( msgpack::zone z,
const char *  data,
std::size_t  len,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer.

Parameters
zThe msgpack::zone that is used as a memory of unpacked msgpack objects.
dataThe pointer to the buffer.
lenThe length of the buffer.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.
Returns
msgpack::object that contains unpacked data.

References msgpack::detail::create_object_visitor::referenced(), and unpack().

void msgpack::unpack ( object_handle result,
const char *  data,
std::size_t  len,
std::size_t *  off = nullptr,
bool *  referenced = nullptr,
unpack_reference_func  f = nullptr,
void *  user_data = nullptr,
unpack_limit const &  limit = unpack_limit() 
)
inline

Unpack msgpack::object from a buffer. [obsolete].

Parameters
resultThe object_handle that contains unpacked data.
dataThe pointer to the buffer.
lenThe length of the buffer.
offThe offset position of the buffer. It is read and overwritten.
referencedIf the unpacked object contains reference of the buffer, then set as true, otherwise false.
fA judging function that msgpack::object refer to the buffer.
user_dataThis parameter is passed to f.
limitThe size limit information of msgpack::object.

This function is obsolete. Use the reference inteface version of unpack functions instead of the pointer interface version.

References unpack().