MessagePack for C++
iterator.hpp
Go to the documentation of this file.
1 //
2 // MessagePack for C++ static resolution routine
3 //
4 // Copyright (C) 2015-2016 MIZUKI Hirata
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 
11 #ifndef MSGPACK_V1_ITERATOR_HPP
12 #define MSGPACK_V1_ITERATOR_HPP
13 #if !defined(MSGPACK_USE_CPP03)
14 
16 
17 namespace msgpack {
18 
22 
23 inline msgpack::object_kv* begin(msgpack::object_map &map) { return map.ptr; }
24 inline const msgpack::object_kv* begin(const msgpack::object_map &map) { return map.ptr; }
25 inline msgpack::object_kv* end(msgpack::object_map &map) { return map.ptr + map.size; }
26 inline const msgpack::object_kv* end(const msgpack::object_map &map) { return map.ptr + map.size; }
27 
28 inline msgpack::object* begin(msgpack::object_array &array) { return array.ptr; }
29 inline const msgpack::object* begin(const msgpack::object_array &array) { return array.ptr; }
30 inline msgpack::object* end(msgpack::object_array &array) { return array.ptr + array.size; }
31 inline const msgpack::object* end(const msgpack::object_array &array) { return array.ptr + array.size; }
32 
34 }
36 
37 }
38 
39 #endif // !defined(MSGPACK_USE_CPP03)
40 #endif // MSGPACK_V1_ITERATOR_HPP
Definition: adaptor_base.hpp:15
msgpack::object_kv * end(msgpack::object_map &map)
Definition: iterator.hpp:25
msgpack::object_kv * begin(msgpack::object_map &map)
Definition: iterator.hpp:23
Definition: object_fwd.hpp:22
uint32_t size
Definition: object_fwd.hpp:23
msgpack::object * ptr
Definition: object_fwd.hpp:24
Definition: object.hpp:30
Definition: object_fwd.hpp:27
uint32_t size
Definition: object_fwd.hpp:28
msgpack::object_kv * ptr
Definition: object_fwd.hpp:29
Object class that corresponding to MessagePack format object.
Definition: object_fwd.hpp:75
#define MSGPACK_API_VERSION_NAMESPACE(ns)
Definition: versioning.hpp:66