/Src/Dependencies/Boost/libs/spirit/doc/html/spirit/structure/include.html

http://hadesmem.googlecode.com/ · HTML · 230 lines · 230 code · 0 blank · 0 comment · 0 complexity · 5b29a9f4a3c570dfe333cc2e648b17e1 MD5 · raw file

  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Include</title>
  5. <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.75.0">
  7. <link rel="home" href="../../index.html" title="Spirit 2.5">
  8. <link rel="up" href="../structure.html" title="Structure">
  9. <link rel="prev" href="../structure.html" title="Structure">
  10. <link rel="next" href="../abstracts.html" title="Abstracts">
  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="../structure.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../structure.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="../abstracts.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="spirit.structure.include"></a><a class="link" href="include.html" title="Include">Include</a>
  28. </h3></div></div></div>
  29. <p>
  30. Spirit is a header file only library. There are no libraries to link to.
  31. This section documents the structure of the Spirit headers.
  32. </p>
  33. <p>
  34. Spirit contains five sub-libraries plus a 'support' module where common support
  35. classes are placed:
  36. </p>
  37. <div class="itemizedlist"><ul class="itemizedlist" type="disc">
  38. <li class="listitem">
  39. Classic
  40. </li>
  41. <li class="listitem">
  42. Qi
  43. </li>
  44. <li class="listitem">
  45. Karma
  46. </li>
  47. <li class="listitem">
  48. Lex
  49. </li>
  50. <li class="listitem">
  51. Phoenix
  52. </li>
  53. <li class="listitem">
  54. Support
  55. </li>
  56. </ul></div>
  57. <p>
  58. The top Spirit directory is:
  59. </p>
  60. <pre class="programlisting"><span class="identifier">BOOST_ROOT</span><span class="special">/</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span>
  61. </pre>
  62. <p>
  63. Currently, the directory contains:
  64. </p>
  65. <pre class="programlisting"><span class="special">[</span><span class="identifier">actor</span><span class="special">]</span> <span class="special">[</span><span class="identifier">attribute</span><span class="special">]</span> <span class="special">[</span><span class="identifier">core</span><span class="special">]</span> <span class="special">[</span><span class="identifier">debug</span><span class="special">]</span>
  66. <span class="special">[</span><span class="identifier">dynamic</span><span class="special">]</span> <span class="special">[</span><span class="identifier">error_handling</span><span class="special">][</span><span class="identifier">home</span><span class="special">]</span> <span class="special">[</span><span class="identifier">include</span><span class="special">]</span>
  67. <span class="special">[</span><span class="identifier">iterator</span><span class="special">]</span> <span class="special">[</span><span class="identifier">meta</span><span class="special">]</span> <span class="special">[</span><span class="identifier">phoenix</span><span class="special">]</span> <span class="special">[</span><span class="identifier">repository</span><span class="special">]</span>
  68. <span class="special">[</span><span class="identifier">symbols</span><span class="special">]</span> <span class="special">[</span><span class="identifier">tree</span><span class="special">]</span> <span class="special">[</span><span class="identifier">utility</span><span class="special">]</span>
  69. </pre>
  70. <p>
  71. These include some old v1.8 directories that are now deprecated. These are:
  72. actor, attribute, core, debug, dynamic, error_handling, iterator, meta, phoenix,
  73. symbols, tree and utility. There is no guarantee that these directories will
  74. still be present in future versions of Spirit. We only keep them for backward
  75. compatibility. Please be warned.
  76. </p>
  77. <p>
  78. Each directory (except include, home, and repository) has a corresponding
  79. header file that contains forwarding includes of each relevant include file
  80. that the directory contains. For example, there exists a &lt;boost/spirit/actor.hpp&gt;
  81. header file which includes all the relevant files from the boost/spirit/actor
  82. directory.
  83. </p>
  84. <p>
  85. To distinguish between Spirit versions, you can inspect the version file:
  86. </p>
  87. <pre class="programlisting"><span class="special">&lt;</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">version</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">&gt;</span>
  88. </pre>
  89. <p>
  90. using the preprocessor define
  91. </p>
  92. <pre class="programlisting"><span class="identifier">SPIRIT_VERSION</span>
  93. </pre>
  94. <p>
  95. It is a hex number where the first two digits determine the major version
  96. while the last two digits determine the minor version. For example:
  97. </p>
  98. <pre class="programlisting"><span class="preprocessor">#define</span> <span class="identifier">SPIRIT_VERSION</span> <span class="number">0x2010</span> <span class="comment">// version 2.1
  99. </span></pre>
  100. <p>
  101. The include directory at:
  102. </p>
  103. <pre class="programlisting"><span class="identifier">BOOST_ROOT</span><span class="special">/</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">include</span>
  104. </pre>
  105. <p>
  106. is a special flat directory that contains all the Spirit headers. To accommodate
  107. the flat structure, the headers are prefixed with the sub-library name:
  108. </p>
  109. <div class="itemizedlist"><ul class="itemizedlist" type="disc">
  110. <li class="listitem">
  111. classic_
  112. </li>
  113. <li class="listitem">
  114. karma_
  115. </li>
  116. <li class="listitem">
  117. lex_
  118. </li>
  119. <li class="listitem">
  120. phoenix1_
  121. </li>
  122. <li class="listitem">
  123. phoenix_
  124. </li>
  125. <li class="listitem">
  126. qi_
  127. </li>
  128. <li class="listitem">
  129. support_
  130. </li>
  131. </ul></div>
  132. <p>
  133. For example, if you used to include &lt;boost/spirit/actor.hpp&gt;, which
  134. is now a deprecated header, you should instead include &lt;boost/spirit/include/classic_actor.hpp&gt;
  135. </p>
  136. <p>
  137. If you want to simply include the main sub-library name, then you can include:
  138. </p>
  139. <div class="itemizedlist"><ul class="itemizedlist" type="disc">
  140. <li class="listitem">
  141. &lt;boost/spirit/include/classic.hpp&gt;
  142. </li>
  143. <li class="listitem">
  144. &lt;boost/spirit/include/karma.hpp&gt;
  145. </li>
  146. <li class="listitem">
  147. &lt;boost/spirit/include/lex.hpp&gt;
  148. </li>
  149. <li class="listitem">
  150. &lt;boost/spirit/include/phoenix1.hpp&gt;
  151. </li>
  152. <li class="listitem">
  153. &lt;boost/spirit/include/phoenix.hpp&gt;
  154. </li>
  155. <li class="listitem">
  156. &lt;boost/spirit/include/qi.hpp&gt;
  157. </li>
  158. <li class="listitem">
  159. &lt;boost/spirit/include/support.hpp&gt;
  160. </li>
  161. </ul></div>
  162. <p>
  163. The home directory:
  164. </p>
  165. <pre class="programlisting"><span class="identifier">BOOST_ROOT</span><span class="special">/</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">home</span>
  166. </pre>
  167. <p>
  168. is the <span class="emphasis"><em>real</em></span> home of Spirit. It is the place where the
  169. various sub-libraries actually exist. The home directory contains:
  170. </p>
  171. <pre class="programlisting"><span class="special">[</span><span class="identifier">classic</span><span class="special">]</span> <span class="special">[</span><span class="identifier">karma</span><span class="special">]</span> <span class="special">[</span><span class="identifier">lex</span><span class="special">]</span>
  172. <span class="special">[</span><span class="identifier">phoenix</span><span class="special">]</span> <span class="special">[</span><span class="identifier">qi</span><span class="special">]</span> <span class="special">[</span><span class="identifier">support</span><span class="special">]</span>
  173. </pre>
  174. <p>
  175. As usual, these directories have their corresponding include files:
  176. </p>
  177. <div class="itemizedlist"><ul class="itemizedlist" type="disc">
  178. <li class="listitem">
  179. &lt;boost/spirit/home/classic.hpp&gt;
  180. </li>
  181. <li class="listitem">
  182. &lt;boost/spirit/home/karma.hpp&gt;
  183. </li>
  184. <li class="listitem">
  185. &lt;boost/spirit/home/lex.hpp&gt;
  186. </li>
  187. <li class="listitem">
  188. &lt;boost/spirit/home/phoenix.hpp&gt;
  189. </li>
  190. <li class="listitem">
  191. &lt;boost/spirit/home/qi.hpp&gt;
  192. </li>
  193. <li class="listitem">
  194. &lt;boost/spirit/home/support.hpp&gt;
  195. </li>
  196. </ul></div>
  197. <p>
  198. The various sub-libraries include files can be found in each sub-directory
  199. containing the particular sub-library. The include structure of a sub-library
  200. is covered in its documentation. For consistency, each library follows the
  201. same scheme as above.
  202. </p>
  203. <p>
  204. To keep it simple, you should use the flat include directory at boost/spirit/include.
  205. </p>
  206. <p>
  207. For some additional information about the rationale you might want to have
  208. a look at the FAQ entry <a class="link" href="../faq.html#spirit.faq.i_m_very_confused_about_the_header_hell_in_my_boost_spirit_directory__what_s_all_this_about_">Header
  209. Hell</a>.
  210. </p>
  211. <p>
  212. The subdirectory <code class="computeroutput"><span class="identifier">boost</span><span class="special">/</span><span class="identifier">spirit</span><span class="special">/</span><span class="identifier">repository</span></code> does not belong to the main
  213. Spirit distribution. For more information please refer to: <a class="link" href="../repository.html" title="Spirit Repository">Spirit
  214. Repository</a>.
  215. </p>
  216. </div>
  217. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  218. <td align="left"></td>
  219. <td align="right"><div class="copyright-footer">Copyright &#169; 2001-2011 Joel de Guzman, Hartmut Kaiser<p>
  220. Distributed under the Boost Software License, Version 1.0. (See accompanying
  221. file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  222. </p>
  223. </div></td>
  224. </tr></table>
  225. <hr>
  226. <div class="spirit-nav">
  227. <a accesskey="p" href="../structure.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../structure.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="../abstracts.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
  228. </div>
  229. </body>
  230. </html>