Hideaki Tai / msgpack-embedded

Dependents:   hello_message_pack

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers counter.hpp Source File

counter.hpp

00001 # /* **************************************************************************
00002 #  *                                                                          *
00003 #  *     (C) Copyright Paul Mensonides 2005.                                  *
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 # define MSGPACK_PP_VALUE MSGPACK_PP_COUNTER + 1
00013 #
00014 # include <msgpack/preprocessor/slot/detail/shared.hpp>
00015 #
00016 # undef MSGPACK_PP_COUNTER
00017 #
00018 # undef MSGPACK_PP_COUNTER_DIGIT_1
00019 # undef MSGPACK_PP_COUNTER_DIGIT_2
00020 # undef MSGPACK_PP_COUNTER_DIGIT_3
00021 # undef MSGPACK_PP_COUNTER_DIGIT_4
00022 # undef MSGPACK_PP_COUNTER_DIGIT_5
00023 # undef MSGPACK_PP_COUNTER_DIGIT_6
00024 # undef MSGPACK_PP_COUNTER_DIGIT_7
00025 # undef MSGPACK_PP_COUNTER_DIGIT_8
00026 # undef MSGPACK_PP_COUNTER_DIGIT_9
00027 # undef MSGPACK_PP_COUNTER_DIGIT_10
00028 #
00029 # if MSGPACK_PP_SLOT_TEMP_10 == 0
00030 #    define MSGPACK_PP_COUNTER_DIGIT_10 0
00031 # elif MSGPACK_PP_SLOT_TEMP_10 == 1
00032 #    define MSGPACK_PP_COUNTER_DIGIT_10 1
00033 # elif MSGPACK_PP_SLOT_TEMP_10 == 2
00034 #    define MSGPACK_PP_COUNTER_DIGIT_10 2
00035 # elif MSGPACK_PP_SLOT_TEMP_10 == 3
00036 #    define MSGPACK_PP_COUNTER_DIGIT_10 3
00037 # elif MSGPACK_PP_SLOT_TEMP_10 == 4
00038 #    define MSGPACK_PP_COUNTER_DIGIT_10 4
00039 # elif MSGPACK_PP_SLOT_TEMP_10 == 5
00040 #    define MSGPACK_PP_COUNTER_DIGIT_10 5
00041 # elif MSGPACK_PP_SLOT_TEMP_10 == 6
00042 #    define MSGPACK_PP_COUNTER_DIGIT_10 6
00043 # elif MSGPACK_PP_SLOT_TEMP_10 == 7
00044 #    define MSGPACK_PP_COUNTER_DIGIT_10 7
00045 # elif MSGPACK_PP_SLOT_TEMP_10 == 8
00046 #    define MSGPACK_PP_COUNTER_DIGIT_10 8
00047 # elif MSGPACK_PP_SLOT_TEMP_10 == 9
00048 #    define MSGPACK_PP_COUNTER_DIGIT_10 9
00049 # endif
00050 #
00051 # if MSGPACK_PP_SLOT_TEMP_9 == 0
00052 #    define MSGPACK_PP_COUNTER_DIGIT_9 0
00053 # elif MSGPACK_PP_SLOT_TEMP_9 == 1
00054 #    define MSGPACK_PP_COUNTER_DIGIT_9 1
00055 # elif MSGPACK_PP_SLOT_TEMP_9 == 2
00056 #    define MSGPACK_PP_COUNTER_DIGIT_9 2
00057 # elif MSGPACK_PP_SLOT_TEMP_9 == 3
00058 #    define MSGPACK_PP_COUNTER_DIGIT_9 3
00059 # elif MSGPACK_PP_SLOT_TEMP_9 == 4
00060 #    define MSGPACK_PP_COUNTER_DIGIT_9 4
00061 # elif MSGPACK_PP_SLOT_TEMP_9 == 5
00062 #    define MSGPACK_PP_COUNTER_DIGIT_9 5
00063 # elif MSGPACK_PP_SLOT_TEMP_9 == 6
00064 #    define MSGPACK_PP_COUNTER_DIGIT_9 6
00065 # elif MSGPACK_PP_SLOT_TEMP_9 == 7
00066 #    define MSGPACK_PP_COUNTER_DIGIT_9 7
00067 # elif MSGPACK_PP_SLOT_TEMP_9 == 8
00068 #    define MSGPACK_PP_COUNTER_DIGIT_9 8
00069 # elif MSGPACK_PP_SLOT_TEMP_9 == 9
00070 #    define MSGPACK_PP_COUNTER_DIGIT_9 9
00071 # endif
00072 #
00073 # if MSGPACK_PP_SLOT_TEMP_8 == 0
00074 #    define MSGPACK_PP_COUNTER_DIGIT_8 0
00075 # elif MSGPACK_PP_SLOT_TEMP_8 == 1
00076 #    define MSGPACK_PP_COUNTER_DIGIT_8 1
00077 # elif MSGPACK_PP_SLOT_TEMP_8 == 2
00078 #    define MSGPACK_PP_COUNTER_DIGIT_8 2
00079 # elif MSGPACK_PP_SLOT_TEMP_8 == 3
00080 #    define MSGPACK_PP_COUNTER_DIGIT_8 3
00081 # elif MSGPACK_PP_SLOT_TEMP_8 == 4
00082 #    define MSGPACK_PP_COUNTER_DIGIT_8 4
00083 # elif MSGPACK_PP_SLOT_TEMP_8 == 5
00084 #    define MSGPACK_PP_COUNTER_DIGIT_8 5
00085 # elif MSGPACK_PP_SLOT_TEMP_8 == 6
00086 #    define MSGPACK_PP_COUNTER_DIGIT_8 6
00087 # elif MSGPACK_PP_SLOT_TEMP_8 == 7
00088 #    define MSGPACK_PP_COUNTER_DIGIT_8 7
00089 # elif MSGPACK_PP_SLOT_TEMP_8 == 8
00090 #    define MSGPACK_PP_COUNTER_DIGIT_8 8
00091 # elif MSGPACK_PP_SLOT_TEMP_8 == 9
00092 #    define MSGPACK_PP_COUNTER_DIGIT_8 9
00093 # endif
00094 #
00095 # if MSGPACK_PP_SLOT_TEMP_7 == 0
00096 #    define MSGPACK_PP_COUNTER_DIGIT_7 0
00097 # elif MSGPACK_PP_SLOT_TEMP_7 == 1
00098 #    define MSGPACK_PP_COUNTER_DIGIT_7 1
00099 # elif MSGPACK_PP_SLOT_TEMP_7 == 2
00100 #    define MSGPACK_PP_COUNTER_DIGIT_7 2
00101 # elif MSGPACK_PP_SLOT_TEMP_7 == 3
00102 #    define MSGPACK_PP_COUNTER_DIGIT_7 3
00103 # elif MSGPACK_PP_SLOT_TEMP_7 == 4
00104 #    define MSGPACK_PP_COUNTER_DIGIT_7 4
00105 # elif MSGPACK_PP_SLOT_TEMP_7 == 5
00106 #    define MSGPACK_PP_COUNTER_DIGIT_7 5
00107 # elif MSGPACK_PP_SLOT_TEMP_7 == 6
00108 #    define MSGPACK_PP_COUNTER_DIGIT_7 6
00109 # elif MSGPACK_PP_SLOT_TEMP_7 == 7
00110 #    define MSGPACK_PP_COUNTER_DIGIT_7 7
00111 # elif MSGPACK_PP_SLOT_TEMP_7 == 8
00112 #    define MSGPACK_PP_COUNTER_DIGIT_7 8
00113 # elif MSGPACK_PP_SLOT_TEMP_7 == 9
00114 #    define MSGPACK_PP_COUNTER_DIGIT_7 9
00115 # endif
00116 #
00117 # if MSGPACK_PP_SLOT_TEMP_6 == 0
00118 #    define MSGPACK_PP_COUNTER_DIGIT_6 0
00119 # elif MSGPACK_PP_SLOT_TEMP_6 == 1
00120 #    define MSGPACK_PP_COUNTER_DIGIT_6 1
00121 # elif MSGPACK_PP_SLOT_TEMP_6 == 2
00122 #    define MSGPACK_PP_COUNTER_DIGIT_6 2
00123 # elif MSGPACK_PP_SLOT_TEMP_6 == 3
00124 #    define MSGPACK_PP_COUNTER_DIGIT_6 3
00125 # elif MSGPACK_PP_SLOT_TEMP_6 == 4
00126 #    define MSGPACK_PP_COUNTER_DIGIT_6 4
00127 # elif MSGPACK_PP_SLOT_TEMP_6 == 5
00128 #    define MSGPACK_PP_COUNTER_DIGIT_6 5
00129 # elif MSGPACK_PP_SLOT_TEMP_6 == 6
00130 #    define MSGPACK_PP_COUNTER_DIGIT_6 6
00131 # elif MSGPACK_PP_SLOT_TEMP_6 == 7
00132 #    define MSGPACK_PP_COUNTER_DIGIT_6 7
00133 # elif MSGPACK_PP_SLOT_TEMP_6 == 8
00134 #    define MSGPACK_PP_COUNTER_DIGIT_6 8
00135 # elif MSGPACK_PP_SLOT_TEMP_6 == 9
00136 #    define MSGPACK_PP_COUNTER_DIGIT_6 9
00137 # endif
00138 #
00139 # if MSGPACK_PP_SLOT_TEMP_5 == 0
00140 #    define MSGPACK_PP_COUNTER_DIGIT_5 0
00141 # elif MSGPACK_PP_SLOT_TEMP_5 == 1
00142 #    define MSGPACK_PP_COUNTER_DIGIT_5 1
00143 # elif MSGPACK_PP_SLOT_TEMP_5 == 2
00144 #    define MSGPACK_PP_COUNTER_DIGIT_5 2
00145 # elif MSGPACK_PP_SLOT_TEMP_5 == 3
00146 #    define MSGPACK_PP_COUNTER_DIGIT_5 3
00147 # elif MSGPACK_PP_SLOT_TEMP_5 == 4
00148 #    define MSGPACK_PP_COUNTER_DIGIT_5 4
00149 # elif MSGPACK_PP_SLOT_TEMP_5 == 5
00150 #    define MSGPACK_PP_COUNTER_DIGIT_5 5
00151 # elif MSGPACK_PP_SLOT_TEMP_5 == 6
00152 #    define MSGPACK_PP_COUNTER_DIGIT_5 6
00153 # elif MSGPACK_PP_SLOT_TEMP_5 == 7
00154 #    define MSGPACK_PP_COUNTER_DIGIT_5 7
00155 # elif MSGPACK_PP_SLOT_TEMP_5 == 8
00156 #    define MSGPACK_PP_COUNTER_DIGIT_5 8
00157 # elif MSGPACK_PP_SLOT_TEMP_5 == 9
00158 #    define MSGPACK_PP_COUNTER_DIGIT_5 9
00159 # endif
00160 #
00161 # if MSGPACK_PP_SLOT_TEMP_4 == 0
00162 #    define MSGPACK_PP_COUNTER_DIGIT_4 0
00163 # elif MSGPACK_PP_SLOT_TEMP_4 == 1
00164 #    define MSGPACK_PP_COUNTER_DIGIT_4 1
00165 # elif MSGPACK_PP_SLOT_TEMP_4 == 2
00166 #    define MSGPACK_PP_COUNTER_DIGIT_4 2
00167 # elif MSGPACK_PP_SLOT_TEMP_4 == 3
00168 #    define MSGPACK_PP_COUNTER_DIGIT_4 3
00169 # elif MSGPACK_PP_SLOT_TEMP_4 == 4
00170 #    define MSGPACK_PP_COUNTER_DIGIT_4 4
00171 # elif MSGPACK_PP_SLOT_TEMP_4 == 5
00172 #    define MSGPACK_PP_COUNTER_DIGIT_4 5
00173 # elif MSGPACK_PP_SLOT_TEMP_4 == 6
00174 #    define MSGPACK_PP_COUNTER_DIGIT_4 6
00175 # elif MSGPACK_PP_SLOT_TEMP_4 == 7
00176 #    define MSGPACK_PP_COUNTER_DIGIT_4 7
00177 # elif MSGPACK_PP_SLOT_TEMP_4 == 8
00178 #    define MSGPACK_PP_COUNTER_DIGIT_4 8
00179 # elif MSGPACK_PP_SLOT_TEMP_4 == 9
00180 #    define MSGPACK_PP_COUNTER_DIGIT_4 9
00181 # endif
00182 #
00183 # if MSGPACK_PP_SLOT_TEMP_3 == 0
00184 #    define MSGPACK_PP_COUNTER_DIGIT_3 0
00185 # elif MSGPACK_PP_SLOT_TEMP_3 == 1
00186 #    define MSGPACK_PP_COUNTER_DIGIT_3 1
00187 # elif MSGPACK_PP_SLOT_TEMP_3 == 2
00188 #    define MSGPACK_PP_COUNTER_DIGIT_3 2
00189 # elif MSGPACK_PP_SLOT_TEMP_3 == 3
00190 #    define MSGPACK_PP_COUNTER_DIGIT_3 3
00191 # elif MSGPACK_PP_SLOT_TEMP_3 == 4
00192 #    define MSGPACK_PP_COUNTER_DIGIT_3 4
00193 # elif MSGPACK_PP_SLOT_TEMP_3 == 5
00194 #    define MSGPACK_PP_COUNTER_DIGIT_3 5
00195 # elif MSGPACK_PP_SLOT_TEMP_3 == 6
00196 #    define MSGPACK_PP_COUNTER_DIGIT_3 6
00197 # elif MSGPACK_PP_SLOT_TEMP_3 == 7
00198 #    define MSGPACK_PP_COUNTER_DIGIT_3 7
00199 # elif MSGPACK_PP_SLOT_TEMP_3 == 8
00200 #    define MSGPACK_PP_COUNTER_DIGIT_3 8
00201 # elif MSGPACK_PP_SLOT_TEMP_3 == 9
00202 #    define MSGPACK_PP_COUNTER_DIGIT_3 9
00203 # endif
00204 #
00205 # if MSGPACK_PP_SLOT_TEMP_2 == 0
00206 #    define MSGPACK_PP_COUNTER_DIGIT_2 0
00207 # elif MSGPACK_PP_SLOT_TEMP_2 == 1
00208 #    define MSGPACK_PP_COUNTER_DIGIT_2 1
00209 # elif MSGPACK_PP_SLOT_TEMP_2 == 2
00210 #    define MSGPACK_PP_COUNTER_DIGIT_2 2
00211 # elif MSGPACK_PP_SLOT_TEMP_2 == 3
00212 #    define MSGPACK_PP_COUNTER_DIGIT_2 3
00213 # elif MSGPACK_PP_SLOT_TEMP_2 == 4
00214 #    define MSGPACK_PP_COUNTER_DIGIT_2 4
00215 # elif MSGPACK_PP_SLOT_TEMP_2 == 5
00216 #    define MSGPACK_PP_COUNTER_DIGIT_2 5
00217 # elif MSGPACK_PP_SLOT_TEMP_2 == 6
00218 #    define MSGPACK_PP_COUNTER_DIGIT_2 6
00219 # elif MSGPACK_PP_SLOT_TEMP_2 == 7
00220 #    define MSGPACK_PP_COUNTER_DIGIT_2 7
00221 # elif MSGPACK_PP_SLOT_TEMP_2 == 8
00222 #    define MSGPACK_PP_COUNTER_DIGIT_2 8
00223 # elif MSGPACK_PP_SLOT_TEMP_2 == 9
00224 #    define MSGPACK_PP_COUNTER_DIGIT_2 9
00225 # endif
00226 #
00227 # if MSGPACK_PP_SLOT_TEMP_1 == 0
00228 #    define MSGPACK_PP_COUNTER_DIGIT_1 0
00229 # elif MSGPACK_PP_SLOT_TEMP_1 == 1
00230 #    define MSGPACK_PP_COUNTER_DIGIT_1 1
00231 # elif MSGPACK_PP_SLOT_TEMP_1 == 2
00232 #    define MSGPACK_PP_COUNTER_DIGIT_1 2
00233 # elif MSGPACK_PP_SLOT_TEMP_1 == 3
00234 #    define MSGPACK_PP_COUNTER_DIGIT_1 3
00235 # elif MSGPACK_PP_SLOT_TEMP_1 == 4
00236 #    define MSGPACK_PP_COUNTER_DIGIT_1 4
00237 # elif MSGPACK_PP_SLOT_TEMP_1 == 5
00238 #    define MSGPACK_PP_COUNTER_DIGIT_1 5
00239 # elif MSGPACK_PP_SLOT_TEMP_1 == 6
00240 #    define MSGPACK_PP_COUNTER_DIGIT_1 6
00241 # elif MSGPACK_PP_SLOT_TEMP_1 == 7
00242 #    define MSGPACK_PP_COUNTER_DIGIT_1 7
00243 # elif MSGPACK_PP_SLOT_TEMP_1 == 8
00244 #    define MSGPACK_PP_COUNTER_DIGIT_1 8
00245 # elif MSGPACK_PP_SLOT_TEMP_1 == 9
00246 #    define MSGPACK_PP_COUNTER_DIGIT_1 9
00247 # endif
00248 #
00249 # if MSGPACK_PP_COUNTER_DIGIT_10
00250 #    define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_10(MSGPACK_PP_COUNTER_DIGIT_10, MSGPACK_PP_COUNTER_DIGIT_9, MSGPACK_PP_COUNTER_DIGIT_8, MSGPACK_PP_COUNTER_DIGIT_7, MSGPACK_PP_COUNTER_DIGIT_6, MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
00251 # elif MSGPACK_PP_COUNTER_DIGIT_9
00252 #    define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_9(MSGPACK_PP_COUNTER_DIGIT_9, MSGPACK_PP_COUNTER_DIGIT_8, MSGPACK_PP_COUNTER_DIGIT_7, MSGPACK_PP_COUNTER_DIGIT_6, MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
00253 # elif MSGPACK_PP_COUNTER_DIGIT_8
00254 #    define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_8(MSGPACK_PP_COUNTER_DIGIT_8, MSGPACK_PP_COUNTER_DIGIT_7, MSGPACK_PP_COUNTER_DIGIT_6, MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
00255 # elif MSGPACK_PP_COUNTER_DIGIT_7
00256 #    define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_7(MSGPACK_PP_COUNTER_DIGIT_7, MSGPACK_PP_COUNTER_DIGIT_6, MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
00257 # elif MSGPACK_PP_COUNTER_DIGIT_6
00258 #    define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_6(MSGPACK_PP_COUNTER_DIGIT_6, MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
00259 # elif MSGPACK_PP_COUNTER_DIGIT_5
00260 #    define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_5(MSGPACK_PP_COUNTER_DIGIT_5, MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
00261 # elif MSGPACK_PP_COUNTER_DIGIT_4
00262 #    define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_4(MSGPACK_PP_COUNTER_DIGIT_4, MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
00263 # elif MSGPACK_PP_COUNTER_DIGIT_3
00264 #    define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_3(MSGPACK_PP_COUNTER_DIGIT_3, MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
00265 # elif MSGPACK_PP_COUNTER_DIGIT_2
00266 #    define MSGPACK_PP_COUNTER MSGPACK_PP_SLOT_CC_2(MSGPACK_PP_COUNTER_DIGIT_2, MSGPACK_PP_COUNTER_DIGIT_1)
00267 # else
00268 #    define MSGPACK_PP_COUNTER MSGPACK_PP_COUNTER_DIGIT_1
00269 # endif