vmd_modifiers_single.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Modifiers and the single-element sequence</title>
  5. <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
  7. <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;The Variadic Macro Data Library 1.9">
  8. <link rel="up" href="../vmd_modifiers.html" title="Macros with modifiers">
  9. <link rel="prev" href="vmd_modifiers_index.html" title="Index modifiers">
  10. <link rel="next" href="../vmd_identifier_subtype.html" title="Identifier subtypes">
  11. </head>
  12. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  13. <table cellpadding="2" width="100%"><tr>
  14. <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
  15. <td align="center"><a href="../../../../../../index.html">Home</a></td>
  16. <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
  17. <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
  18. <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
  19. <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
  20. </tr></table>
  21. <hr>
  22. <div class="spirit-nav">
  23. <a accesskey="p" href="vmd_modifiers_index.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../vmd_modifiers.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../vmd_identifier_subtype.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  24. </div>
  25. <div class="section">
  26. <div class="titlepage"><div><div><h3 class="title">
  27. <a name="variadic_macro_data.vmd_modifiers.vmd_modifiers_single"></a><a class="link" href="vmd_modifiers_single.html" title="Modifiers and the single-element sequence">Modifiers
  28. and the single-element sequence</a>
  29. </h3></div></div></div>
  30. <p>
  31. A single element sequence is what we normally think of when working with
  32. macro data. It is a single type of macro data passed as an input parameter
  33. to some macro and processed as such.
  34. </p>
  35. <p>
  36. In its basic form without modifiers BOOST_VMD_ELEM serves to just return
  37. a particular element of a sequence. For a single element sequence BOOST_VMD_ELEM
  38. with element number 0, just returns the single-element sequence itself. This
  39. does not offer much functionality for our simple sequence. However with modifiers
  40. we can do things generically with our single-element sequence which correspond
  41. to working with a single type of data and extracting information about it.
  42. </p>
  43. <p>
  44. With the return type modifier we can get the type of the data along with
  45. the data. Of course we can also use BOOST_VMD_GET_TYPE to retrieve just the
  46. type of data.
  47. </p>
  48. <p>
  49. With our filter modifier we can retrieve the data only if it is a particular
  50. type, else retrieve emptiness.
  51. </p>
  52. <p>
  53. With the identifier modifier we can retrieve an identifier only if it matches
  54. one or more other identifiers, else retrieve emptiness.
  55. </p>
  56. <p>
  57. With our index modifier we can retrieve both our identifier and its numeric
  58. index if it matches one or more other identifiers, else retrieve a tuple
  59. of two empty elements if no match is found.
  60. </p>
  61. </div>
  62. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  63. <td align="left"></td>
  64. <td align="right"><div class="copyright-footer">Copyright &#169; 2010-2017 Tropic Software
  65. East Inc</div></td>
  66. </tr></table>
  67. <hr>
  68. <div class="spirit-nav">
  69. <a accesskey="p" href="vmd_modifiers_index.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../vmd_modifiers.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../vmd_identifier_subtype.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  70. </div>
  71. </body>
  72. </html>