messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers apply.hpp Source File

apply.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_FACILITIES_APPLY_HPP
00013 # define MSGPACK_PREPROCESSOR_FACILITIES_APPLY_HPP
00014 #
00015 # include <msgpack/preprocessor/config/config.hpp>
00016 # include <msgpack/preprocessor/control/expr_iif.hpp>
00017 # include <msgpack/preprocessor/detail/is_unary.hpp>
00018 # include <msgpack/preprocessor/tuple/rem.hpp>
00019 #
00020 # /* MSGPACK_PP_APPLY */
00021 #
00022 # if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
00023 #    define MSGPACK_PP_APPLY(x) MSGPACK_PP_APPLY_I(x)
00024 #    define MSGPACK_PP_APPLY_I(x) MSGPACK_PP_EXPR_IIF(MSGPACK_PP_IS_UNARY(x), MSGPACK_PP_TUPLE_REM_1 x)
00025 # elif MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_BCC()
00026 #    define MSGPACK_PP_APPLY(x) MSGPACK_PP_APPLY_I(x)
00027 #    define MSGPACK_PP_APPLY_I(x) MSGPACK_PP_APPLY_ ## x
00028 #    define MSGPACK_PP_APPLY_(x) x
00029 #    define MSGPACK_PP_APPLY_MSGPACK_PP_NIL
00030 # else
00031 #    define MSGPACK_PP_APPLY(x) MSGPACK_PP_EXPR_IIF(MSGPACK_PP_IS_UNARY(x), MSGPACK_PP_TUPLE_REM_1 x)
00032 # endif
00033 #
00034 # endif