messagepack implementation for embedded systems (mbed / arduino)

Dependents:   hello_message_pack

msgpack-c & msgpack-c++ https://github.com/msgpack/msgpack-c implementation for embedded systems (mbed / Arduino)

Committer:
hideakitai
Date:
Mon Feb 22 01:43:48 2016 +0000
Revision:
4:bd0c06dd6e92
Parent:
0:3f9dbf1e2cb0
fix throw error

Who changed what in which revision?

UserRevisionLine numberNew contents of line
hideakitai 0:3f9dbf1e2cb0 1 /*
hideakitai 0:3f9dbf1e2cb0 2 Copyright Rene Rivera 2011-2013
hideakitai 0:3f9dbf1e2cb0 3 Distributed under the Boost Software License, Version 1.0.
hideakitai 0:3f9dbf1e2cb0 4 (See accompanying file LICENSE_1_0.txt or copy at
hideakitai 0:3f9dbf1e2cb0 5 http://www.boost.org/LICENSE_1_0.txt)
hideakitai 0:3f9dbf1e2cb0 6 */
hideakitai 0:3f9dbf1e2cb0 7
hideakitai 0:3f9dbf1e2cb0 8 #ifndef MSGPACK_PREDEF_LANGUAGE_STDCPP_H
hideakitai 0:3f9dbf1e2cb0 9 #define MSGPACK_PREDEF_LANGUAGE_STDCPP_H
hideakitai 0:3f9dbf1e2cb0 10
hideakitai 0:3f9dbf1e2cb0 11 #include <msgpack/predef/version_number.h>
hideakitai 0:3f9dbf1e2cb0 12 #include <msgpack/predef/make.h>
hideakitai 0:3f9dbf1e2cb0 13
hideakitai 0:3f9dbf1e2cb0 14 /*`
hideakitai 0:3f9dbf1e2cb0 15 [heading `MSGPACK_LANG_STDCPP`]
hideakitai 0:3f9dbf1e2cb0 16
hideakitai 0:3f9dbf1e2cb0 17 [@http://en.wikipedia.org/wiki/C%2B%2B Standard C++] language.
hideakitai 0:3f9dbf1e2cb0 18 If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
hideakitai 0:3f9dbf1e2cb0 19 Because of the way the C++ standardization process works the
hideakitai 0:3f9dbf1e2cb0 20 defined version year will not be the commonly known year of the standard.
hideakitai 0:3f9dbf1e2cb0 21 Specifically the defined versions are:
hideakitai 0:3f9dbf1e2cb0 22
hideakitai 0:3f9dbf1e2cb0 23 [table Detected Version Number vs. C++ Standard Year
hideakitai 0:3f9dbf1e2cb0 24 [[Detected Version Number] [Standard Year] [C++ Standard]]
hideakitai 0:3f9dbf1e2cb0 25 [[27.11.1] [1998] [ISO/IEC 14882:1998]]
hideakitai 0:3f9dbf1e2cb0 26 [[41.12.1] [2011] [ISO/IEC 14882:2011]]
hideakitai 0:3f9dbf1e2cb0 27 ]
hideakitai 0:3f9dbf1e2cb0 28
hideakitai 0:3f9dbf1e2cb0 29 [table
hideakitai 0:3f9dbf1e2cb0 30 [[__predef_symbol__] [__predef_version__]]
hideakitai 0:3f9dbf1e2cb0 31
hideakitai 0:3f9dbf1e2cb0 32 [[`__cplusplus`] [__predef_detection__]]
hideakitai 0:3f9dbf1e2cb0 33
hideakitai 0:3f9dbf1e2cb0 34 [[`__cplusplus`] [YYYY.MM.1]]
hideakitai 0:3f9dbf1e2cb0 35 ]
hideakitai 0:3f9dbf1e2cb0 36 */
hideakitai 0:3f9dbf1e2cb0 37
hideakitai 0:3f9dbf1e2cb0 38 #define MSGPACK_LANG_STDCPP MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
hideakitai 0:3f9dbf1e2cb0 39
hideakitai 0:3f9dbf1e2cb0 40 #if defined(__cplusplus)
hideakitai 0:3f9dbf1e2cb0 41 # undef MSGPACK_LANG_STDCPP
hideakitai 0:3f9dbf1e2cb0 42 # if (__cplusplus > 100)
hideakitai 0:3f9dbf1e2cb0 43 # define MSGPACK_LANG_STDCPP MSGPACK_PREDEF_MAKE_YYYYMM(__cplusplus)
hideakitai 0:3f9dbf1e2cb0 44 # else
hideakitai 0:3f9dbf1e2cb0 45 # define MSGPACK_LANG_STDCPP MSGPACK_VERSION_NUMBER_AVAILABLE
hideakitai 0:3f9dbf1e2cb0 46 # endif
hideakitai 0:3f9dbf1e2cb0 47 #endif
hideakitai 0:3f9dbf1e2cb0 48
hideakitai 0:3f9dbf1e2cb0 49 #if MSGPACK_LANG_STDCPP
hideakitai 0:3f9dbf1e2cb0 50 # define MSGPACK_LANG_STDCPP_AVAILABLE
hideakitai 0:3f9dbf1e2cb0 51 #endif
hideakitai 0:3f9dbf1e2cb0 52
hideakitai 0:3f9dbf1e2cb0 53 #define MSGPACK_LANG_STDCPP_NAME "Standard C++"
hideakitai 0:3f9dbf1e2cb0 54
hideakitai 0:3f9dbf1e2cb0 55 #include <msgpack/predef/detail/test.h>
hideakitai 0:3f9dbf1e2cb0 56 MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LANG_STDCPP,MSGPACK_LANG_STDCPP_NAME)
hideakitai 0:3f9dbf1e2cb0 57
hideakitai 0:3f9dbf1e2cb0 58
hideakitai 0:3f9dbf1e2cb0 59 /*`
hideakitai 0:3f9dbf1e2cb0 60 [heading `MSGPACK_LANG_STDCPPCLI`]
hideakitai 0:3f9dbf1e2cb0 61
hideakitai 0:3f9dbf1e2cb0 62 [@http://en.wikipedia.org/wiki/C%2B%2B/CLI Standard C++/CLI] language.
hideakitai 0:3f9dbf1e2cb0 63 If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
hideakitai 0:3f9dbf1e2cb0 64
hideakitai 0:3f9dbf1e2cb0 65 [table
hideakitai 0:3f9dbf1e2cb0 66 [[__predef_symbol__] [__predef_version__]]
hideakitai 0:3f9dbf1e2cb0 67
hideakitai 0:3f9dbf1e2cb0 68 [[`__cplusplus_cli`] [__predef_detection__]]
hideakitai 0:3f9dbf1e2cb0 69
hideakitai 0:3f9dbf1e2cb0 70 [[`__cplusplus_cli`] [YYYY.MM.1]]
hideakitai 0:3f9dbf1e2cb0 71 ]
hideakitai 0:3f9dbf1e2cb0 72 */
hideakitai 0:3f9dbf1e2cb0 73
hideakitai 0:3f9dbf1e2cb0 74 #define MSGPACK_LANG_STDCPPCLI MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
hideakitai 0:3f9dbf1e2cb0 75
hideakitai 0:3f9dbf1e2cb0 76 #if defined(__cplusplus_cli)
hideakitai 0:3f9dbf1e2cb0 77 # undef MSGPACK_LANG_STDCPPCLI
hideakitai 0:3f9dbf1e2cb0 78 # if (__cplusplus_cli > 100)
hideakitai 0:3f9dbf1e2cb0 79 # define MSGPACK_LANG_STDCPPCLI MSGPACK_PREDEF_MAKE_YYYYMM(__cplusplus_cli)
hideakitai 0:3f9dbf1e2cb0 80 # else
hideakitai 0:3f9dbf1e2cb0 81 # define MSGPACK_LANG_STDCPPCLI MSGPACK_VERSION_NUMBER_AVAILABLE
hideakitai 0:3f9dbf1e2cb0 82 # endif
hideakitai 0:3f9dbf1e2cb0 83 #endif
hideakitai 0:3f9dbf1e2cb0 84
hideakitai 0:3f9dbf1e2cb0 85 #if MSGPACK_LANG_STDCPPCLI
hideakitai 0:3f9dbf1e2cb0 86 # define MSGPACK_LANG_STDCPPCLI_AVAILABLE
hideakitai 0:3f9dbf1e2cb0 87 #endif
hideakitai 0:3f9dbf1e2cb0 88
hideakitai 0:3f9dbf1e2cb0 89 #define MSGPACK_LANG_STDCPPCLI_NAME "Standard C++/CLI"
hideakitai 0:3f9dbf1e2cb0 90
hideakitai 0:3f9dbf1e2cb0 91 #include <msgpack/predef/detail/test.h>
hideakitai 0:3f9dbf1e2cb0 92 MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LANG_STDCPPCLI,MSGPACK_LANG_STDCPPCLI_NAME)
hideakitai 0:3f9dbf1e2cb0 93
hideakitai 0:3f9dbf1e2cb0 94
hideakitai 0:3f9dbf1e2cb0 95 /*`
hideakitai 0:3f9dbf1e2cb0 96 [heading `MSGPACK_LANG_STDECPP`]
hideakitai 0:3f9dbf1e2cb0 97
hideakitai 0:3f9dbf1e2cb0 98 [@http://en.wikipedia.org/wiki/Embedded_C%2B%2B Standard Embedded C++] language.
hideakitai 0:3f9dbf1e2cb0 99
hideakitai 0:3f9dbf1e2cb0 100 [table
hideakitai 0:3f9dbf1e2cb0 101 [[__predef_symbol__] [__predef_version__]]
hideakitai 0:3f9dbf1e2cb0 102
hideakitai 0:3f9dbf1e2cb0 103 [[`__embedded_cplusplus`] [__predef_detection__]]
hideakitai 0:3f9dbf1e2cb0 104 ]
hideakitai 0:3f9dbf1e2cb0 105 */
hideakitai 0:3f9dbf1e2cb0 106
hideakitai 0:3f9dbf1e2cb0 107 #define MSGPACK_LANG_STDECPP MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
hideakitai 0:3f9dbf1e2cb0 108
hideakitai 0:3f9dbf1e2cb0 109 #if defined(__embedded_cplusplus)
hideakitai 0:3f9dbf1e2cb0 110 # undef MSGPACK_LANG_STDECPP
hideakitai 0:3f9dbf1e2cb0 111 # define MSGPACK_LANG_STDECPP MSGPACK_VERSION_NUMBER_AVAILABLE
hideakitai 0:3f9dbf1e2cb0 112 #endif
hideakitai 0:3f9dbf1e2cb0 113
hideakitai 0:3f9dbf1e2cb0 114 #if MSGPACK_LANG_STDECPP
hideakitai 0:3f9dbf1e2cb0 115 # define MSGPACK_LANG_STDECPP_AVAILABLE
hideakitai 0:3f9dbf1e2cb0 116 #endif
hideakitai 0:3f9dbf1e2cb0 117
hideakitai 0:3f9dbf1e2cb0 118 #define MSGPACK_LANG_STDECPP_NAME "Standard Embedded C++"
hideakitai 0:3f9dbf1e2cb0 119
hideakitai 0:3f9dbf1e2cb0 120 #include <msgpack/predef/detail/test.h>
hideakitai 0:3f9dbf1e2cb0 121 MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LANG_STDECPP,MSGPACK_LANG_STDECPP_NAME)
hideakitai 0:3f9dbf1e2cb0 122
hideakitai 0:3f9dbf1e2cb0 123
hideakitai 0:3f9dbf1e2cb0 124 #endif