messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers pop_front.hpp Source File

pop_front.hpp

00001 # /* **************************************************************************
00002 #  *                                                                          *
00003 #  *     (C) Copyright Paul Mensonides 2002.
00004 #  *     Distributed under the Boost Software License, Version 1.0. (See
00005 #  *     accompanying file LICENSE_1_0.txt or copy at
00006 #  *     http://www.boost.org/LICENSE_1_0.txt)
00007 #  *                                                                          *
00008 #  ************************************************************************** */
00009 #
00010 # /* See http://www.boost.org for most recent version. */
00011 #
00012 # ifndef MSGPACK_PREPROCESSOR_ARRAY_POP_FRONT_HPP
00013 # define MSGPACK_PREPROCESSOR_ARRAY_POP_FRONT_HPP
00014 #
00015 # include <msgpack/preprocessor/arithmetic/dec.hpp>
00016 # include <msgpack/preprocessor/arithmetic/inc.hpp>
00017 # include <msgpack/preprocessor/array/elem.hpp>
00018 # include <msgpack/preprocessor/array/size.hpp>
00019 # include <msgpack/preprocessor/repetition/enum.hpp>
00020 # include <msgpack/preprocessor/repetition/deduce_z.hpp>
00021 #
00022 # /* MSGPACK_PP_ARRAY_POP_FRONT */
00023 #
00024 # define MSGPACK_PP_ARRAY_POP_FRONT(array) MSGPACK_PP_ARRAY_POP_FRONT_Z(MSGPACK_PP_DEDUCE_Z(), array)
00025 #
00026 # /* MSGPACK_PP_ARRAY_POP_FRONT_Z */
00027 #
00028 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
00029 #    define MSGPACK_PP_ARRAY_POP_FRONT_Z(z, array) MSGPACK_PP_ARRAY_POP_FRONT_I(z, MSGPACK_PP_ARRAY_SIZE(array), array)
00030 # else
00031 #    define MSGPACK_PP_ARRAY_POP_FRONT_Z(z, array) MSGPACK_PP_ARRAY_POP_FRONT_Z_D(z, array)
00032 #    define MSGPACK_PP_ARRAY_POP_FRONT_Z_D(z, array) MSGPACK_PP_ARRAY_POP_FRONT_I(z, MSGPACK_PP_ARRAY_SIZE(array), array)
00033 # endif
00034 #
00035 # define MSGPACK_PP_ARRAY_POP_FRONT_I(z, size, array) (MSGPACK_PP_DEC(size), (MSGPACK_PP_ENUM_ ## z(MSGPACK_PP_DEC(size), MSGPACK_PP_ARRAY_POP_FRONT_M, array)))
00036 # define MSGPACK_PP_ARRAY_POP_FRONT_M(z, n, data) MSGPACK_PP_ARRAY_ELEM(MSGPACK_PP_INC(n), data)
00037 #
00038 # endif