messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers get_data.hpp Source File

get_data.hpp

00001 # /* **************************************************************************
00002 #  *                                                                          *
00003 #  *     (C) Copyright Edward Diener 2014.                                    *
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_DETAIL_GET_DATA_HPP
00013 # define MSGPACK_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP
00014 #
00015 # include <msgpack/preprocessor/config/config.hpp>
00016 # include <msgpack/preprocessor/tuple/rem.hpp>
00017 # include <msgpack/preprocessor/control/if.hpp>
00018 # include <msgpack/preprocessor/control/iif.hpp>
00019 # include <msgpack/preprocessor/facilities/is_1.hpp>
00020 #
00021 # /* MSGPACK_PP_ARRAY_DETAIL_GET_DATA */
00022 #
00023 # define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_NONE(size, data)
00024 
00025 # if MSGPACK_PP_VARIADICS && !(MSGPACK_PP_VARIADICS_MSVC && _MSC_VER <= 1400)
00026 #    if MSGPACK_PP_VARIADICS_MSVC
00027 #       define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_DEFAULT(size, data) MSGPACK_PP_TUPLE_REM(size) data
00028 #       define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_CAT(size, data) MSGPACK_PP_TUPLE_REM_CAT(size) data
00029 #       define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) \
00030             MSGPACK_PP_IIF \
00031                 ( \
00032                 MSGPACK_PP_IS_1(size), \
00033                 MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_CAT, \
00034                 MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY_VC_DEFAULT \
00035                 ) \
00036             (size,data) \
00037 /**/
00038 #    else
00039 #       define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) MSGPACK_PP_TUPLE_REM(size) data
00040 #    endif
00041 # else
00042 #    define MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY(size, data) MSGPACK_PP_TUPLE_REM(size) data
00043 # endif
00044 
00045 # define MSGPACK_PP_ARRAY_DETAIL_GET_DATA(size, data) \
00046     MSGPACK_PP_IF \
00047         ( \
00048         size, \
00049         MSGPACK_PP_ARRAY_DETAIL_GET_DATA_ANY, \
00050         MSGPACK_PP_ARRAY_DETAIL_GET_DATA_NONE \
00051         ) \
00052     (size,data) \
00053 /**/
00054 #
00055 # endif /* MSGPACK_PREPROCESSOR_ARRAY_DETAIL_GET_DATA_HPP */