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