MessagePack for C++
adaptor_base_decl.hpp
Go to the documentation of this file.
1 //
2 // MessagePack for C++ static resolution routine
3 //
4 // Copyright (C) 2016 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_ADAPTOR_BASE_DECL_HPP
11 #define MSGPACK_V1_ADAPTOR_BASE_DECL_HPP
12 
13 #include "msgpack/versioning.hpp"
14 #include "msgpack/object_fwd.hpp"
15 #include "msgpack/pack.hpp"
16 
17 namespace msgpack {
18 
22 
23 template <typename Stream>
24 class packer;
25 
26 namespace adaptor {
27 
28 // Adaptor functors
29 
30 template <typename T, typename Enabler = void>
31 struct convert;
32 
33 template <typename T, typename Enabler = void>
34 struct pack;
35 
36 template <typename T, typename Enabler = void>
37 struct object;
38 
39 template <typename T, typename Enabler = void>
40 struct object_with_zone;
41 
42 } // namespace adaptor
43 
44 // operators
45 
46 template <typename T>
47 typename msgpack::enable_if<
48  !is_array<T>::value,
49  msgpack::object const&
50 >::type
51 operator>> (msgpack::object const& o, T& v);
52 template <typename T, std::size_t N>
53 msgpack::object const& operator>> (msgpack::object const& o, T(&v)[N]);
54 
55 template <typename Stream, typename T>
56 typename msgpack::enable_if<
57  !is_array<T>::value,
59 >::type
60 operator<< (msgpack::packer<Stream>& o, T const& v);
61 template <typename Stream, typename T, std::size_t N>
63 
64 template <typename T>
65 typename msgpack::enable_if<
66  !is_array<T>::value
67 >::type
68 operator<< (msgpack::object& o, T const& v);
69 template <typename T, std::size_t N>
70 void operator<< (msgpack::object& o, const T(&v)[N]);
71 
72 template <typename T>
73 typename msgpack::enable_if<
74  !is_array<T>::value
75 >::type
77 template <typename T, std::size_t N>
78 void operator<< (msgpack::object::with_zone& o, const T(&v)[N]);
79 
81 } // MSGPACK_API_VERSION_NAMESPACE(v1)
83 
84 } // namespace msgpack
85 
86 #endif // MSGPACK_V1_ADAPTOR_BASE_DECL_HPP
The class template that supports continuous packing.
Definition: pack.hpp:33
Definition: adaptor_base.hpp:15
void pack(msgpack::packer< Stream > &o, const T &v)
Definition: object.hpp:1180
msgpack::enable_if< !is_array< T >::value, msgpack::packer< Stream > & >::type operator<<(msgpack::packer< Stream > &o, T const &v)
Definition: adaptor_base.hpp:72
void convert(T &v, msgpack::object const &o)
Definition: object.hpp:1173
msgpack::enable_if< !is_array< T >::value, msgpack::object const & >::type operator>>(msgpack::object const &o, T &v)
Definition: adaptor_base.hpp:57
Definition: object.hpp:35
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:66