messagepack implementation for embedded systems (mbed / arduino)
Dependents: hello_message_pack
for_each_i.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_LIST_FOR_EACH_I_HPP 00015 # define MSGPACK_PREPROCESSOR_LIST_LIST_FOR_EACH_I_HPP 00016 # 00017 # include <msgpack/preprocessor/arithmetic/inc.hpp> 00018 # include <msgpack/preprocessor/config/config.hpp> 00019 # include <msgpack/preprocessor/list/adt.hpp> 00020 # include <msgpack/preprocessor/repetition/for.hpp> 00021 # include <msgpack/preprocessor/tuple/elem.hpp> 00022 # include <msgpack/preprocessor/tuple/rem.hpp> 00023 # 00024 # /* MSGPACK_PP_LIST_FOR_EACH_I */ 00025 # 00026 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG() && ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MSVC() 00027 # define MSGPACK_PP_LIST_FOR_EACH_I(macro, data, list) MSGPACK_PP_FOR((macro, data, list, 0), MSGPACK_PP_LIST_FOR_EACH_I_P, MSGPACK_PP_LIST_FOR_EACH_I_O, MSGPACK_PP_LIST_FOR_EACH_I_M) 00028 # else 00029 # define MSGPACK_PP_LIST_FOR_EACH_I(macro, data, list) MSGPACK_PP_LIST_FOR_EACH_I_I(macro, data, list) 00030 # define MSGPACK_PP_LIST_FOR_EACH_I_I(macro, data, list) MSGPACK_PP_FOR((macro, data, list, 0), MSGPACK_PP_LIST_FOR_EACH_I_P, MSGPACK_PP_LIST_FOR_EACH_I_O, MSGPACK_PP_LIST_FOR_EACH_I_M) 00031 # endif 00032 # 00033 # if MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_STRICT() 00034 # define MSGPACK_PP_LIST_FOR_EACH_I_P(r, x) MSGPACK_PP_LIST_FOR_EACH_I_P_D x 00035 # define MSGPACK_PP_LIST_FOR_EACH_I_P_D(m, d, l, i) MSGPACK_PP_LIST_IS_CONS(l) 00036 # else 00037 # define MSGPACK_PP_LIST_FOR_EACH_I_P(r, x) MSGPACK_PP_LIST_IS_CONS(MSGPACK_PP_TUPLE_ELEM(4, 2, x)) 00038 # endif 00039 # 00040 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_MWCC() 00041 # define MSGPACK_PP_LIST_FOR_EACH_I_O(r, x) MSGPACK_PP_LIST_FOR_EACH_I_O_D x 00042 # define MSGPACK_PP_LIST_FOR_EACH_I_O_D(m, d, l, i) (m, d, MSGPACK_PP_LIST_REST(l), MSGPACK_PP_INC(i)) 00043 # else 00044 # define MSGPACK_PP_LIST_FOR_EACH_I_O(r, x) (MSGPACK_PP_TUPLE_ELEM(4, 0, x), MSGPACK_PP_TUPLE_ELEM(4, 1, x), MSGPACK_PP_LIST_REST(MSGPACK_PP_TUPLE_ELEM(4, 2, x)), MSGPACK_PP_INC(MSGPACK_PP_TUPLE_ELEM(4, 3, x))) 00045 # endif 00046 # 00047 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG() 00048 # define MSGPACK_PP_LIST_FOR_EACH_I_M(r, x) MSGPACK_PP_LIST_FOR_EACH_I_M_D(r, MSGPACK_PP_TUPLE_ELEM(4, 0, x), MSGPACK_PP_TUPLE_ELEM(4, 1, x), MSGPACK_PP_TUPLE_ELEM(4, 2, x), MSGPACK_PP_TUPLE_ELEM(4, 3, x)) 00049 # else 00050 # define MSGPACK_PP_LIST_FOR_EACH_I_M(r, x) MSGPACK_PP_LIST_FOR_EACH_I_M_I(r, MSGPACK_PP_TUPLE_REM_4 x) 00051 # define MSGPACK_PP_LIST_FOR_EACH_I_M_I(r, x_e) MSGPACK_PP_LIST_FOR_EACH_I_M_D(r, x_e) 00052 # endif 00053 # 00054 # define MSGPACK_PP_LIST_FOR_EACH_I_M_D(r, m, d, l, i) m(r, d, i, MSGPACK_PP_LIST_FIRST(l)) 00055 # 00056 # /* MSGPACK_PP_LIST_FOR_EACH_I_R */ 00057 # 00058 # if ~MSGPACK_PP_CONFIG_FLAGS() & MSGPACK_PP_CONFIG_EDG() 00059 # define MSGPACK_PP_LIST_FOR_EACH_I_R(r, macro, data, list) MSGPACK_PP_FOR_ ## r((macro, data, list, 0), MSGPACK_PP_LIST_FOR_EACH_I_P, MSGPACK_PP_LIST_FOR_EACH_I_O, MSGPACK_PP_LIST_FOR_EACH_I_M) 00060 # else 00061 # define MSGPACK_PP_LIST_FOR_EACH_I_R(r, macro, data, list) MSGPACK_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) 00062 # define MSGPACK_PP_LIST_FOR_EACH_I_R_I(r, macro, data, list) MSGPACK_PP_FOR_ ## r((macro, data, list, 0), MSGPACK_PP_LIST_FOR_EACH_I_P, MSGPACK_PP_LIST_FOR_EACH_I_O, MSGPACK_PP_LIST_FOR_EACH_I_M) 00063 # endif 00064 # 00065 # endif
Generated on Tue Jul 12 2022 22:51:45 by 1.7.2