messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers push_front.hpp Source File

push_front.hpp

00001 # /* **************************************************************************
00002 #  *                                                                          *
00003 #  *     (C) Copyright Paul Mensonides 2002.
00004 #  *     (C) Copyright Edward Diener 2014.
00005 #  *     Distributed under the Boost Software License, Version 1.0. (See
00006 #  *     accompanying file LICENSE_1_0.txt or copy at
00007 #  *     http://www.boost.org/LICENSE_1_0.txt)
00008 #  *                                                                          *
00009 #  ************************************************************************** */
00010 #
00011 # /* See http://www.boost.org for most recent version. */
00012 #
00013 # ifndef MSGPACK_PREPROCESSOR_ARRAY_PUSH_FRONT_HPP
00014 # define MSGPACK_PREPROCESSOR_ARRAY_PUSH_FRONT_HPP
00015 #
00016 # include <msgpack/preprocessor/arithmetic/inc.hpp>
00017 # include <msgpack/preprocessor/array/data.hpp>
00018 # include <msgpack/preprocessor/array/size.hpp>
00019 # include <msgpack/preprocessor/config/config.hpp>
00020 # include <msgpack/preprocessor/punctuation/comma_if.hpp>
00021 # include <msgpack/preprocessor/tuple/rem.hpp>
00022 # include <msgpack/preprocessor/array/detail/get_data.hpp>
00023 #
00024 # /* MSGPACK_PP_ARRAY_PUSH_FRONT */
00025 #
00026 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
00027 #    define MSGPACK_PP_ARRAY_PUSH_FRONT(array, elem) MSGPACK_PP_ARRAY_PUSH_FRONT_I(MSGPACK_PP_ARRAY_SIZE(array), MSGPACK_PP_ARRAY_DATA(array), elem)
00028 # else
00029 #    define MSGPACK_PP_ARRAY_PUSH_FRONT(array, elem) MSGPACK_PP_ARRAY_PUSH_FRONT_D(array, elem)
00030 #    define MSGPACK_PP_ARRAY_PUSH_FRONT_D(array, elem) MSGPACK_PP_ARRAY_PUSH_FRONT_I(MSGPACK_PP_ARRAY_SIZE(array), MSGPACK_PP_ARRAY_DATA(array), elem)
00031 # endif
00032 #
00033 # define MSGPACK_PP_ARRAY_PUSH_FRONT_I(size, data, elem) (MSGPACK_PP_INC(size), (elem MSGPACK_PP_COMMA_IF(size) MSGPACK_PP_ARRAY_DETAIL_GET_DATA(size,data)))
00034 #
00035 # endif