forked from boostorg/preprocessor
initial revision
[SVN r15198]
This commit is contained in:
63
docs.1/ref/frame_iteration.html
Normal file
63
docs.1/ref/frame_iteration.html
Normal file
@ -0,0 +1,63 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>BOOST_PP_FRAME_ITERATION</title>
|
||||
<link rel="stylesheet" type="text/css" href="../styles.css">
|
||||
<script language="javascript" type="text/javascript" src="../scripts.js"></script>
|
||||
</head>
|
||||
<body onload="init('sample');">
|
||||
<div style="margin-left: 0px;">
|
||||
The <b>BOOST_PP_FRAME_ITERATION</b> macro expands to the iteration value of an absolute <i>file-iteration</i> depth.
|
||||
</div>
|
||||
<h4>Usage</h4>
|
||||
<div class="code">
|
||||
<b>BOOST_PP_FRAME_ITERATION</b>(<i>i</i>)
|
||||
</div>
|
||||
<h4>Arguments</h4>
|
||||
<dl>
|
||||
<dt>i</dt>
|
||||
<dd>
|
||||
The absolute depth of the frame whose iteration value is to be retreived.
|
||||
Valid values range from <i>1</i> to <b>BOOST_PP_ITERATION_DEPTH</b>().
|
||||
</dd>
|
||||
</dl>
|
||||
<h4>Remarks</h4>
|
||||
<div>
|
||||
This macro is only valid when a <i>file-iteration</i> is in progress.
|
||||
</div>
|
||||
<h4>Requirements</h4>
|
||||
<div>
|
||||
<b>Header:</b> <a href="../headers/iteration/iterate.hpp.html"><boost/preprocessor/iteration/iterate.hpp></a>
|
||||
</div>
|
||||
<h4><a class="local" onclick="toggle('sample');" onmouseover="change(this);" onmouseout="revert(this);">Sample Code</a></h4>
|
||||
<div id="sample"><pre>
|
||||
// file.h
|
||||
#if !BOOST_PP_IS_ITERATING
|
||||
|
||||
#ifndef FILE_H_
|
||||
#define FILE_H_
|
||||
|
||||
#include <boost/preprocessor/iteration/iterate.hpp>
|
||||
|
||||
#define BOOST_PP_ITERATION_PARAMS_1 (3, (1, 10, "file.h"))
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#endif
|
||||
|
||||
#elif BOOST_PP_ITERATION_DEPTH() == 1
|
||||
|
||||
--
|
||||
#define BOOST_PP_ITERATION_PARAMS_2 /* ... */ \
|
||||
(3, (1, BOOST_PP_ITERATION(), "file.h")) \
|
||||
/**/
|
||||
|
||||
#include BOOST_PP_ITERATE()
|
||||
|
||||
#else
|
||||
|
||||
outer: BOOST_PP_FRAME_ITERATION(1)
|
||||
inner: BOOST_PP_FRAME_ITERATION(2)
|
||||
|
||||
#endif
|
||||
<pre></div>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user