MessagePack for C++
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 
13 #include "msgpack/versioning.hpp"
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 
26 namespace msgpack {
27 
31 
33 class object_handle;
34 
35 namespace detail {
36 
37 template <std::size_t N>
38 std::size_t add_ext_type_size(std::size_t size);
39 
40 template <>
41 std::size_t add_ext_type_size<4>(std::size_t size);
42 
43 } // namespace detail
44 
45 std::size_t aligned_zone_size(msgpack::object const& obj);
46 
48 
55 object_handle clone(msgpack::object const& obj);
56 
57 namespace detail {
58 
59 template <typename Stream, typename T>
60 struct packer_serializer;
61 
62 } // namespace detail
63 
64 // obsolete
65 template <typename Type>
66 class define;
67 
68 bool operator==(const msgpack::object& x, const msgpack::object& y);
69 
70 template <typename T>
71 bool operator==(const msgpack::object& x, const T& y);
72 
73 bool operator!=(const msgpack::object& x, const msgpack::object& y);
74 
75 template <typename T>
76 bool operator==(const T& y, const msgpack::object& x);
77 
78 template <typename T>
79 bool operator!=(const msgpack::object& x, const T& y);
80 
81 template <typename T>
82 bool operator!=(const T& y, const msgpack::object& x);
83 
84 class object_parser;
85 
86 template <typename Stream>
87 struct object_pack_visitor;
88 
89 struct object_stringize_visitor;
90 
91 // obsolete
92 template <typename T>
93 MSGPACK_DEPRECATED("please use member function version of object::convert(T&)")
94 void convert(T& v, msgpack::object const& o);
95 
96 // obsolete
97 template <typename Stream, typename T>
98 MSGPACK_DEPRECATED("please use member function version of packer::pack(const T&)")
99 void pack(msgpack::packer<Stream>& o, const T& v);
100 
101 // obsolete
102 template <typename Stream, typename T>
103 MSGPACK_DEPRECATED("please use member function version of packer::pack(const T&)")
104 void pack_copy(msgpack::packer<Stream>& o, T v);
105 
106 template <typename Stream>
107 msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object& v);
108 
109 template <typename Stream>
110 msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object::with_zone& v);
111 
112 std::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
std::size_t add_ext_type_size< 4 >(std::size_t size)
Definition: object.hpp:146
std::size_t add_ext_type_size(std::size_t size)
Definition: object.hpp:141
std::size_t size(T const &t)
Definition: size_equal_only.hpp:24
Definition: adaptor_base.hpp:15
void pack(msgpack::packer< Stream > &o, const T &v)
Definition: object.hpp:1180
bool operator==(const msgpack::object &x, const msgpack::object &y)
Definition: object.hpp:1027
void pack_copy(msgpack::packer< Stream > &o, T v)
Definition: object.hpp:1187
object_handle clone(msgpack::object const &obj)
clone object
Definition: object.hpp:617
std::size_t aligned_zone_size(msgpack::object const &obj)
Definition: object.hpp:602
void convert(T &v, msgpack::object const &o)
Definition: object.hpp:1173
bool operator!=(const msgpack::object &x, const msgpack::object &y)
Definition: object.hpp:1044
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