Go to the documentation of this file.
10 #ifndef MSGPACK_V1_TYPE_SET_HPP
11 #define MSGPACK_V1_TYPE_SET_HPP
27 #if !defined(MSGPACK_USE_CPP03)
29 template <
typename T,
typename Compare,
typename Alloc>
30 struct as<std::set<T, Compare, Alloc>, typename std::enable_if<msgpack::has_as<T>::value>::type> {
35 std::set<T, Compare, Alloc> v;
44 #endif // !defined(MSGPACK_USE_CPP03)
46 template <
typename T,
typename Compare,
typename Alloc>
47 struct convert<std::set<T, Compare, Alloc> > {
52 std::set<T, Compare, Alloc> tmp;
55 tmp.insert(p->
as<T>());
57 #if __cplusplus >= 201103L
66 template <
typename T,
typename Compare,
typename Alloc>
67 struct pack<std::set<T, Compare, Alloc> > {
68 template <
typename Stream>
72 for (
typename std::set<T, Compare, Alloc>::const_iterator it(v.begin()), it_end(v.end());
80 template <
typename T,
typename Compare,
typename Alloc>
94 typename std::set<T, Compare, Alloc>::const_iterator it(v.begin());
104 #if !defined(MSGPACK_USE_CPP03)
106 template <
typename T,
typename Compare,
typename Alloc>
107 struct as<std::multiset<T, Compare, Alloc>, typename std::enable_if<msgpack::has_as<T>::value>::type> {
112 std::multiset<T, Compare, Alloc> v;
115 v.insert(p->
as<T>());
121 #endif // !defined(MSGPACK_USE_CPP03)
123 template <
typename T,
typename Compare,
typename Alloc>
124 struct convert<std::multiset<T, Compare, Alloc> > {
129 std::multiset<T, Compare, Alloc> tmp;
132 tmp.insert(p->
as<T>());
134 #if __cplusplus >= 201103L
143 template <
typename T,
typename Compare,
typename Alloc>
144 struct pack<std::multiset<T, Compare, Alloc> > {
145 template <
typename Stream>
149 for (
typename std::multiset<T, Compare, Alloc>::const_iterator it(v.begin()), it_end(v.end());
150 it != it_end; ++it) {
157 template <
typename T,
typename Compare,
typename Alloc>
170 typename std::multiset<T, Compare, Alloc>::const_iterator it(v.begin());
188 #endif // MSGPACK_V1_TYPE_SET_HPP
The class template that supports continuous packing.
Definition: adaptor_base_decl.hpp:24
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition: cpp03_zone.hpp:246
Definition: adaptor_base.hpp:43
Definition: adaptor_base.hpp:15
#define MSGPACK_ZONE_ALIGNOF(type)
Definition: cpp03_zone_decl.hpp:30
Definition: adaptor_base.hpp:27
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::set< T, Compare, Alloc > &v) const
Definition: set.hpp:69
uint32_t checked_get_container_size(T size)
Definition: check_container_size.hpp:55
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:58
union_type via
Definition: object_fwd.hpp:93
msgpack::object * ptr
Definition: object_fwd.hpp:24
Definition: object_fwd_decl.hpp:62
msgpack::object const & operator()(msgpack::object const &o, std::multiset< T, Compare, Alloc > &v) const
Definition: set.hpp:125
std::size_t size(T const &t)
Definition: size_equal_only.hpp:24
#define MSGPACK_NULLPTR
Definition: cpp_config_decl.hpp:35
uint32_t size
Definition: object_fwd.hpp:23
msgpack::object_array array
Definition: object_fwd.hpp:85
@ ARRAY
Definition: object_fwd_decl.hpp:41
std::multiset< T, Compare, Alloc > operator()(msgpack::object const &o) const
Definition: set.hpp:108
packer< Stream > & pack(const T &v)
Packing function template.
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::multiset< T, Compare, Alloc > &v) const
Definition: set.hpp:146
void operator()(msgpack::object::with_zone &o, const std::multiset< T, Compare, Alloc > &v) const
Definition: set.hpp:159
void operator()(msgpack::object::with_zone &o, const std::set< T, Compare, Alloc > &v) const
Definition: set.hpp:82
Definition: object_fwd.hpp:236
Definition: adaptor_base.hpp:32
std::set< T, Compare, Alloc > operator()(msgpack::object const &o) const
Definition: set.hpp:31
packer< Stream > & pack_array(uint32_t n)
Packing array header and size.
Definition: pack.hpp:1160
msgpack::object const & operator()(msgpack::object const &o, std::set< T, Compare, Alloc > &v) const
Definition: set.hpp:48
std::enable_if< msgpack::has_as< T >::value, T >::type as() const
Get value as T.
Definition: object.hpp:1121
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
msgpack::zone & zone
Definition: object.hpp:37
Definition: object.hpp:35
msgpack::type::object_type type
Definition: object_fwd.hpp:92