10#ifndef MSGPACK_V1_TYPE_SET_HPP
11#define MSGPACK_V1_TYPE_SET_HPP
27#if !defined(MSGPACK_USE_CPP03)
29template <
typename T,
typename Compare,
typename Alloc>
30struct as<std::set<T, Compare, Alloc>, typename std::enable_if<msgpack::has_as<T>::value>::type> {
35 std::set<T, Compare, Alloc> v;
46template <
typename T,
typename Compare,
typename Alloc>
47struct convert<std::set<T, Compare, Alloc> > {
52 std::set<T, Compare, Alloc> tmp;
55 tmp.insert(p->
as<T>());
57#if __cplusplus >= 201103L
66template <
typename T,
typename Compare,
typename Alloc>
67struct 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());
80template <
typename T,
typename Compare,
typename Alloc>
83 o.
type = msgpack::type::ARRAY;
94 typename std::set<T, Compare, Alloc>::const_iterator it(v.begin());
104#if !defined(MSGPACK_USE_CPP03)
106template <
typename T,
typename Compare,
typename Alloc>
107struct 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>());
123template <
typename T,
typename Compare,
typename Alloc>
124struct convert<std::multiset<T, Compare, Alloc> > {
129 std::multiset<T, Compare, Alloc> tmp;
132 tmp.insert(p->
as<T>());
134#if __cplusplus >= 201103L
143template <
typename T,
typename Compare,
typename Alloc>
144struct 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) {
157template <
typename T,
typename Compare,
typename Alloc>
160 o.
type = msgpack::type::ARRAY;
170 typename std::multiset<T, Compare, Alloc>::const_iterator it(v.begin());
The class template that supports continuous packing.
Definition pack.hpp:33
packer< Stream > & pack_array(uint32_t n)
Packing array header and size.
Definition pack.hpp:1195
packer< Stream > & pack(const T &v)
Packing function template.
Definition object_fwd.hpp:236
void * allocate_align(size_t size, size_t align=MSGPACK_ZONE_ALIGN)
Definition cpp03_zone.hpp:246
Definition adaptor_base.hpp:15
uint32_t checked_get_container_size(T size)
Definition check_container_size.hpp:55
std::multiset< T, Compare, Alloc > operator()(msgpack::object const &o) const
Definition set.hpp:108
std::set< T, Compare, Alloc > operator()(msgpack::object const &o) const
Definition set.hpp:31
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
msgpack::object const & operator()(msgpack::object const &o, std::set< T, Compare, Alloc > &v) const
Definition set.hpp:48
Definition adaptor_base.hpp:27
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 adaptor_base.hpp:43
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::multiset< T, Compare, Alloc > &v) const
Definition set.hpp:146
msgpack::packer< Stream > & operator()(msgpack::packer< Stream > &o, const std::set< T, Compare, Alloc > &v) const
Definition set.hpp:69
Definition adaptor_base.hpp:32
msgpack::zone & zone
Definition object.hpp:37
uint32_t size
Definition object_fwd.hpp:23
msgpack::object * ptr
Definition object_fwd.hpp:24
Object class that corresponding to MessagePack format object.
Definition object_fwd.hpp:75
std::enable_if< msgpack::has_as< T >::value, T >::type as() const
Get value as T.
Definition object.hpp:1121
union_type via
Definition object_fwd.hpp:93
msgpack::type::object_type type
Definition object_fwd.hpp:92
msgpack::object_array array
Definition object_fwd.hpp:85
#define MSGPACK_NULLPTR
Definition cpp_config_decl.hpp:35
#define MSGPACK_ZONE_ALIGNOF(type)
Definition cpp03_zone_decl.hpp:30
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition versioning.hpp:58