2007-11-07 02:12:28 +00:00
|
|
|
[/==============================================================================
|
2011-10-10 10:05:49 +00:00
|
|
|
Copyright (C) 2001-2011 Joel de Guzman, Dan Marsden, Tobias Schwinger
|
2007-11-07 02:12:28 +00:00
|
|
|
|
|
|
|
Use, modification and distribution is subject to 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)
|
|
|
|
===============================================================================/]
|
2006-08-22 15:57:13 +00:00
|
|
|
[section Preface]
|
|
|
|
|
|
|
|
[:['["Algorithms + Data Structures = Programs.]]]
|
|
|
|
[:*--Niklaus Wirth*]
|
|
|
|
|
|
|
|
[heading Description]
|
|
|
|
|
2006-09-16 05:27:33 +00:00
|
|
|
Fusion is a library for working with heterogenous collections of data,
|
2006-08-22 15:57:13 +00:00
|
|
|
commonly referred to as tuples. A set of containers (vector, list, set and map)
|
|
|
|
is provided, along with views that provide a transformed presentation
|
|
|
|
of their underlying data. Collectively the containers and views are referred to
|
|
|
|
as sequences, and Fusion has a suite of algorithms that operate upon the
|
|
|
|
various sequence types, using an iterator concept that binds everything
|
|
|
|
together.
|
|
|
|
|
2007-11-07 02:12:28 +00:00
|
|
|
The architecture is modeled after __mpl__ which in turn is modeled after
|
|
|
|
__stl__. It is named "fusion" because the library is a "fusion" of compile
|
|
|
|
time metaprogramming with runtime programming.
|
2006-08-22 15:57:13 +00:00
|
|
|
|
|
|
|
[heading Motivation]
|
|
|
|
|
2007-11-07 02:12:28 +00:00
|
|
|
Tuples are powerful beasts. After having developed two significant projects
|
2006-08-22 15:57:13 +00:00
|
|
|
(__spirit__ and __phoenix__) that relied heavily metaprogramming, it
|
2007-11-07 02:12:28 +00:00
|
|
|
became apparent that tuples are a powerful means to simplify otherwise tricky
|
|
|
|
tasks; especially those that require a combination of metaprogramming and
|
|
|
|
manipulation of heterogenous data types with values. While __mpl__ is an
|
|
|
|
extremely powerful metaprogramming tool, __mpl__ focuses on type
|
|
|
|
manipulation only. Ultimately, you'll have to map these types to real
|
|
|
|
values to make them useful in the runtime world where all the real action
|
|
|
|
takes place.
|
|
|
|
|
|
|
|
As __spirit__ and __phoenix__ evolved, patterns and idioms related to tuple
|
|
|
|
manipulation emerged. Soon, it became clear that those patterns and idioms
|
|
|
|
were best assembled in a tuples algorithms library. __david_abrahams__
|
|
|
|
outlined such a scheme in 2002. At that time, it just so happened that
|
|
|
|
__spirit__ and __phoenix__ had an adhoc collection of tuple manipulation
|
2006-08-22 15:57:13 +00:00
|
|
|
and traversal routines. It was an instant /AHA!/ moment.
|
|
|
|
|
|
|
|
[heading How to use this manual]
|
|
|
|
|
2007-11-07 02:12:28 +00:00
|
|
|
Some icons are used to mark certain topics indicative of their relevance.
|
2006-08-22 15:57:13 +00:00
|
|
|
These icons precede some text to indicate:
|
|
|
|
|
|
|
|
[table Icons
|
|
|
|
[[Icon] [Name] [Meaning]]
|
|
|
|
[[__note__] [Note] [Information provided is auxiliary but will
|
|
|
|
give the reader a deeper insight into a specific
|
|
|
|
topic. May be skipped.]]
|
|
|
|
[[__alert__] [Alert] [Information provided is of utmost importance.]]
|
|
|
|
[[__caution__] [Caution] [A mild warning.]]
|
|
|
|
[[__tip__] [Tip] [A potentially useful and helpful piece of
|
|
|
|
information.]]
|
|
|
|
]
|
|
|
|
|
|
|
|
This documentation is automatically generated by Boost QuickBook documentation
|
|
|
|
tool. QuickBook can be found in the __boost_tools__.
|
|
|
|
|
|
|
|
[heading Support]
|
|
|
|
|
|
|
|
Please direct all questions to Spirit's mailing list. You can subscribe to the
|
|
|
|
__spirit_list__. The mailing list has a searchable archive. A search link to
|
|
|
|
this archive is provided in __spirit__'s home page. You may also read and post
|
|
|
|
messages to the mailing list through __spirit_general__ (thanks to __gmane__).
|
|
|
|
The news group mirrors the mailing list. Here is a link to the archives:
|
|
|
|
__mlist_archive__.
|
|
|
|
|
|
|
|
[endsect]
|
|
|
|
|