1//
2// MessagePack for C++ static resolution routine
3//
4// Copyright (C) 2015 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_ITERATOR_HPP
12#define MSGPACK_ITERATOR_HPP
13#if !defined(MSGPACK_USE_CPP03)
14
15#include <msgpack/object_fwd.hpp>
16
17namespace msgpack
18{
19    /// @cond
20    MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS)
21    {
22    /// @endcond
23        inline object_kv* begin(object_map &map) { return map.ptr; }
24        inline const object_kv* begin(const object_map &map) { return map.ptr; }
25        inline object_kv* end(object_map &map) { return map.ptr + map.size; }
26        inline const object_kv* end(const object_map &map) { return map.ptr + map.size; }
27
28        inline object* begin(object_array &array) { return array.ptr; }
29        inline const object* begin(const object_array &array) { return array.ptr; }
30        inline object* end(object_array &array) { return array.ptr + array.size; }
31        inline const object* end(const object_array &array) { return array.ptr + array.size; }
32    /// @cond
33    }
34    /// @endcond
35}
36
37#endif // !defined(MSGPACK_USE_CPP03)
38#endif // MSGPACK_ITERATOR_HPP
39