MessagePack for C++
Loading...
Searching...
No Matches
object_decl.hpp
Go to the documentation of this file.
1//
2// MessagePack for C++ static resolution routine
3//
4// Copyright (C) 2008-2014 FURUHASHI Sadayuki and 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_V1_OBJECT_DECL_HPP
11#define MSGPACK_V1_OBJECT_DECL_HPP
12
14#include "msgpack/pack.hpp"
15#include "msgpack/zone.hpp"
17
18#include <cstring>
19#include <stdexcept>
20#include <typeinfo>
21#include <limits>
22#include <ostream>
23#include <typeinfo>
24#include <iomanip>
25
26namespace msgpack {
27
31
33class object_handle;
34
35namespace detail {
36
37template <std::size_t N>
38std::size_t add_ext_type_size(std::size_t size);
39
40template <>
41std::size_t add_ext_type_size<4>(std::size_t size);
42
43} // namespace detail
44
45std::size_t aligned_zone_size(msgpack::object const& obj);
46
48
55object_handle clone(msgpack::object const& obj);
56
57namespace detail {
58
59template <typename Stream, typename T>
60struct packer_serializer;
61
62} // namespace detail
63
64// obsolete
65template <typename Type>
66class define;
67
68bool operator==(const msgpack::object& x, const msgpack::object& y);
69
70template <typename T>
71bool operator==(const msgpack::object& x, const T& y);
72
73bool operator!=(const msgpack::object& x, const msgpack::object& y);
74
75template <typename T>
76bool operator==(const T& y, const msgpack::object& x);
77
78template <typename T>
79bool operator!=(const msgpack::object& x, const T& y);
80
81template <typename T>
82bool operator!=(const T& y, const msgpack::object& x);
83
84class object_parser;
85
86template <typename Stream>
87struct object_pack_visitor;
88
89struct object_stringize_visitor;
90
91// obsolete
92template <typename T>
93MSGPACK_DEPRECATED("please use member function version of object::convert(T&)")
94void convert(T& v, msgpack::object const& o);
95
96// obsolete
97template <typename Stream, typename T>
98MSGPACK_DEPRECATED("please use member function version of packer::pack(const T&)")
99void pack(msgpack::packer<Stream>& o, const T& v);
100
101// obsolete
102template <typename Stream, typename T>
103MSGPACK_DEPRECATED("please use member function version of packer::pack(const T&)")
104void pack_copy(msgpack::packer<Stream>& o, T v);
105
106template <typename Stream>
107msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object& v);
108
109template <typename Stream>
110msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object::with_zone& v);
111
112std::ostream& operator<< (std::ostream& s, const msgpack::object& v);
113
115} // MSGPACK_API_VERSION_NAMESPACE(v1)
117
118} // namespace msgpack
119
120#endif // MSGPACK_V1_OBJECT_DECL_HPP
bool operator!=(basic_variant< STR, BIN, EXT > const &lhs, basic_variant< STR, BIN, EXT > const &rhs)
bool operator==(basic_variant< STR, BIN, EXT > const &lhs, basic_variant< STR, BIN, EXT > const &rhs)
Definition msgpack_variant.hpp:263
Definition adaptor_base.hpp:15
void pack_copy(msgpack::packer< Stream > &o, T v)
Definition object.hpp:1192
object_handle clone(msgpack::object const &obj)
clone object
Definition object.hpp:622
std::size_t aligned_zone_size(msgpack::object const &obj)
Definition object.hpp:607
void convert(T &v, msgpack::object const &o)
Definition object.hpp:1178
Object class that corresponding to MessagePack format object.
Definition object_fwd.hpp:75
#define MSGPACK_DEPRECATED(msg)
Definition cpp_config.hpp:138
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition versioning.hpp:66