blob: 918b66d74640b5d4db69a8cf23b752ec1c108559 [file] [log] [blame]
[/==============================================================================
Copyright (C) 2001-2010 Joel de Guzman
Copyright (C) 2001-2005 Dan Marsden
Copyright (C) 2001-2010 Thomas Heller
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
===============================================================================/]
[section Organization]
Care and attention to detail was given, painstakingly, to the design and
implementation of Phoenix.
The library is organized in four layers:
# Actor
# Value, Reference, Arguments
# Function, Operator, Object, Statement, Scope
# STL, Fusion, Bind
[/$images/organization.png]
The modules are orthogonal, with no cyclic dependencies.
Lower layers do not depend on higher layers. Modules in a layer do not depend on other modules in the same layer.
This means, for example, that Bind can be completely discarded if it is
not required; or one could perhaps take out Operator and Statement and just use Function,
which may be desirable in a pure FP application.
The library has grown from the original Phoenix but still comprises only
header files. There are no object files to link against.
[h2 Core]
The lowest two layers comprise the core.
The [link phoenix.actor `Actor`] is the main concept behind the library. Lazy functions are
abstracted as actors.
Terminals provide the basic building blocks of functionality within Phoenix.
Expressions are used to combine these terminals together to provide more
powerful functionality.
Expressions are composed of zero or more actors. Each actor in a composite can
again be another expression.
[table Modules
[[Module] [Description]]
[[Function] [Lazy functions support (e.g. `add`)]]
[[Operator] [Lazy operators support (e.g. `+`)]]
[[Statement] [Lazy statements (e.g. `if_`, `while_`)]]
[[Object] [Lazy casts (e.g. `static_cast_`),
object creation destruction (e.g.
`new_`, `delete_`)]]
[[Scope] [Support for scopes, local variables and lambda-lambda]]
[[Bind] [Lazy functions from free functions, member functions or member variables.]]
[[STL Container] [Set of predefined "lazy" functions that work on STL
containers and sequences (e.g. `push_back`).]]
[[STL Algorithm] [Set of predefined "lazy" versions of the STL algorithms
(e.g. `find_if`).]]
]
Each module is defined in a header file with the same name. For example,
the core module is defined in `<boost/phoenix/core.hpp>`.
[table Includes
[[Module] [File]]
[[Core] [`#include <boost/phoenix/core.hpp>`]]
[[Function] [`#include <boost/phoenix/function.hpp>`]]
[[Operator] [`#include <boost/phoenix/operator.hpp>`]]
[[Statement] [`#include <boost/phoenix/statement.hpp>`]]
[[Object] [`#include <boost/phoenix/object.hpp>`]]
[[Scope] [`#include <boost/phoenix/scope.hpp>`]]
[[Bind] [`#include <boost/phoenix/bind.hpp>`]]
[[Container] [`#include <boost/phoenix/stl/container.hpp>`]]
[[Algorithm] [`#include <boost/phoenix/stl/algorithm.hpp>`]]
]
[blurb __tip__ Finer grained include files are available per feature; see the
succeeding sections.]
[endsect]