iteration_flags.html 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <html>
  2. <head>
  3. <title>BOOST_PP_ITERATION_FLAGS</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_ITERATION_FLAGS</b> macro retrieves flags associated with the current <i>file-iteration</i> depth.
  9. </div>
  10. <h4>Usage</h4>
  11. <div class="code">
  12. <b>BOOST_PP_ITERATION_FLAGS</b>()
  13. </div>
  14. <h4>Remarks</h4>
  15. <div>
  16. This macro is only valid when a <i>file-iteration</i> is in progress.
  17. </div>
  18. <h4>Requirements</h4>
  19. <div>
  20. <b>Header:</b> &nbsp;<a href="../headers/iteration/iterate.html">&lt;boost/preprocessor/iteration/iterate.hpp&gt;</a>
  21. </div>
  22. <h4>Sample Code</h4>
  23. <div><pre>
  24. // file.h
  25. #if !<a href="is_iterating.html">BOOST_PP_IS_ITERATING</a>
  26. #ifndef FILE_H_
  27. #define FILE_H_
  28. #include &lt;<a href="../headers/iteration/iterate.html">boost/preprocessor/iteration/iterate.hpp</a>&gt;
  29. // 1st iteration:
  30. #define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (4, (1, 10, "file.h", 0x0001))
  31. #include <a href="iterate.html">BOOST_PP_ITERATE</a>()
  32. // 2nd iteration:
  33. #define <a href="iteration_params_x.html">BOOST_PP_ITERATION_PARAMS_1</a> (4, (1, 10, "file.h", 0x0002))
  34. #include <a href="iterate.html">BOOST_PP_ITERATE</a>()
  35. #endif
  36. #elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 1 \
  37. &amp;&amp; <a href="iteration_flags.html">BOOST_PP_ITERATION_FLAGS</a>() == 0x0001 \
  38. /**/
  39. { 1st }
  40. #elif <a href="iteration_depth.html">BOOST_PP_ITERATION_DEPTH</a>() == 1 \
  41. &amp;&amp; <a href="iteration_flags.html">BOOST_PP_ITERATION_FLAGS</a>() == 0x0002 \
  42. /**/
  43. { 2nd }
  44. #endif
  45. </pre></div>
  46. <hr size="1">
  47. <div style="margin-left: 0px;">
  48. <i>© Copyright <a href="http://www.housemarque.com" target="_top">Housemarque Oy</a> 2002</i>
  49. </br><i>© Copyright Paul Mensonides 2002</i>
  50. </div>
  51. <div style="margin-left: 0px;">
  52. <p><small>Distributed under the Boost Software License, Version 1.0. (See
  53. accompanying file <a href="../../../../LICENSE_1_0.txt">LICENSE_1_0.txt</a> or
  54. copy at <a href=
  55. "http://www.boost.org/LICENSE_1_0.txt">www.boost.org/LICENSE_1_0.txt</a>)</small></p>
  56. </div>
  57. </body>
  58. </html>