|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r65995 - in sandbox/variadic_macro_data/libs/variadic_macro_data/doc: . html html/the_variadic_macro_data_library html/the_variadic_macro_data_library/vmd_detail
From: eldiener_at_[hidden]
Date: 2010-10-15 19:11:57
Author: eldiener
Date: 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
New Revision: 65995
URL: http://svn.boost.org/trac/boost/changeset/65995
Log:
Documentation changes
Text files modified:
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDComparison.qbk | 53 +++++++++++++++++++++++++++++++++
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDDetail.qbk | 34 ++++++++++----------
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDIntroduction.qbk | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_ELEM.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_SIZE.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_ARRAY.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_LIST.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_SEQ.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_TUPLE.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_ARRAY_TO_DATA.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_LIST_TO_DATA.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_SEQ_TO_DATA.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_ELEM.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_REM_CTOR.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_REVERSE.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_SIZE.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_DATA.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_LIST.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_SEQ.html | 2
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/index.html | 4 +
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_comparison.html | 63 ++++++++++++++++++++++++++++++++++++++++
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail.html | 10 +++--
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_fromPP.html | 12 +++++--
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_toPP.html | 12 +++++--
sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_tuple.html | 28 ++++++++++------
25 files changed, 192 insertions(+), 58 deletions(-)
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDComparison.qbk
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDComparison.qbk (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDComparison.qbk 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -37,4 +37,57 @@
functionality to do just that with its macros which convert from
variadic macro data to Boost PP data types.
+[section:vmd_comp_example Use-case example]
+
+A typical situation is designing a macro for end-users which
+takes variadic data as its argument. Let's call this macro,
+just as an example, ENDUSER_MACRO.
+
+Without variadic macro support, but in keeping with Boost PP, the
+best way of designing this macro is probably to use a Boost PP sequence.
+Our design of the macro might look like this:
+
+ #define ENDUSER_MACRO(ppSequence) ENDUSER_DETAIL_MACRO(ppSequence)
+
+The reason for calling another macro which does the actual work of
+expansion will be explained below when discussing how to design
+this macro using VMD.
+
+ #define ENDUSER_DETAIL_MACRO(ppSequence) \
+ /* expansion which manipulates the data
+ using the Boost PP facilities for a sequence.
+ In Boost PP one can find out the size of the
+ sequence, extract any token from the sequence,
+ and much more...
+ */
+
+The end-user would pass data to this macro in this way:
+
+ ENDUSER_MACRO((a)(b)(c)(d)(e)) // etc. with each "token" in the sequence surrounded by ()
+
+That is certainly acceptable, and without variadic macros, it is certainly
+excellent to have the Boost PP functionality that allows us to design macros
+taking variadic macro and manipulate that data using the functionality of
+Boost PP.
+
+With variadic macro support and VMD, but wishing to use our variadic data
+in exactly the same way as above, we could design our macro like this:
+
+ #define ENDUSER_MACRO(...) ENDUSER_DETAIL_MACRO(VMD_DATA_TO_PP_SEQ(__VA_ARGS__))
+
+Here we again call the macro which does the actual work.
+This is the reason why I designed my version of the macro
+without variadic macro support in the way that I did.
+
+The end-user would pass data to this macro in this way:
+
+ ENDUSER_MACRO(a,b,c,d,e)
+
+I think this last way of passing variadic data is more
+natural to an end-user than using a Boost PP sequence
+directly, but of course it depends on compiler variadic
+macro support.
+
+[endsect]
+
[endsect]
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDDetail.qbk
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDDetail.qbk (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDDetail.qbk 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -22,9 +22,9 @@
and that any token among the variadic macro data's comma-separated
tokens can be returned. The two macros are:
-# VMD_DATA_SIZE(...), which returns the number of comma-separated
+# [macroref VMD_DATA_SIZE](...), which returns the number of comma-separated
tokens.
-# VMD_DATA_ELEM(n,...), which returns a particular token among
+# [macroref VMD_DATA_ELEM](n,...), which returns a particular token among
the comma-separated sequence. Here 'n' stands for the number of
the token, starting with 0, which is returned from the variadic
macro data.
@@ -36,10 +36,10 @@
There are four macros which convert variadic macro data as a whole to
each of the four Boost PP data types. These are:
-# VMD_DATA_TO_PP_TUPLE(...), which converts to a Boost PP tuple.
-# VMD_DATA_TO_PP_ARRAY(...), which converts to a Boost PP array.
-# VMD_DATA_TO_PP_LIST(...), which converts to a Boost PP list.
-# VMD_DATA_TO_PP_SEQ(...), which converts to a Boost PP sequence.
+# [macroref VMD_DATA_TO_PP_TUPLE](...), which converts to a Boost PP tuple.
+# [macroref VMD_DATA_TO_PP_ARRAY](...), which converts to a Boost PP array.
+# [macroref VMD_DATA_TO_PP_LIST](...), which converts to a Boost PP list.
+# [macroref VMD_DATA_TO_PP_SEQ](...), which converts to a Boost PP sequence.
[endsect]
@@ -48,10 +48,10 @@
There are four macros which convert each of the four Boost PP data
types to variadic macro data. These are:
-# VMD_PP_TUPLE_TO_DATA(tuple), which converts from a Boost PP tuple.
-# VMD_PP_ARRAY_TO_DATA(array), which converts from a Boost PP array.
-# VMD_PP_LIST_TO_DATA(list), which converts from a Boost PP list.
-# VMD_PP_SEQ_TO_DATA(seq), which converts from a Boost PP sequence.
+# [macroref VMD_PP_TUPLE_TO_DATA](tuple), which converts from a Boost PP tuple.
+# [macroref VMD_PP_ARRAY_TO_DATA](array), which converts from a Boost PP array.
+# [macroref VMD_PP_LIST_TO_DATA](list), which converts from a Boost PP list.
+# [macroref VMD_PP_SEQ_TO_DATA](seq), which converts from a Boost PP sequence.
In these macros the data is returned as a comma-separated list of
tokens, which is the format of variadic macro data. The results of
@@ -67,20 +67,20 @@
final five are direct replacements for Boost PP tuple data manipulation
macros and which do not require the size of the tuple. These are:
-# VMD_PP_TUPLE_SIZE(tuple), which returns the size of the tuple.
-# VMD_PP_TUPLE_ELEM(tuple), which is a replacement for
+# [macroref VMD_PP_TUPLE_SIZE](tuple), which returns the size of the tuple.
+# [macroref VMD_PP_TUPLE_ELEM](tuple), which is a replacement for
BOOST_PP_TUPLE_ELEM without having to pass the size of the
tuple as the first parameter.
-# VMD_PP_TUPLE_REM_CTOR(tuple), which is a replacement for
+# [macroref VMD_PP_TUPLE_REM_CTOR](tuple), which is a replacement for
BOOST_PP_TUPLE_REM_CTOR without having to pass the size of the
tuple as the first parameter.
-# VMD_PP_TUPLE_REVERSE(tuple), which is a replacement for
- BOOST_PP_TUPLE_REVERSE without having to pass the size of the
+# [macroref VMD_PP_TUPLE_REVERSE](tuple), which is a replacement for
+ macroref BOOST_PP_TUPLE_REVERSE without having to pass the size of the
tuple as the first parameter.
-# VMD_PP_TUPLE_TO_LIST(tuple), which is a replacement for
+# [macroref VMD_PP_TUPLE_TO_LIST](tuple), which is a replacement for
BOOST_PP_TUPLE_TO_LIST without having to pass the size of the
tuple as the first parameter.
-# VMD_PP_TUPLE_TO_SEQ(tuple), which is a replacement for
+# [macroref VMD_PP_TUPLE_TO_SEQ](tuple), which is a replacement for
BOOST_PP_TUPLE_TO_SEQ without having to pass the size of the
tuple as the first parameter.
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDIntroduction.qbk
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDIntroduction.qbk (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/VMDIntroduction.qbk 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -22,5 +22,5 @@
library are in a single header, whose name is 'VariadicMacroData.hpp'.
The library is dependent on Boost PP.
-
+
[endsect]
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_ELEM.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_ELEM.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_ELEM.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_DATA_ELEM(n, ...)</pre></div>
<div class="refsect1">
-<a name="id934859"></a><h2>Description</h2>
+<a name="id938660"></a><h2>Description</h2>
<p>n = number of the variadic macro data argument. The number starts from 0 to the number of variadic macro data arguments - 1. The maximum number for n is 63.</p>
<p>... = variadic macro data.</p>
<p>returns = the particular macro data argument as specified by n. The argument returned can be any valid preprocessing token. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_SIZE.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_SIZE.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_SIZE.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_DATA_SIZE(...)</pre></div>
<div class="refsect1">
-<a name="id928142"></a><h2>Description</h2>
+<a name="id938621"></a><h2>Description</h2>
<p>... = variadic macro data.</p>
<p>returns = the number of comma-separated variadic macro data arguments being passed to it.</p>
<p>The value returned can be between 1 and 64. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_ARRAY.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_ARRAY.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_ARRAY.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_DATA_TO_PP_ARRAY(...)</pre></div>
<div class="refsect1">
-<a name="id934936"></a><h2>Description</h2>
+<a name="id938736"></a><h2>Description</h2>
<p>... = variadic macro data.</p>
<p>returns = a Boost PP library array data type.</p>
<p>You can use the result of this macro whenever you need to pass a Boost PP library array as data to a Boost PP library macro. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_LIST.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_LIST.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_LIST.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_DATA_TO_PP_LIST(...)</pre></div>
<div class="refsect1">
-<a name="id934974"></a><h2>Description</h2>
+<a name="id938775"></a><h2>Description</h2>
<p>... = variadic macro data.</p>
<p>returns = a Boost PP library list data type.</p>
<p>You can use the result of this macro whenever you need to pass a Boost PP library list as data to a Boost PP library macro. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_SEQ.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_SEQ.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_SEQ.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_DATA_TO_PP_SEQ(...)</pre></div>
<div class="refsect1">
-<a name="id935012"></a><h2>Description</h2>
+<a name="id938813"></a><h2>Description</h2>
<p>... = variadic macro data.</p>
<p>returns = a Boost PP library sequence data type.</p>
<p>You can use the result of this macro whenever you need to pass a Boost PP library sequence as data to a Boost PP library macro. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_TUPLE.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_TUPLE.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_DATA_TO_PP_TUPLE.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_DATA_TO_PP_TUPLE(...)</pre></div>
<div class="refsect1">
-<a name="id934897"></a><h2>Description</h2>
+<a name="id938698"></a><h2>Description</h2>
<p>... = variadic macro data.</p>
<p>returns = a Boost PP library tuple data type.</p>
<p>You can use the result of this macro whenever you need to pass a Boost PP library tuple as data to a Boost PP library macro. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_ARRAY_TO_DATA.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_ARRAY_TO_DATA.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_ARRAY_TO_DATA.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_PP_ARRAY_TO_DATA(array)</pre></div>
<div class="refsect1">
-<a name="id935341"></a><h2>Description</h2>
+<a name="id939142"></a><h2>Description</h2>
<p>array = a Boost PP library array data type.</p>
<p>returns = variadic macro data whose arguments are the same as the elements of an array that is inputted.</p>
<p>The variadic macro data that is returned is in the form of of comma separated arguments. The variadic macro data can be passed to any macro which takes variadic macro data in the form of a final variadic macro data '...' macro parameter. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_LIST_TO_DATA.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_LIST_TO_DATA.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_LIST_TO_DATA.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_PP_LIST_TO_DATA(list)</pre></div>
<div class="refsect1">
-<a name="id935380"></a><h2>Description</h2>
+<a name="id939180"></a><h2>Description</h2>
<p>list = a Boost PP library list data type.</p>
<p>returns = variadic macro data whose arguments are the same as the elements of a list that is inputted.</p>
<p>The variadic macro data that is returned is in the form of of comma separated arguments. The variadic macro data can be passed to any macro which takes variadic macro data in the form of a final variadic macro data '...' macro parameter. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_SEQ_TO_DATA.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_SEQ_TO_DATA.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_SEQ_TO_DATA.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_PP_SEQ_TO_DATA(seq)</pre></div>
<div class="refsect1">
-<a name="id935418"></a><h2>Description</h2>
+<a name="id939219"></a><h2>Description</h2>
<p>seq = a Boost PP library sequence data type.</p>
<p>returns = variadic macro data whose arguments are the same as the elements of a sequence that is inputted.</p>
<p>The variadic macro data that is returned is in the form of of comma separated arguments. The variadic macro data can be passed to any macro which takes variadic macro data in the form of a final variadic macro data '...' macro parameter. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_ELEM.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_ELEM.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_ELEM.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_PP_TUPLE_ELEM(n, tuple)</pre></div>
<div class="refsect1">
-<a name="id935089"></a><h2>Description</h2>
+<a name="id938890"></a><h2>Description</h2>
<p>n = number of the tuple element. The number starts from 0 to the size of the tuple - 1.</p>
<p>tuple = a Boost PP library tuple data type.</p>
<p>returns = the particular tuple element as specified by n.</p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_REM_CTOR.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_REM_CTOR.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_REM_CTOR.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_PP_TUPLE_REM_CTOR(tuple)</pre></div>
<div class="refsect1">
-<a name="id935134"></a><h2>Description</h2>
+<a name="id938934"></a><h2>Description</h2>
<p>tuple = a Boost PP library tuple data type.</p>
<p>returns = a series of comma-separated tokens equivalent to removing the parentheses from a tuple.</p>
<p>This result is actually equivalent to the form of variadic macro data and can be used as an alternative to VMD_PP_TUPLE_TO_DATA to convert the tuple to variadic macro data.</p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_REVERSE.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_REVERSE.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_REVERSE.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_PP_TUPLE_REVERSE(tuple)</pre></div>
<div class="refsect1">
-<a name="id935178"></a><h2>Description</h2>
+<a name="id938979"></a><h2>Description</h2>
<p>tuple = a Boost PP library tuple data type.</p>
<p>returns = a tuple whose elements are in reversed order from the original tuple.</p>
<p>In the Boost PP library there is no way to calculate the size of a tuple, so that the size must be known in order to be used by Boost PP library tuple macros. With variadic macros the size of a tuple can be calculated from the tuple itself.</p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_SIZE.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_SIZE.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_SIZE.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_PP_TUPLE_SIZE(tuple)</pre></div>
<div class="refsect1">
-<a name="id935051"></a><h2>Description</h2>
+<a name="id938852"></a><h2>Description</h2>
<p>tuple = a Boost PP library tuple data type.</p>
<p>returns = the number of elements in the tuple, commonly referred to as the tuple size.</p>
<p>In the Boost PP library there is no way to calculate the size of a tuple, so that the size must be known in order to be used by Boost PP library tuple macros. With variadic macros the size of a tuple can be calculated from the tuple itself. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_DATA.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_DATA.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_DATA.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_PP_TUPLE_TO_DATA(tuple)</pre></div>
<div class="refsect1">
-<a name="id935303"></a><h2>Description</h2>
+<a name="id939104"></a><h2>Description</h2>
<p>tuple = a Boost PP library tuple data type.</p>
<p>returns = variadic macro data whose arguments are the same as the elements of a tuple that is inputted.</p>
<p>The variadic macro data that is returned is in the form of of comma separated arguments. The variadic macro data can be passed to any macro which takes variadic macro data in the form of a final variadic macro data '...' macro parameter. </p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_LIST.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_LIST.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_LIST.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_PP_TUPLE_TO_LIST(tuple)</pre></div>
<div class="refsect1">
-<a name="id935220"></a><h2>Description</h2>
+<a name="id939021"></a><h2>Description</h2>
<p>tuple = a Boost PP library tuple data type.</p>
<p>returns = a list whose elements are the same as the tuple that is inputted.</p>
<p>In the Boost PP library there is no way to calculate the size of a tuple, so that the size must be known in order to be used by Boost PP library tuple macros. With variadic macros the size of a tuple can be calculated from the tuple itself.</p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_SEQ.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_SEQ.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/VMD_PP_TUPLE_TO_SEQ.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,7 +33,7 @@
</span>VMD_PP_TUPLE_TO_SEQ(tuple)</pre></div>
<div class="refsect1">
-<a name="id935262"></a><h2>Description</h2>
+<a name="id939063"></a><h2>Description</h2>
<p>tuple = a Boost PP library tuple data type.</p>
<p>returns = a sequence whose elements are the same as the tuple that is inputted.</p>
<p>In the Boost PP library there is no way to calculate the size of a tuple, so that the size must be known in order to be used by Boost PP library tuple macros. With variadic macros the size of a tuple can be calculated from the tuple itself.</p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/index.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/index.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/index.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -55,6 +55,8 @@
</dl></dd>
<dt><span class="section"><a href="the_variadic_macro_data_library/vmd_comparison.html">VMD and
Boost PP</a></span></dt>
+<dd><dl><dt><span class="section"><a href="the_variadic_macro_data_library/vmd_comparison.html#the_variadic_macro_data_library.vmd_comparison.vmd_comp_example">Use-case
+ example</a></span></dt></dl></dd>
<dt><span class="section">Design</span></dt>
<dt><span class="section">Compilers</span></dt>
<dt><span class="section">Limitations</span></dt>
@@ -100,7 +102,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: October 15, 2010 at 16:45:53 GMT</small></p></td>
+<td align="left"><p><small>Last revised: October 15, 2010 at 23:10:12 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_comparison.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_comparison.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_comparison.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -27,6 +27,8 @@
<a name="the_variadic_macro_data_library.vmd_comparison"></a><a class="link" href="vmd_comparison.html" title="VMD and Boost PP">VMD and
Boost PP</a>
</h2></div></div></div>
+<div class="toc"><dl><dt><span class="section"><a href="vmd_comparison.html#the_variadic_macro_data_library.vmd_comparison.vmd_comp_example">Use-case
+ example</a></span></dt></dl></div>
<p>
Boost PP already has the ability to pass variadic data as a single macro argument
through any of its data types. It may then be reasonably asked why there is
@@ -77,6 +79,67 @@
to do just that with its macros which convert from variadic macro data to Boost
PP data types.
</p>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="the_variadic_macro_data_library.vmd_comparison.vmd_comp_example"></a><a class="link" href="vmd_comparison.html#the_variadic_macro_data_library.vmd_comparison.vmd_comp_example" title="Use-case example">Use-case
+ example</a>
+</h3></div></div></div>
+<p>
+ A typical situation is designing a macro for end-users which takes variadic
+ data as its argument. Let's call this macro, just as an example, ENDUSER_MACRO.
+ </p>
+<p>
+ Without variadic macro support, but in keeping with Boost PP, the best way
+ of designing this macro is probably to use a Boost PP sequence. Our design
+ of the macro might look like this:
+ </p>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">ENDUSER_MACRO</span><span class="special">(</span><span class="identifier">ppSequence</span><span class="special">)</span> <span class="identifier">ENDUSER_DETAIL_MACRO</span><span class="special">(</span><span class="identifier">ppSequence</span><span class="special">)</span>
+</pre>
+<p>
+ The reason for calling another macro which does the actual work of expansion
+ will be explained below when discussing how to design this macro using VMD.
+ </p>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">ENDUSER_DETAIL_MACRO</span><span class="special">(</span><span class="identifier">ppSequence</span><span class="special">)</span> <span class="special">\</span>
+<span class="comment">/* expansion which manipulates the data
+ using the Boost PP facilities for a sequence.
+ In Boost PP one can find out the size of the
+ sequence, extract any token from the sequence,
+ and much more...
+*/</span>
+</pre>
+<p>
+ The end-user would pass data to this macro in this way:
+ </p>
+<pre class="programlisting"><span class="identifier">ENDUSER_MACRO</span><span class="special">((</span><span class="identifier">a</span><span class="special">)(</span><span class="identifier">b</span><span class="special">)(</span><span class="identifier">c</span><span class="special">)(</span><span class="identifier">d</span><span class="special">)(</span><span class="identifier">e</span><span class="special">))</span> <span class="comment">// etc. with each "token" in the sequence surrounded by ()
+</span></pre>
+<p>
+ That is certainly acceptable, and without variadic macros, it is certainly
+ excellent to have the Boost PP functionality that allows us to design macros
+ taking variadic macro and manipulate that data using the functionality of
+ Boost PP.
+ </p>
+<p>
+ With variadic macro support and VMD, but wishing to use our variadic data
+ in exactly the same way as above, we could design our macro like this:
+ </p>
+<pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">ENDUSER_MACRO</span><span class="special">(...)</span> <span class="identifier">ENDUSER_DETAIL_MACRO</span><span class="special">(</span><span class="identifier">VMD_DATA_TO_PP_SEQ</span><span class="special">(</span><span class="identifier">__VA_ARGS__</span><span class="special">))</span>
+</pre>
+<p>
+ Here we again call the macro which does the actual work. This is the reason
+ why I designed my version of the macro without variadic macro support in
+ the way that I did.
+ </p>
+<p>
+ The end-user would pass data to this macro in this way:
+ </p>
+<pre class="programlisting"><span class="identifier">ENDUSER_MACRO</span><span class="special">(</span><span class="identifier">a</span><span class="special">,</span><span class="identifier">b</span><span class="special">,</span><span class="identifier">c</span><span class="special">,</span><span class="identifier">d</span><span class="special">,</span><span class="identifier">e</span><span class="special">)</span>
+</pre>
+<p>
+ I think this last way of passing variadic data is more natural to an end-user
+ than using a Boost PP sequence directly, but of course it depends on compiler
+ variadic macro support.
+ </p>
+</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -74,12 +74,14 @@
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
- VMD_DATA_SIZE(...), which returns the number of comma-separated tokens.
+ <code class="computeroutput"><a class="link" href="../VMD_DATA_SIZE.html" title="Macro VMD_DATA_SIZE">VMD_DATA_SIZE</a></code>(...), which
+ returns the number of comma-separated tokens.
</li>
<li class="listitem">
- VMD_DATA_ELEM(n,...), which returns a particular token among the comma-separated
- sequence. Here 'n' stands for the number of the token, starting with
- 0, which is returned from the variadic macro data.
+ <code class="computeroutput"><a class="link" href="../VMD_DATA_ELEM.html" title="Macro VMD_DATA_ELEM">VMD_DATA_ELEM</a></code>(n,...), which
+ returns a particular token among the comma-separated sequence. Here 'n'
+ stands for the number of the token, starting with 0, which is returned
+ from the variadic macro data.
</li>
</ol></div>
</div>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_fromPP.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_fromPP.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_fromPP.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,16 +33,20 @@
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
- VMD_PP_TUPLE_TO_DATA(tuple), which converts from a Boost PP tuple.
+ <code class="computeroutput"><a class="link" href="../../VMD_PP_TUPLE_TO_DATA.html" title="Macro VMD_PP_TUPLE_TO_DATA">VMD_PP_TUPLE_TO_DATA</a></code>(tuple),
+ which converts from a Boost PP tuple.
</li>
<li class="listitem">
- VMD_PP_ARRAY_TO_DATA(array), which converts from a Boost PP array.
+ <code class="computeroutput"><a class="link" href="../../VMD_PP_ARRAY_TO_DATA.html" title="Macro VMD_PP_ARRAY_TO_DATA">VMD_PP_ARRAY_TO_DATA</a></code>(array),
+ which converts from a Boost PP array.
</li>
<li class="listitem">
- VMD_PP_LIST_TO_DATA(list), which converts from a Boost PP list.
+ <code class="computeroutput"><a class="link" href="../../VMD_PP_LIST_TO_DATA.html" title="Macro VMD_PP_LIST_TO_DATA">VMD_PP_LIST_TO_DATA</a></code>(list),
+ which converts from a Boost PP list.
</li>
<li class="listitem">
- VMD_PP_SEQ_TO_DATA(seq), which converts from a Boost PP sequence.
+ <code class="computeroutput"><a class="link" href="../../VMD_PP_SEQ_TO_DATA.html" title="Macro VMD_PP_SEQ_TO_DATA">VMD_PP_SEQ_TO_DATA</a></code>(seq),
+ which converts from a Boost PP sequence.
</li>
</ol></div>
<p>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_toPP.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_toPP.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_toPP.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -33,16 +33,20 @@
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
- VMD_DATA_TO_PP_TUPLE(...), which converts to a Boost PP tuple.
+ <code class="computeroutput"><a class="link" href="../../VMD_DATA_TO_PP_TUPLE.html" title="Macro VMD_DATA_TO_PP_TUPLE">VMD_DATA_TO_PP_TUPLE</a></code>(...),
+ which converts to a Boost PP tuple.
</li>
<li class="listitem">
- VMD_DATA_TO_PP_ARRAY(...), which converts to a Boost PP array.
+ <code class="computeroutput"><a class="link" href="../../VMD_DATA_TO_PP_ARRAY.html" title="Macro VMD_DATA_TO_PP_ARRAY">VMD_DATA_TO_PP_ARRAY</a></code>(...),
+ which converts to a Boost PP array.
</li>
<li class="listitem">
- VMD_DATA_TO_PP_LIST(...), which converts to a Boost PP list.
+ <code class="computeroutput"><a class="link" href="../../VMD_DATA_TO_PP_LIST.html" title="Macro VMD_DATA_TO_PP_LIST">VMD_DATA_TO_PP_LIST</a></code>(...),
+ which converts to a Boost PP list.
</li>
<li class="listitem">
- VMD_DATA_TO_PP_SEQ(...), which converts to a Boost PP sequence.
+ <code class="computeroutput"><a class="link" href="../../VMD_DATA_TO_PP_SEQ.html" title="Macro VMD_DATA_TO_PP_SEQ">VMD_DATA_TO_PP_SEQ</a></code>(...),
+ which converts to a Boost PP sequence.
</li>
</ol></div>
</div>
Modified: sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_tuple.html
==============================================================================
--- sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_tuple.html (original)
+++ sandbox/variadic_macro_data/libs/variadic_macro_data/doc/html/the_variadic_macro_data_library/vmd_detail/vmd_tuple.html 2010-10-15 19:11:53 EDT (Fri, 15 Oct 2010)
@@ -35,27 +35,33 @@
</p>
<div class="orderedlist"><ol class="orderedlist" type="1">
<li class="listitem">
- VMD_PP_TUPLE_SIZE(tuple), which returns the size of the tuple.
+ <code class="computeroutput"><a class="link" href="../../VMD_PP_TUPLE_SIZE.html" title="Macro VMD_PP_TUPLE_SIZE">VMD_PP_TUPLE_SIZE</a></code>(tuple),
+ which returns the size of the tuple.
</li>
<li class="listitem">
- VMD_PP_TUPLE_ELEM(tuple), which is a replacement for BOOST_PP_TUPLE_ELEM
- without having to pass the size of the tuple as the first parameter.
+ <code class="computeroutput"><a class="link" href="../../VMD_PP_TUPLE_ELEM.html" title="Macro VMD_PP_TUPLE_ELEM">VMD_PP_TUPLE_ELEM</a></code>(tuple),
+ which is a replacement for BOOST_PP_TUPLE_ELEM without having to pass
+ the size of the tuple as the first parameter.
</li>
<li class="listitem">
- VMD_PP_TUPLE_REM_CTOR(tuple), which is a replacement for BOOST_PP_TUPLE_REM_CTOR
- without having to pass the size of the tuple as the first parameter.
+ <code class="computeroutput"><a class="link" href="../../VMD_PP_TUPLE_REM_CTOR.html" title="Macro VMD_PP_TUPLE_REM_CTOR">VMD_PP_TUPLE_REM_CTOR</a></code>(tuple),
+ which is a replacement for BOOST_PP_TUPLE_REM_CTOR without having to
+ pass the size of the tuple as the first parameter.
</li>
<li class="listitem">
- VMD_PP_TUPLE_REVERSE(tuple), which is a replacement for BOOST_PP_TUPLE_REVERSE
- without having to pass the size of the tuple as the first parameter.
+ <code class="computeroutput"><a class="link" href="../../VMD_PP_TUPLE_REVERSE.html" title="Macro VMD_PP_TUPLE_REVERSE">VMD_PP_TUPLE_REVERSE</a></code>(tuple),
+ which is a replacement for macroref BOOST_PP_TUPLE_REVERSE without having
+ to pass the size of the tuple as the first parameter.
</li>
<li class="listitem">
- VMD_PP_TUPLE_TO_LIST(tuple), which is a replacement for BOOST_PP_TUPLE_TO_LIST
- without having to pass the size of the tuple as the first parameter.
+ <code class="computeroutput"><a class="link" href="../../VMD_PP_TUPLE_TO_LIST.html" title="Macro VMD_PP_TUPLE_TO_LIST">VMD_PP_TUPLE_TO_LIST</a></code>(tuple),
+ which is a replacement for BOOST_PP_TUPLE_TO_LIST without having to pass
+ the size of the tuple as the first parameter.
</li>
<li class="listitem">
- VMD_PP_TUPLE_TO_SEQ(tuple), which is a replacement for BOOST_PP_TUPLE_TO_SEQ
- without having to pass the size of the tuple as the first parameter.
+ <code class="computeroutput"><a class="link" href="../../VMD_PP_TUPLE_TO_SEQ.html" title="Macro VMD_PP_TUPLE_TO_SEQ">VMD_PP_TUPLE_TO_SEQ</a></code>(tuple),
+ which is a replacement for BOOST_PP_TUPLE_TO_SEQ without having to pass
+ the size of the tuple as the first parameter.
</li>
</ol></div>
</div>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk