messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers reverse.hpp Source File

reverse.hpp

00001 # /* Copyright (C) 2001
00002 #  * Housemarque Oy
00003 #  * http://www.housemarque.com
00004 #  *
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 # /* Revised by Paul Mensonides (2002) */
00011 #
00012 # /* See http://www.boost.org for most recent version. */
00013 #
00014 # ifndef MSGPACK_PREPROCESSOR_LIST_REVERSE_HPP
00015 # define MSGPACK_PREPROCESSOR_LIST_REVERSE_HPP
00016 #
00017 # include <msgpack/preprocessor/config/config.hpp>
00018 # include <msgpack/preprocessor/list/fold_left.hpp>
00019 #
00020 # /* MSGPACK_PP_LIST_REVERSE */
00021 #
00022 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
00023 #    define MSGPACK_PP_LIST_REVERSE(list) MSGPACK_PP_LIST_FOLD_LEFT(MSGPACK_PP_LIST_REVERSE_O, MSGPACK_PP_NIL, list)
00024 # else
00025 #    define MSGPACK_PP_LIST_REVERSE(list) MSGPACK_PP_LIST_REVERSE_I(list)
00026 #    define MSGPACK_PP_LIST_REVERSE_I(list) MSGPACK_PP_LIST_FOLD_LEFT(MSGPACK_PP_LIST_REVERSE_O, MSGPACK_PP_NIL, list)
00027 # endif
00028 #
00029 # define MSGPACK_PP_LIST_REVERSE_O(d, s, x) (x, s)
00030 #
00031 # /* MSGPACK_PP_LIST_REVERSE_D */
00032 #
00033 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG()
00034 #    define MSGPACK_PP_LIST_REVERSE_D(d, list) MSGPACK_PP_LIST_FOLD_LEFT_ ## d(MSGPACK_PP_LIST_REVERSE_O, MSGPACK_PP_NIL, list)
00035 # else
00036 #    define MSGPACK_PP_LIST_REVERSE_D(d, list) MSGPACK_PP_LIST_REVERSE_D_I(d, list)
00037 #    define MSGPACK_PP_LIST_REVERSE_D_I(d, list) MSGPACK_PP_LIST_FOLD_LEFT_ ## d(MSGPACK_PP_LIST_REVERSE_O, MSGPACK_PP_NIL, list)
00038 # endif
00039 #
00040 # endif