1 // 2 // MessagePack for C++ static resolution routine 3 // 4 // Copyright (C) 2015 MIZUKI Hirata 5 // 6 // Licensed under the Apache License, Version 2.0 (the "License"); 7 // you may not use this file except in compliance with the License. 8 // You may obtain a copy of the License at 9 // 10 // http://www.apache.org/licenses/LICENSE-2.0 11 // 12 // Unless required by applicable law or agreed to in writing, software 13 // distributed under the License is distributed on an "AS IS" BASIS, 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 // See the License for the specific language governing permissions and 16 // limitations under the License. 17 // 18 19 #ifndef MSGPACK_ITERATOR_HPP 20 #define MSGPACK_ITERATOR_HPP 21 #if !defined(MSGPACK_USE_CPP03) 22 23 #include <rpc/msgpack/object_fwd.hpp> 24 25 namespace clmdep_msgpack 26 { 27 /// @cond MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS)28 MSGPACK_API_VERSION_NAMESPACE(MSGPACK_DEFAULT_API_NS) 29 { 30 /// @endcond 31 inline object_kv* begin(object_map &map) { return map.ptr; } 32 inline const object_kv* begin(const object_map &map) { return map.ptr; } 33 inline object_kv* end(object_map &map) { return map.ptr + map.size; } 34 inline const object_kv* end(const object_map &map) { return map.ptr + map.size; } 35 36 inline object* begin(object_array &array) { return array.ptr; } 37 inline const object* begin(const object_array &array) { return array.ptr; } 38 inline object* end(object_array &array) { return array.ptr + array.size; } 39 inline const object* end(const object_array &array) { return array.ptr + array.size; } 40 /// @cond 41 } 42 /// @endcond 43 } 44 45 #endif // !defined(MSGPACK_USE_CPP03) 46 #endif // MSGPACK_ITERATOR_HPP 47