3 <title>BOOST_PP_ITERATE
</title>
4 <link rel=
"stylesheet" type=
"text/css" href=
"../styles.css">
7 <div style=
"margin-left: 0px;">
8 The
<b>BOOST_PP_ITERATE
</b> macro initiates a
<i>file-iteration
</i>.
12 #include
<b>BOOST_PP_ITERATE
</b>()
16 Arguments to this macro are passed as
<i>external named arguments
</i> in one of two
17 ways--either through
<b>BOOST_PP_FILENAME_
<i>x
</i></b> and
<b>BOOST_PP_ITERATION_LIMITS
</b> <i>or
</i>
18 through
<b>BOOST_PP_ITERATION_PARAMS_
<i>x
</i></b>.
21 Three pieces of information are required to perform a
<i>file-iteration
</i>.
22 First, the name of a file to iterate over.
23 This is passed via
<b>BOOST_PP_FILENAME_
<i>x
</i></b> <i>or
</i> as part of
<b>BOOST_PP_ITERATION_PARAMS_
<i>x
</i></b>.
24 The
<i>file-iteration
</i> mechanism will repeatedly include this file with iteration values ranging from a lower bound to an upper bound--the second and third
<i>required
</i> parameters.
25 These two boundaries are either passed through
<b>BOOST_PP_ITERATION_LIMITS
</b> <i>or
</i> as part of
<b>BOOST_PP_ITERATION_PARAMS_
<i>x
</i></b>.
28 Optionally, a fourth parameter may be passed that associates flags with an iteration.
29 These flags are primarily useful to distinguish one iteration from another in the same file.
30 This parameter can only be passed through
<b>BOOST_PP_ITERATION_PARAMS_
<i>x
</i></b>.
33 While a
<i>file-iteration
</i> is in progress,
<b>BOOST_PP_IS_ITERATING
</b> is defined as
<i>1</i>.
37 <li><a href=
"filename_x.html">BOOST_PP_FILENAME_
<i>x
</i></a></li>
38 <li><a href=
"is_iterating.html">BOOST_PP_IS_ITERATING
</a></li>
39 <li><a href=
"iteration_limits.html">BOOST_PP_ITERATION_LIMITS
</a></li>
40 <li><a href=
"iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_
<i>x
</i></a></li>
44 <b>Header:
</b> <a href=
"../headers/iteration/iterate.html"><boost/preprocessor/iteration/iterate.hpp
></a>
49 #if !
<a href=
"is_iterating.html">BOOST_PP_IS_ITERATING
</a>
54 #include
<<a href=
"../headers/iteration/iterate.html">boost/preprocessor/iteration/iterate.hpp
</a>>
56 #define
<a href=
"iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1
</a> (
3, (
1,
10,
"file.h"))
57 #include
<a href=
"iterate.html">BOOST_PP_ITERATE
</a>()
59 #define
<a href=
"filename_x.html">BOOST_PP_FILENAME_1
</a> "file.h"
60 #define
<a href=
"iteration_limits.html">BOOST_PP_ITERATION_LIMITS
</a> (
11,
20)
61 #include
<a href=
"iterate.html">BOOST_PP_ITERATE
</a>()
67 current iteration value is
<a href=
"iteration.html">BOOST_PP_ITERATION
</a>()
72 <div style=
"margin-left: 0px;">
73 <i>© Copyright
<a href=
"http://www.housemarque.com" target=
"_top">Housemarque Oy
</a> 2002</i>
74 </br><i>© Copyright Paul Mensonides
2002</i>
76 <div style=
"margin-left: 0px;">
77 <p><small>Distributed under the Boost Software License, Version
1.0. (See
78 accompanying file
<a href=
"../../../../LICENSE_1_0.txt">LICENSE_1_0.txt
</a> or
80 "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt
</a>)
</small></p>