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 void operator<< (msgpack::object& o, const msgpack_object& v);
85 
86 // obsolete
87 template <typename T>
88 void convert(T& v, msgpack::object const& o);
89 
90 // obsolete
91 template <typename Stream, typename T>
92 void pack(msgpack::packer<Stream>& o, const T& v);
93 
94 // obsolete
95 template <typename Stream, typename T>
97 
98 template <typename Stream>
99 msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object& v);
100 
101 template <typename Stream>
102 msgpack::packer<Stream>& operator<< (msgpack::packer<Stream>& o, const msgpack::object::with_zone& v);
103 
104 std::ostream& operator<< (std::ostream& s, const msgpack::object& o);
105 
107 } // MSGPACK_API_VERSION_NAMESPACE(v1)
109 
110 } // namespace msgpack
111 
112 #endif // MSGPACK_V1_OBJECT_DECL_HPP
bool operator==(const msgpack::object &x, const msgpack::object &y)
Definition: object.hpp:424
Definition: adaptor_base.hpp:15
void convert(T &v, msgpack::object const &o)
Definition: object.hpp:640
Definition: object.hpp:34
void pack_copy(msgpack::packer< Stream > &o, T v)
Definition: object.hpp:654
std::size_t add_ext_type_size< 4 >(std::size_t size)
Definition: object.hpp:134
void pack(msgpack::packer< Stream > &o, const T &v)
Definition: object.hpp:647
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
std::size_t add_ext_type_size(std::size_t size)
Definition: object.hpp:129
The class template that supports continuous packing.
Definition: adaptor_base_decl.hpp:23
object_handle clone(msgpack::object const &obj)
clone object
Definition: object.hpp:180
msgpack::packer< Stream > & operator<<(msgpack::packer< Stream > &o, T const &v)
Definition: adaptor_base.hpp:59
std::size_t aligned_zone_size(msgpack::object const &obj)
Definition: object.hpp:140
bool operator!=(const msgpack::object &x, const msgpack::object &y)
Definition: object.hpp:507