blob: 06e19418b50e17a492c1f8690eed85543123911a [file] [log] [blame]
Jeff Thompsonf7d49942013-08-01 16:47:40 -07001# /* **************************************************************************
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 Thompson3d613fd2013-10-15 15:39:04 -070012# ifndef NDNBOOST_PREPROCESSOR_ITERATION_ITERATE_HPP
13# define NDNBOOST_PREPROCESSOR_ITERATION_ITERATE_HPP
Jeff Thompsonf7d49942013-08-01 16:47:40 -070014#
Jeff Thompson2277ce52013-08-01 17:34:11 -070015# 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 Thompsonf7d49942013-08-01 16:47:40 -070022#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070023# /* NDNBOOST_PP_ITERATION_DEPTH */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070024#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070025# define NDNBOOST_PP_ITERATION_DEPTH() 0
Jeff Thompsonf7d49942013-08-01 16:47:40 -070026#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070027# /* NDNBOOST_PP_ITERATION */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070028#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070029# define NDNBOOST_PP_ITERATION() NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_, NDNBOOST_PP_ITERATION_DEPTH())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070030#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070031# /* NDNBOOST_PP_ITERATION_START && NDNBOOST_PP_ITERATION_FINISH */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070032#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070033# 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 Thompsonf7d49942013-08-01 16:47:40 -070035#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070036# /* NDNBOOST_PP_ITERATION_FLAGS */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070037#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070038# define NDNBOOST_PP_ITERATION_FLAGS() (NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_FLAGS_, NDNBOOST_PP_ITERATION_DEPTH())())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070039#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070040# /* NDNBOOST_PP_FRAME_ITERATION */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070041#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070042# define NDNBOOST_PP_FRAME_ITERATION(i) NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_, i)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070043#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070044# /* NDNBOOST_PP_FRAME_START && NDNBOOST_PP_FRAME_FINISH */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070045#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070046# 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 Thompsonf7d49942013-08-01 16:47:40 -070048#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070049# /* NDNBOOST_PP_FRAME_FLAGS */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070050#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070051# define NDNBOOST_PP_FRAME_FLAGS(i) (NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATION_FLAGS_, i)())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070052#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070053# /* NDNBOOST_PP_RELATIVE_ITERATION */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070054#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070055# define NDNBOOST_PP_RELATIVE_ITERATION(i) NDNBOOST_PP_CAT(NDNBOOST_PP_RELATIVE_, i)(NDNBOOST_PP_ITERATION_)
Jeff Thompsonf7d49942013-08-01 16:47:40 -070056#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070057# 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 Thompsonf7d49942013-08-01 16:47:40 -070062#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070063# /* NDNBOOST_PP_RELATIVE_START && NDNBOOST_PP_RELATIVE_FINISH */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070064#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070065# 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 Thompsonf7d49942013-08-01 16:47:40 -070067#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070068# /* NDNBOOST_PP_RELATIVE_FLAGS */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070069#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070070# define NDNBOOST_PP_RELATIVE_FLAGS(i) (NDNBOOST_PP_CAT(NDNBOOST_PP_RELATIVE_, i)(NDNBOOST_PP_ITERATION_FLAGS_)())
Jeff Thompsonf7d49942013-08-01 16:47:40 -070071#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070072# /* NDNBOOST_PP_ITERATE */
Jeff Thompsonf7d49942013-08-01 16:47:40 -070073#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070074# define NDNBOOST_PP_ITERATE() NDNBOOST_PP_CAT(NDNBOOST_PP_ITERATE_, NDNBOOST_PP_INC(NDNBOOST_PP_ITERATION_DEPTH()))
Jeff Thompsonf7d49942013-08-01 16:47:40 -070075#
Jeff Thompson3d613fd2013-10-15 15:39:04 -070076# 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 Thompsonf7d49942013-08-01 16:47:40 -070081#
82# endif