Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 1 | # /* ************************************************************************** |
| 2 | # * * |
| 3 | # * (C) Copyright Paul Mensonides 2002. |
| 4 | # * Distributed under the Boost Software License, Version 1.0. (See |
| 5 | # * accompanying file LICENSE_1_0.txt or copy at |
| 6 | # * http://www.boost.org/LICENSE_1_0.txt) |
| 7 | # * * |
| 8 | # ************************************************************************** */ |
| 9 | # |
| 10 | # /* See http://www.boost.org for most recent version. */ |
| 11 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 12 | # ifndef NDNBOOST_PREPROCESSOR_ITERATION_ITERATE_HPP |
| 13 | # define NDNBOOST_PREPROCESSOR_ITERATION_ITERATE_HPP |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 14 | # |
Jeff Thompson | 2277ce5 | 2013-08-01 17:34:11 -0700 | [diff] [blame] | 15 | # include <ndnboost/preprocessor/arithmetic/dec.hpp> |
| 16 | # include <ndnboost/preprocessor/arithmetic/inc.hpp> |
| 17 | # include <ndnboost/preprocessor/array/elem.hpp> |
| 18 | # include <ndnboost/preprocessor/array/size.hpp> |
| 19 | # include <ndnboost/preprocessor/cat.hpp> |
| 20 | # include <ndnboost/preprocessor/slot/slot.hpp> |
| 21 | # include <ndnboost/preprocessor/tuple/elem.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 22 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 23 | # /* NDNBOOST_PP_ITERATION_DEPTH */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 24 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 25 | # define NDNBOOST_PP_ITERATION_DEPTH() 0 |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 26 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 27 | # /* NDNBOOST_PP_ITERATION */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 28 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 29 | # define NDNBOOST_PP_ITERATION() NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_, NDNBOOST_PP_ITERATION_DEPTH()) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 30 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 31 | # /* NDNBOOST_PP_ITERATION_START && NDNBOOST_PP_ITERATION_FINISH */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 32 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 33 | # define NDNBOOST_PP_ITERATION_START() NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_START_, NDNBOOST_PP_ITERATION_DEPTH()) |
| 34 | # define NDNBOOST_PP_ITERATION_FINISH() NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_FINISH_, NDNBOOST_PP_ITERATION_DEPTH()) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 35 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 36 | # /* NDNBOOST_PP_ITERATION_FLAGS */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 37 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 38 | # define NDNBOOST_PP_ITERATION_FLAGS() (NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_FLAGS_, NDNBOOST_PP_ITERATION_DEPTH())()) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 39 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 40 | # /* NDNBOOST_PP_FRAME_ITERATION */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 41 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 42 | # define NDNBOOST_PP_FRAME_ITERATION(i) NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_, i) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 43 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 44 | # /* NDNBOOST_PP_FRAME_START && NDNBOOST_PP_FRAME_FINISH */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 45 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 46 | # define NDNBOOST_PP_FRAME_START(i) NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_START_, i) |
| 47 | # define NDNBOOST_PP_FRAME_FINISH(i) NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_FINISH_, i) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 48 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 49 | # /* NDNBOOST_PP_FRAME_FLAGS */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 50 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 51 | # define NDNBOOST_PP_FRAME_FLAGS(i) (NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_FLAGS_, i)()) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 52 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 53 | # /* NDNBOOST_PP_RELATIVE_ITERATION */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 54 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 55 | # define NDNBOOST_PP_RELATIVE_ITERATION(i) NDNBOOST_PP_CAT(NDNBOOST_PP_RELATIVE_, i)(NDNBOOST_PP_ITERATION_) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 56 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 57 | # define NDNBOOST_PP_RELATIVE_0(m) NDNBOOST_PP_CAT(m, NDNBOOST_PP_ITERATION_DEPTH()) |
| 58 | # define NDNBOOST_PP_RELATIVE_1(m) NDNBOOST_PP_CAT(m, NDNBOOST_PP_DEC(NDNBOOST_PP_ITERATION_DEPTH())) |
| 59 | # define NDNBOOST_PP_RELATIVE_2(m) NDNBOOST_PP_CAT(m, NDNBOOST_PP_DEC(NDNBOOST_PP_DEC(NDNBOOST_PP_ITERATION_DEPTH()))) |
| 60 | # define NDNBOOST_PP_RELATIVE_3(m) NDNBOOST_PP_CAT(m, NDNBOOST_PP_DEC(NDNBOOST_PP_DEC(NDNBOOST_PP_DEC(NDNBOOST_PP_ITERATION_DEPTH())))) |
| 61 | # define NDNBOOST_PP_RELATIVE_4(m) NDNBOOST_PP_CAT(m, NDNBOOST_PP_DEC(NDNBOOST_PP_DEC(NDNBOOST_PP_DEC(NDNBOOST_PP_DEC(NDNBOOST_PP_ITERATION_DEPTH()))))) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 62 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 63 | # /* NDNBOOST_PP_RELATIVE_START && NDNBOOST_PP_RELATIVE_FINISH */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 64 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 65 | # define NDNBOOST_PP_RELATIVE_START(i) NDNBOOST_PP_CAT(NDNBOOST_PP_RELATIVE_, i)(NDNBOOST_PP_ITERATION_START_) |
| 66 | # define NDNBOOST_PP_RELATIVE_FINISH(i) NDNBOOST_PP_CAT(NDNBOOST_PP_RELATIVE_, i)(NDNBOOST_PP_ITERATION_FINISH_) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 67 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 68 | # /* NDNBOOST_PP_RELATIVE_FLAGS */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 69 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 70 | # define NDNBOOST_PP_RELATIVE_FLAGS(i) (NDNBOOST_PP_CAT(NDNBOOST_PP_RELATIVE_, i)(NDNBOOST_PP_ITERATION_FLAGS_)()) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 71 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 72 | # /* NDNBOOST_PP_ITERATE */ |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 73 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 74 | # define NDNBOOST_PP_ITERATE() NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATE_, NDNBOOST_PP_INC(NDNBOOST_PP_ITERATION_DEPTH())) |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 75 | # |
Jeff Thompson | 3d613fd | 2013-10-15 15:39:04 -0700 | [diff] [blame] | 76 | # define NDNBOOST_PP_ITERATE_1 <ndnboost/preprocessor/iteration/detail/iter/forward1.hpp> |
| 77 | # define NDNBOOST_PP_ITERATE_2 <ndnboost/preprocessor/iteration/detail/iter/forward2.hpp> |
| 78 | # define NDNBOOST_PP_ITERATE_3 <ndnboost/preprocessor/iteration/detail/iter/forward3.hpp> |
| 79 | # define NDNBOOST_PP_ITERATE_4 <ndnboost/preprocessor/iteration/detail/iter/forward4.hpp> |
| 80 | # define NDNBOOST_PP_ITERATE_5 <ndnboost/preprocessor/iteration/detail/iter/forward5.hpp> |
Jeff Thompson | f7d4994 | 2013-08-01 16:47:40 -0700 | [diff] [blame] | 81 | # |
| 82 | # endif |