frame_iteration.html 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <html>
  2. <head>
  3. <title>BOOST_PP_FRAME_ITERATION</title>
  4. <link rel="stylesheet" type="text/css" href="../styles.css">
  5. </head>
  6. <body>
  7. <div style="margin-left: 0px;">
  8. The <b>BOOST_PP_FRAME_ITERATION</b> macro expands to the iteration value of an absolute <i>file-iteration</i> depth.
  9. </div>
  10. <h4>Usage</h4>
  11. <div class="code">
  12. <b>BOOST_PP_FRAME_ITERATION</b>(<i>i</i>)
  13. </div>
  14. <h4>Arguments</h4>
  15. <dl>
  16. <dt>i</dt>
  17. <dd>
  18. The absolute depth of the frame whose iteration value is to be retreived.&nbsp;
  19. Valid values range from <i>1</i> to <b>BOOST_PP_ITERATION_DEPTH</b>().
  20. </dd>
  21. </dl>
  22. <h4>Remarks</h4>
  23. <div>
  24. This macro is only valid when a <i>file-iteration</i> is in progress.
  25. </div>
  26. <h4>Requirements</h4>
  27. <div>
  28. <b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
  29. </div>
  30. <h4>Sample Code</h4>
  31. <div><pre>
  32. // file.h
  33. #if !<a href="is_iterating.html">BOOST_PP_IS_ITERATING</a>
  34. #ifndef FILE_H_
  35. #define FILE_H_
  36. #include &lt;<a href="../headers/iteration/iterate.html">boost/preprocessor/iteration/iterate.hpp</a>&gt;
  37. #define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (3, (1, 10, "file.h"))
  38. #include <a href="iterate.html">BOOST_PP_ITERATE</a>()
  39. #endif
  40. #elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 1
  41. --
  42. #define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_2</a> \
  43. (3, (1, <a href="iteration.html">BOOST_PP_ITERATION</a>(), "file.h")) \
  44. /**/
  45. #include <a href="iterate.html">BOOST_PP_ITERATE</a>()
  46. #else
  47. outer: <a href="frame_iteration.html">BOOST_PP_FRAME_ITERATION</a>(1)
  48. inner: <a href="frame_iteration.html">BOOST_PP_FRAME_ITERATION</a>(2)
  49. #endif
  50. </pre></div>
  51. <hr size="1">
  52. <div style="margin-left: 0px;">
  53. <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
  54. </br><i>© Copyright Paul Mensonides 2002</i>
  55. </div>
  56. <div style="margin-left: 0px;">
  57. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  58. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  59. copy at <a href=
  60. "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  61. </div>
  62. </body>
  63. </html>