organisation.qbk 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. [/==============================================================================
  2. Copyright (C) 2001-2010 Joel de Guzman
  3. Copyright (C) 2001-2005 Dan Marsden
  4. Copyright (C) 2001-2010 Thomas Heller
  5. Distributed under the Boost Software License, Version 1.0. (See accompanying
  6. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  7. ===============================================================================/]
  8. [section Organization]
  9. Care and attention to detail was given, painstakingly, to the design and
  10. implementation of Phoenix.
  11. The library is organized in four layers:
  12. # Actor
  13. # Value, Reference, Arguments
  14. # Function, Operator, Object, Statement, Scope
  15. # STL, Fusion, Bind
  16. [/$images/organization.png]
  17. The modules are orthogonal, with no cyclic dependencies.
  18. Lower layers do not depend on higher layers. Modules in a layer do not depend on other modules in the same layer.
  19. This means, for example, that Bind can be completely discarded if it is
  20. not required; or one could perhaps take out Operator and Statement and just use Function,
  21. which may be desirable in a pure FP application.
  22. The library has grown from the original Phoenix but still comprises only
  23. header files. There are no object files to link against.
  24. [h2 Core]
  25. The lowest two layers comprise the core.
  26. The [link phoenix.actor `Actor`] is the main concept behind the library. Lazy functions are
  27. abstracted as actors.
  28. Terminals provide the basic building blocks of functionality within Phoenix.
  29. Expressions are used to combine these terminals together to provide more
  30. powerful functionality.
  31. Expressions are composed of zero or more actors. Each actor in a composite can
  32. again be another expression.
  33. [table Modules
  34. [[Module] [Description]]
  35. [[Function] [Lazy functions support (e.g. `add`)]]
  36. [[Operator] [Lazy operators support (e.g. `+`)]]
  37. [[Statement] [Lazy statements (e.g. `if_`, `while_`)]]
  38. [[Object] [Lazy casts (e.g. `static_cast_`),
  39. object creation destruction (e.g.
  40. `new_`, `delete_`)]]
  41. [[Scope] [Support for scopes, local variables and lambda-lambda]]
  42. [[Bind] [Lazy functions from free functions, member functions or member variables.]]
  43. [[STL Container] [Set of predefined "lazy" functions that work on STL
  44. containers and sequences (e.g. `push_back`).]]
  45. [[STL Algorithm] [Set of predefined "lazy" versions of the STL algorithms
  46. (e.g. `find_if`).]]
  47. ]
  48. Each module is defined in a header file with the same name. For example,
  49. the core module is defined in `<boost/phoenix/core.hpp>`.
  50. [table Includes
  51. [[Module] [File]]
  52. [[Core] [`#include <boost/phoenix/core.hpp>`]]
  53. [[Function] [`#include <boost/phoenix/function.hpp>`]]
  54. [[Operator] [`#include <boost/phoenix/operator.hpp>`]]
  55. [[Statement] [`#include <boost/phoenix/statement.hpp>`]]
  56. [[Object] [`#include <boost/phoenix/object.hpp>`]]
  57. [[Scope] [`#include <boost/phoenix/scope.hpp>`]]
  58. [[Bind] [`#include <boost/phoenix/bind.hpp>`]]
  59. [[Container] [`#include <boost/phoenix/stl/container.hpp>`]]
  60. [[Algorithm] [`#include <boost/phoenix/stl/algorithm.hpp>`]]
  61. ]
  62. [blurb __tip__ Finer grained include files are available per feature; see the
  63. succeeding sections.]
  64. [endsect]