messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers def.hpp Source File

def.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_SLOT_DETAIL_DEF_HPP
00013 # define MSGPACK_PREPROCESSOR_SLOT_DETAIL_DEF_HPP
00014 #
00015 # /* MSGPACK_PP_SLOT_OFFSET_x */
00016 #
00017 # define MSGPACK_PP_SLOT_OFFSET_10(x) (x) % 1000000000UL
00018 # define MSGPACK_PP_SLOT_OFFSET_9(x) MSGPACK_PP_SLOT_OFFSET_10(x) % 100000000UL
00019 # define MSGPACK_PP_SLOT_OFFSET_8(x) MSGPACK_PP_SLOT_OFFSET_9(x) % 10000000UL
00020 # define MSGPACK_PP_SLOT_OFFSET_7(x) MSGPACK_PP_SLOT_OFFSET_8(x) % 1000000UL
00021 # define MSGPACK_PP_SLOT_OFFSET_6(x) MSGPACK_PP_SLOT_OFFSET_7(x) % 100000UL
00022 # define MSGPACK_PP_SLOT_OFFSET_5(x) MSGPACK_PP_SLOT_OFFSET_6(x) % 10000UL
00023 # define MSGPACK_PP_SLOT_OFFSET_4(x) MSGPACK_PP_SLOT_OFFSET_5(x) % 1000UL
00024 # define MSGPACK_PP_SLOT_OFFSET_3(x) MSGPACK_PP_SLOT_OFFSET_4(x) % 100UL
00025 # define MSGPACK_PP_SLOT_OFFSET_2(x) MSGPACK_PP_SLOT_OFFSET_3(x) % 10UL
00026 #
00027 # /* MSGPACK_PP_SLOT_CC_x */
00028 #
00029 # define MSGPACK_PP_SLOT_CC_2(a, b) MSGPACK_PP_SLOT_CC_2_D(a, b)
00030 # define MSGPACK_PP_SLOT_CC_3(a, b, c) MSGPACK_PP_SLOT_CC_3_D(a, b, c)
00031 # define MSGPACK_PP_SLOT_CC_4(a, b, c, d) MSGPACK_PP_SLOT_CC_4_D(a, b, c, d)
00032 # define MSGPACK_PP_SLOT_CC_5(a, b, c, d, e) MSGPACK_PP_SLOT_CC_5_D(a, b, c, d, e)
00033 # define MSGPACK_PP_SLOT_CC_6(a, b, c, d, e, f) MSGPACK_PP_SLOT_CC_6_D(a, b, c, d, e, f)
00034 # define MSGPACK_PP_SLOT_CC_7(a, b, c, d, e, f, g) MSGPACK_PP_SLOT_CC_7_D(a, b, c, d, e, f, g)
00035 # define MSGPACK_PP_SLOT_CC_8(a, b, c, d, e, f, g, h) MSGPACK_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h)
00036 # define MSGPACK_PP_SLOT_CC_9(a, b, c, d, e, f, g, h, i) MSGPACK_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i)
00037 # define MSGPACK_PP_SLOT_CC_10(a, b, c, d, e, f, g, h, i, j) MSGPACK_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j)
00038 #
00039 # define MSGPACK_PP_SLOT_CC_2_D(a, b) a ## b
00040 # define MSGPACK_PP_SLOT_CC_3_D(a, b, c) a ## b ## c
00041 # define MSGPACK_PP_SLOT_CC_4_D(a, b, c, d) a ## b ## c ## d
00042 # define MSGPACK_PP_SLOT_CC_5_D(a, b, c, d, e) a ## b ## c ## d ## e
00043 # define MSGPACK_PP_SLOT_CC_6_D(a, b, c, d, e, f) a ## b ## c ## d ## e ## f
00044 # define MSGPACK_PP_SLOT_CC_7_D(a, b, c, d, e, f, g) a ## b ## c ## d ## e ## f ## g
00045 # define MSGPACK_PP_SLOT_CC_8_D(a, b, c, d, e, f, g, h) a ## b ## c ## d ## e ## f ## g ## h
00046 # define MSGPACK_PP_SLOT_CC_9_D(a, b, c, d, e, f, g, h, i) a ## b ## c ## d ## e ## f ## g ## h ## i
00047 # define MSGPACK_PP_SLOT_CC_10_D(a, b, c, d, e, f, g, h, i, j) a ## b ## c ## d ## e ## f ## g ## h ## i ## j
00048 #
00049 # endif