structure.qbk 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. [/==============================================================================
  2. Copyright (C) 2001-2011 Joel de Guzman
  3. Copyright (C) 2001-2011 Hartmut Kaiser
  4. Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. ===============================================================================/]
  7. [section Structure]
  8. [section Include]
  9. Spirit is a header file only library. There are no libraries to link to.
  10. This section documents the structure of the Spirit headers.
  11. Spirit contains five sub-libraries plus a 'support' module where common
  12. support classes are placed:
  13. * Classic
  14. * Qi
  15. * Karma
  16. * Lex
  17. * Phoenix
  18. * Support
  19. The top Spirit directory is:
  20. BOOST_ROOT/boost/spirit
  21. Currently, the directory contains:
  22. [actor] [attribute] [core] [debug]
  23. [dynamic] [error_handling][home] [include]
  24. [iterator] [meta] [phoenix] [repository]
  25. [symbols] [tree] [utility]
  26. These include some old v1.8 directories that are now deprecated. These
  27. are: actor, attribute, core, debug, dynamic, error_handling, iterator,
  28. meta, phoenix, symbols, tree and utility. There is no guarantee that these
  29. directories will still be present in future versions of Spirit. We only
  30. keep them for backward compatibility. Please be warned.
  31. Each directory (except include, home, and repository) has a corresponding
  32. header file that contains forwarding includes of each relevant include file
  33. that the directory contains. For example, there exists a
  34. <boost/spirit/actor.hpp> header file which includes all the relevant files
  35. from the boost/spirit/actor directory.
  36. To distinguish between Spirit versions, you can inspect the version file:
  37. <boost/spirit/version.hpp>
  38. using the preprocessor define
  39. SPIRIT_VERSION
  40. It is a hex number where the first two digits determine the major version while
  41. the last two digits determine the minor version. For example:
  42. #define SPIRIT_VERSION 0x2010 // version 2.1
  43. The include directory at:
  44. BOOST_ROOT/boost/spirit/include
  45. is a special flat directory that contains all the Spirit headers. To
  46. accommodate the flat structure, the headers are prefixed with the
  47. sub-library name:
  48. * classic_
  49. * karma_
  50. * lex_
  51. * phoenix1_
  52. * phoenix_
  53. * qi_
  54. * support_
  55. For example, if you used to include <boost/spirit/actor.hpp>,
  56. which is now a deprecated header, you should instead include
  57. <boost/spirit/include/classic_actor.hpp>
  58. If you want to simply include the main sub-library name, then you can
  59. include:
  60. * <boost/spirit/include/classic.hpp>
  61. * <boost/spirit/include/karma.hpp>
  62. * <boost/spirit/include/lex.hpp>
  63. * <boost/spirit/include/phoenix1.hpp>
  64. * <boost/spirit/include/phoenix.hpp>
  65. * <boost/spirit/include/qi.hpp>
  66. * <boost/spirit/include/support.hpp>
  67. The home directory:
  68. BOOST_ROOT/boost/spirit/home
  69. is the /real/ home of Spirit. It is the place where the various sub-libraries
  70. actually exist. The home directory contains:
  71. [classic] [karma] [lex]
  72. [phoenix] [qi] [support]
  73. As usual, these directories have their corresponding include files:
  74. * <boost/spirit/home/classic.hpp>
  75. * <boost/spirit/home/karma.hpp>
  76. * <boost/spirit/home/lex.hpp>
  77. * <boost/spirit/home/phoenix.hpp>
  78. * <boost/spirit/home/qi.hpp>
  79. * <boost/spirit/home/support.hpp>
  80. The various sub-libraries include files can be found in each
  81. sub-directory containing the particular sub-library. The include
  82. structure of a sub-library is covered in its documentation. For
  83. consistency, each library follows the same scheme as above.
  84. To keep it simple, you should use the flat include directory at
  85. boost/spirit/include.
  86. For some additional information about the rationale you might want to have a
  87. look at the FAQ entry __include_structure_faq__.
  88. The subdirectory `boost/spirit/repository` does not belong to the main Spirit
  89. distribution. For more information please refer to:
  90. [link spirit.repository Spirit Repository].
  91. [endsect] [/Include]
  92. [endsect]