|
Boost-Commit : |
From: jmcintyre_at_[hidden]
Date: 2008-03-22 17:36:59
Author: jared
Date: 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
New Revision: 43797
URL: http://svn.boost.org/trac/boost/changeset/43797
Log:
New documentation for BoostCon. Still missing several parts.
Added:
sandbox/explore/libs/explore/doc/custom_containers.qbk (contents, props changed)
sandbox/explore/libs/explore/doc/custom_delimeters.qbk (contents, props changed)
sandbox/explore/libs/explore/doc/html/boost_explore/tutorial/
sandbox/explore/libs/explore/doc/html/boost_explore/tutorial/custom_containers.html (contents, props changed)
sandbox/explore/libs/explore/doc/html/boost_explore/tutorial/custom_delimeters.html (contents, props changed)
Text files modified:
sandbox/explore/libs/explore/doc/Jamfile.v2 | 6
sandbox/explore/libs/explore/doc/explore.qbk | 69 ++++++++----
sandbox/explore/libs/explore/doc/html/boost_explore/dependencies_platforms.html | 54 +++++----
sandbox/explore/libs/explore/doc/html/boost_explore/design.html | 42 ++++---
sandbox/explore/libs/explore/doc/html/boost_explore/tutorial.html | 186 +++++++++++++++++++++++++++------
sandbox/explore/libs/explore/doc/html/boostbook.css | 217 ++++++++++++++++++++++++++-------------
sandbox/explore/libs/explore/doc/html/index.html | 148 +++++++++++++++++++-------
sandbox/explore/libs/explore/doc/tutorial.qbk | 77 ++++++++++++-
8 files changed, 570 insertions(+), 229 deletions(-)
Modified: sandbox/explore/libs/explore/doc/Jamfile.v2
==============================================================================
--- sandbox/explore/libs/explore/doc/Jamfile.v2 (original)
+++ sandbox/explore/libs/explore/doc/Jamfile.v2 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -23,9 +23,9 @@
<xsl:param>chunk.section.depth=8
<xsl:param>chunk.first.sections=1
<xsl:param>toc.section.depth=2
- <xsl:param>toc.max.depth=1
- <xsl:param>generate.section.toc.level=1
- <xsl:param>generate.toc="\"chapter toc,title section toc,title\""
+ <xsl:param>toc.max.depth=2
+ <xsl:param>generate.section.toc.level=2
+ <xsl:param>generate.toc="chapter toc,title section toc,title"
;
Added: sandbox/explore/libs/explore/doc/custom_containers.qbk
==============================================================================
--- (empty file)
+++ sandbox/explore/libs/explore/doc/custom_containers.qbk 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -0,0 +1,14 @@
+[/
+ / Copyright (c) 2008 Jared McIntyre
+ /
+ / 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:custom_containers Custom Containers]
+
+You can use explore with your custom containers, or third party containers. However, explore needs a little help in understanding these classes.
+
+Eventually, it would be good to write something here explaining how you can do that. 8-)
+
+[endsect]
Added: sandbox/explore/libs/explore/doc/custom_delimeters.qbk
==============================================================================
--- (empty file)
+++ sandbox/explore/libs/explore/doc/custom_delimeters.qbk 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -0,0 +1,42 @@
+[/
+ / Copyright (c) 2008 Jared McIntyre
+ /
+ / 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:custom_delimeters Custom Delimiters]
+
+Explore provides the ability to change the strings used in the container streaming process through the use of several new stream manipulators.
+
+[table Explore Stream Manipulators
+ [[Manipulator] [Default][Description]]
+ [[start(char*)] ['\['] [Changes the string output at the beginning of a container.]]
+ [[end(char*)] ['\]'] [Changes the string output at the end of a container.]]
+ [[seperator(char*)] [', '] [Changes the string output in between elements.]]
+ [[assoc_start(char*)] [''] [Changes the string output at the front of an association.]]
+ [[assoc_end(char*)] [''] [Changes the string output at the end of an association.]]
+ [[assoc_seperator(char*)] [':'] [Changes the string output in between elements of an association.]]
+]
+
+For example, to change the beginning and end output of a container to be the greater and less than symbols, you would do the following.
+
+ std::vector<int> vi;
+ vvi.push_back(1);
+ vvi.push_back(2);
+ vvi.push_back(3);
+ std::cout << explore::start("<") << explore::end(">") << vi;
+
+prints
+
+ <1, 2, 3>
+
+[heading Delimeters by Level]
+
+finish this
+
+[heading Level Breaks]
+
+finish this
+
+[endsect]
Modified: sandbox/explore/libs/explore/doc/explore.qbk
==============================================================================
--- sandbox/explore/libs/explore/doc/explore.qbk (original)
+++ sandbox/explore/libs/explore/doc/explore.qbk 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -5,9 +5,9 @@
/ file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
/]
-[library Boost.Explore
+[library Boost.explore
[quickbook 1.4]
- [copyright 2007 Jeff Garland]
+ [copyright 2007 Jeff Garland, 2008 Jared McIntyre]
[purpose Library to output Collections]
[license
Distributed under the Boost Software License, Version 1.0.
@@ -16,48 +16,58 @@
]
[category template]
[category generic]
- [last-revision $Date: 2007/05/27 15:50:13 $]
+ [last-revision $Date: 2008/03/22 00:25:13 $]
]
+[include tutorial.qbk]
+[include dependencies_platforms.qbk]
+[include design.qbk]
[/=============================================================================]
-Boost.Explore is a cross-platform C++ library for printing of containers.
+Boost.explore is a cross-platform C++ library for printing of containers.
-[h2 Getting Started]
+[heading Getting Started]
Boost.explore is a library that provides for the output of data from containers
or ranges.
The following are some simple usage examples:
- //explore supports output for all stl container types
- std::vector<int> vi += {1,2,3}; //boost assign!
- std::cout << vi << std::endl; //prints [1, 2, 3]
- std::stringstream ss;
- print(vi, ss); //prints [1, 2, 3]
+ #include <boost/explore.hpp>
+
+ // simple vector example
+ std::vector<int> vi;
+ vvi.push_back(1);
+ vvi.push_back(2);
+ vvi.push_back(3);
+ std::cout << vi; // prints [1, 2, 3]
+
//lets do some containers in containers
std::vector<std::vector<int> > vvi;
vvi.push_back(vi);
vvi.push_back(vi);
- std::cout << vi << std::endl; //prints [[1, 2, 3], [1, 2, 3]]
+ std::cout << vi; // prints [[1, 2, 3], [1, 2, 3]]
+
+ // associative containers
std::map<std::string, int> si_map;
si_map["hello"] = 1;
si_map["world"] = 2;
- std::cout << si_map << std::endl; //prints [hello:1, world:2]
- std::list<date> dl; //date from boost::gregorian
+ std::cout << si_map; // prints [hello:1, world:2]
+
+ // containers of complex types
+ std::list<date> dl; // date from boost::gregorian
dl.push_back(date(2007, Jan, 1));
dl.push_back(date(2007, Jan, 3));
- //printing of user defined types uses the types operator<< if available
- std::cout << dl << std::endl; //prints [2007-Jan-1, 2007-Jan-3]
- //how about some boost container types:
+ std::cout << dl; // prints [2007-Jan-1, 2007-Jan-3]
+
+ // how about some boost container types:
boost::array<std::string, 2> sa2;
sa2[0] = "one";
sa2[1] = "two";
+ std::cout << sa2; // prints [one, two]
-
-
The [link boost_explore.tutorial tutorial] shows more details on using explore.
While explore is powerful and flexible, it is not infinitely flexible.
@@ -65,18 +75,31 @@
section.For very complex output custom methods or a template output system should
be considered.
-[include tutorial.qbk]
-[include dependencies_platforms.qbk]
-[include design.qbk]
+[heading Supported Containers]
+
+* C style array
+* std::deque
+* std::list
+* std::map
+* std::multimap
+* std::pair
+* std::set
+* std::multiset
+* std::vector
+* boost::array
+* boost::range
+* boost::tuple
+[link boost_explore.tutorial.custom_containers Custom containers] can also be made to work with explore.
-[h2 Acknowledgements]
+[heading Acknowledgements]
Most of the major concepts and interfaces for this library were developed
at BoostCon 2007. There were many participants in the 8:00 am sessions
that developed the interfaces and concepts. Notably Hartmut Kaiser,
Joao ???, and Joel De Guzman for discussing Karma and doing some initial
-prototypes.
+prototypes. Development was done by Jeffrey Faust, Danny Havenith, and
+Jared McIntyre with the help of Jeff Garland, who also lead the sessions.
[/these sections t.b.d.]
[/include requirements.qbk]
Modified: sandbox/explore/libs/explore/doc/html/boost_explore/dependencies_platforms.html
==============================================================================
--- sandbox/explore/libs/explore/doc/html/boost_explore/dependencies_platforms.html (original)
+++ sandbox/explore/libs/explore/doc/html/boost_explore/dependencies_platforms.html 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -1,34 +1,35 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Dependencies and Platforms</title>
+<title>Dependencies and Platforms</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="../index.html" title="Boost.Explore">
-<link rel="up" href="../index.html" title="Boost.Explore">
-<link rel="prev" href="tutorial.html" title=" Tutorial">
-<link rel="next" href="design.html" title=" Design Notes">
+<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<link rel="start" href="../index.html" title="Boost.explore">
+<link rel="up" href="../index.html" title="Boost.explore">
+<link rel="prev" href="tutorial/custom_containers.html" title="Custom Containers">
+<link rel="next" href="design.html" title="Design Notes">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
-<td align="center">Home</td>
+<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
-</table>
+</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="tutorial.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="design.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="tutorial/custom_containers.html"><img src="../../../../../doc/html/images/%20prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/%20up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/%20home.png" alt="Home"></a><a accesskey="n" href="design.html"><img src="../../../../../doc/html/images/%20next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_explore.dependencies_platforms"></a> Dependencies and Platforms</h2></div></div></div>
-<a name="boost_explore.dependencies_platforms.dependencies"></a><h2>
-<a name="id317595"></a>
- Dependencies
- </h2>
+<a name="boost_explore.dependencies_platforms"></a><a href="dependencies_platforms.html" title="Dependencies and Platforms"> Dependencies and
+ Platforms</a></h2></div></div></div>
+<a name="boost_explore.dependencies_platforms.dependencies"></a><h3>
+<a name="id974523"></a>
+ Dependencies
+ </h3>
<p>
The following libraries must be available in order to use Boost.explore
</p>
@@ -49,10 +50,11 @@
parameter (tbd in future for parameter based interface)
</li>
</ul></div>
-<a name="boost_explore.dependencies_platforms.supported_platforms"></a><h2>
-<a name="id317633"></a>
- Supported Platforms
- </h2>
+<a name="boost_explore.dependencies_platforms.supported_platforms"></a><h3>
+<a name="id974574"></a>
+ <a href="dependencies_platforms.html#boost_explore.dependencies_platforms.supported_platforms">Supported
+ Platforms</a>
+ </h3>
<p>
The following platforms and compilers have been tested:
</p>
@@ -61,13 +63,17 @@
<span class="special">*</span> <span class="identifier">vc7</span><span class="special">.</span><span class="number">1</span><span class="special">,</span> <span class="number">8.0</span> <span class="identifier">WinXp</span>
</pre>
</div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><small>Copyright © 2007 Jeff Garland</small></td>
+<td align="right"><div class="copyright-footer">Copyright © 2007 Jeff Garland, 2008 Jared McIntyre<p>
+ 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)
+ </p>
+</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="tutorial.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="design.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="tutorial/custom_containers.html"><img src="../../../../../doc/html/images/%20prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/%20up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/%20home.png" alt="Home"></a><a accesskey="n" href="design.html"><img src="../../../../../doc/html/images/%20next.png" alt="Next"></a>
</div>
</body>
</html>
Modified: sandbox/explore/libs/explore/doc/html/boost_explore/design.html
==============================================================================
--- sandbox/explore/libs/explore/doc/html/boost_explore/design.html (original)
+++ sandbox/explore/libs/explore/doc/html/boost_explore/design.html 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -1,33 +1,33 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Design Notes</title>
+<title>Design Notes</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="../index.html" title="Boost.Explore">
-<link rel="up" href="../index.html" title="Boost.Explore">
-<link rel="prev" href="dependencies_platforms.html" title=" Dependencies and Platforms">
+<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<link rel="start" href="../index.html" title="Boost.explore">
+<link rel="up" href="../index.html" title="Boost.explore">
+<link rel="prev" href="dependencies_platforms.html" title="Dependencies and Platforms">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
-<td align="center">Home</td>
+<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
-</table>
+</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="dependencies_platforms.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
+<a accesskey="p" href="dependencies_platforms.html"><img src="../../../../../doc/html/images/%20prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/%20up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/%20home.png" alt="Home"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_explore.design"></a> Design Notes</h2></div></div></div>
-<a name="boost_explore.design.rationale"></a><h2>
-<a name="id317724"></a>
- Rationale
- </h2>
+<a name="boost_explore.design"></a> Design Notes</h2></div></div></div>
+<a name="boost_explore.design.rationale"></a><h3>
+<a name="id974684"></a>
+ Rationale
+ </h3>
<p>
The explore library is intended primarily as a debugging tool although in some
cases it may prove sufficiently capable to provide output good enough for other
@@ -50,13 +50,17 @@
</li>
</ul></div>
</div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><small>Copyright © 2007 Jeff Garland</small></td>
+<td align="right"><div class="copyright-footer">Copyright © 2007 Jeff Garland, 2008 Jared McIntyre<p>
+ 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)
+ </p>
+</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="dependencies_platforms.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a>
+<a accesskey="p" href="dependencies_platforms.html"><img src="../../../../../doc/html/images/%20prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/%20up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/%20home.png" alt="Home"></a>
</div>
</body>
</html>
Modified: sandbox/explore/libs/explore/doc/html/boost_explore/tutorial.html
==============================================================================
--- sandbox/explore/libs/explore/doc/html/boost_explore/tutorial.html (original)
+++ sandbox/explore/libs/explore/doc/html/boost_explore/tutorial.html 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -1,34 +1,42 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title> Tutorial</title>
+<title>Tutorial</title>
<link rel="stylesheet" href="../boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="../index.html" title="Boost.Explore">
-<link rel="up" href="../index.html" title="Boost.Explore">
-<link rel="prev" href="../index.html" title="Boost.Explore">
-<link rel="next" href="dependencies_platforms.html" title=" Dependencies and Platforms">
+<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<link rel="start" href="../index.html" title="Boost.explore">
+<link rel="up" href="../index.html" title="Boost.explore">
+<link rel="prev" href="../index.html" title="Boost.explore">
+<link rel="next" href="tutorial/custom_delimeters.html" title="Custom Delimiters">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
-<td align="center">Home</td>
+<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
-</table>
+</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="dependencies_platforms.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/%20prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/%20up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/%20home.png" alt="Home"></a><a accesskey="n" href="tutorial/custom_delimeters.html"><img src="../../../../../doc/html/images/%20next.png" alt="Next"></a>
</div>
<div class="section" lang="en">
<div class="titlepage"><div><div><h2 class="title" style="clear: both">
-<a name="boost_explore.tutorial"></a> Tutorial</h2></div></div></div>
-<a name="boost_explore.tutorial.basic_container_printing"></a><h2>
-<a name="id317437"></a>
- Basic Container Printing
- </h2>
+<a name="boost_explore.tutorial"></a> Tutorial</h2></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section"> Custom Delimiters</span></dt>
+<dt><span class="section"> Custom Containers</span></dt>
+</dl>
+</div>
+<a name="boost_explore.tutorial.basic_container_printing"></a><h4>
+<a name="id972463"></a>
+ <a href="tutorial.html#boost_explore.tutorial.basic_container_printing">Basic Container
+ Printing</a>
+ </h4>
<p>
All of the explore library can be used by simply including the <code class="computeroutput"><span class="string">"explore.hpp"</span></code> header file.
</p>
@@ -36,39 +44,147 @@
<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">explore</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
<span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">explore</span><span class="special">;</span>
</pre>
+<a name="boost_explore.tutorial.printing_of_contained_items"></a><h4>
+<a name="id972574"></a>
+ <a href="tutorial.html#boost_explore.tutorial.printing_of_contained_items">Printing
+ of Contained Items</a>
+ </h4>
+<p>
+ Basic printing of containers requires the inclusing of explore.hpp. Once included,
+ containers can be be streamed in a formated manner.
+ </p>
+<pre class="programlisting">
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vi</span><span class="special">;</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">vi</span><span class="special">;</span>
+</pre>
+<p>
+ prints
+ </p>
+<pre class="programlisting">
+<span class="special">[</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">]</span>
+</pre>
+<p>
+ The beginning of the container will be marked with a '[' and the end will be
+ marked with a ']'. Each item in the container will be seperated by a ', ' to
+ allow for easier identification of each item.
+ </p>
+<p>
+ Containers that contain other containers will print the child containers using
+ the same format for the parent, their children, their children's children,
+ etc.
+ </p>
+<pre class="programlisting">
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="identifier">vvi</span><span class="special">;</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">vi</span><span class="special">);</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">vi</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">vi</span><span class="special">;</span>
+</pre>
+<p>
+ prints
+ </p>
+<pre class="programlisting">
+<span class="special">[[</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">],</span> <span class="special">[</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">]]</span>
+</pre>
+<a name="boost_explore.tutorial.c_style_arrays"></a><h4>
+<a name="id973042"></a>
+ C Style Arrays
+ </h4>
+<p>
+ C style arrays have a standard streaming format, however, when you include
+ explore.hpp, you override this default streaming format with the explore streaming
+ format and all the abilities of it.
+ </p>
+<pre class="programlisting">
+<span class="keyword">int</span> <span class="identifier">arr</span><span class="special">[</span><span class="number">3</span><span class="special">]</span> <span class="special">=</span> <span class="special">{</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">};</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">arr</span><span class="special">;</span>
+</pre>
+<p>
+ prints
+ </p>
+<pre class="programlisting">
+<span class="special">[</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">]</span>
+</pre>
+<a name="boost_explore.tutorial.associative_containers"></a><h4>
+<a name="id973210"></a>
+ Associative Containers
+ </h4>
+<p>
+ Associate containers are typically implemented using some form of pair-like
+ container. So you might expect the following
+ </p>
+<pre class="programlisting">
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="keyword">int</span><span class="special">,</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">></span> <span class="identifier">mis</span><span class="special">;</span>
+<span class="identifier">mis</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="number">1</span><span class="special">,</span> <span class="string">"first"</span><span class="special">));</span>
+<span class="identifier">mis</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="number">2</span><span class="special">,</span> <span class="string">"second"</span><span class="special">));</span>
+<span class="identifier">mis</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="number">3</span><span class="special">,</span> <span class="string">"third"</span><span class="special">));</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">mis</span><span class="special">;</span>
+</pre>
<p>
- More granular headers are also available under boost/explore.
+ would print this way
</p>
-<a name="boost_explore.tutorial.customizing_delimiters"></a><h2>
-<a name="id317542"></a>
- Customizing Delimiters
- </h2>
+<pre class="programlisting">
+<span class="special">[[</span><span class="number">1</span><span class="special">,</span> <span class="identifier">first</span><span class="special">],</span> <span class="special">[</span><span class="number">2</span><span class="special">,</span> <span class="identifier">second</span><span class="special">],</span> <span class="special">[</span><span class="number">3</span><span class="special">,</span> <span class="identifier">third</span><span class="special">]]</span>
+</pre>
+<p>
+ But this format doesn't describe the associative nature of the elements well.
+ So, explore uses special delimeters for the associations within associative
+ containers, and the above code prints in a clearer format.
+ </p>
+<pre class="programlisting">
+<span class="special">[</span><span class="number">1</span><span class="special">:</span><span class="identifier">first</span><span class="special">,</span> <span class="number">2</span><span class="special">:</span><span class="identifier">second</span><span class="special">,</span> <span class="number">3</span><span class="special">:</span><span class="identifier">third</span><span class="special">]</span>
+</pre>
<p>
- When printing a container explore users user several delimeters:
+ Currently, the only containers that explore recognizes as associative are:
</p>
<div class="itemizedlist"><ul type="disc">
<li>
- opening - printed at the start of the container default: '['
+ std::map
</li>
<li>
- closing - printed at the end of the container default: ']'
- </li>
-<li>
- delimiter - printed between each element default: ', '
+ std::multimap
</li>
</ul></div>
-<a name="boost_explore.tutorial.printing_of_contained_items"></a><h2>
-<a name="id317573"></a>
- Printing of Contained Items
- </h2>
+<p>
+ Custom containers
+ can be handled as associative containers.
+ </p>
+<a name="boost_explore.tutorial.lexical_cast"></a><h4>
+<a name="id973674"></a>
+ lexical_cast
+ </h4>
+<p>
+ Because explore works with streaming operators, boost::lexical_cast will work
+ with the explore library to allow you to create strings with the printed output
+ of explore for cases when you don't want to use streaming directly.
+ </p>
+<pre class="programlisting">
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vi</span><span class="special">;</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span> <span class="identifier">outVal</span><span class="special">(</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">lexical_cast</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">>(</span><span class="identifier">vi</span><span class="special">)</span> <span class="special">);</span>
+</pre>
+<p>
+ outVal equals
+ </p>
+<pre class="programlisting">
+<span class="special">[</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">]</span>
+</pre>
</div>
-<table width="100%"><tr>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
-<td align="right"><small>Copyright © 2007 Jeff Garland</small></td>
+<td align="right"><div class="copyright-footer">Copyright © 2007 Jeff Garland, 2008 Jared McIntyre<p>
+ 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)
+ </p>
+</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
-<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="dependencies_platforms.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
+<a accesskey="p" href="../index.html"><img src="../../../../../doc/html/images/%20prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../../../../../doc/html/images/%20up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../../../../../doc/html/images/%20home.png" alt="Home"></a><a accesskey="n" href="tutorial/custom_delimeters.html"><img src="../../../../../doc/html/images/%20next.png" alt="Next"></a>
</div>
</body>
</html>
Added: sandbox/explore/libs/explore/doc/html/boost_explore/tutorial/custom_containers.html
==============================================================================
--- (empty file)
+++ sandbox/explore/libs/explore/doc/html/boost_explore/tutorial/custom_containers.html 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Custom Containers</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<link rel="start" href="../../index.html" title="Boost.explore">
+<link rel="up" href="../tutorial.html" title="Tutorial">
+<link rel="prev" href="custom_delimeters.html" title="Custom Delimiters">
+<link rel="next" href="../dependencies_platforms.html" title="Dependencies and Platforms">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="custom_delimeters.html"><img src="../../../../../../doc/html/images/%20prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/%20up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/%20home.png" alt="Home"></a><a accesskey="n" href="../dependencies_platforms.html"><img src="../../../../../../doc/html/images/%20next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_explore.tutorial.custom_containers"></a> Custom Containers</h3></div></div></div>
+<p>
+ You can use explore with your custom containers, or third party containers.
+ However, explore needs a little help in understanding these classes.
+ </p>
+<p>
+ Eventually, it would be good to write something here explaining how you can
+ do that. 8-)
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2007 Jeff Garland, 2008 Jared McIntyre<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="custom_delimeters.html"><img src="../../../../../../doc/html/images/%20prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/%20up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/%20home.png" alt="Home"></a><a accesskey="n" href="../dependencies_platforms.html"><img src="../../../../../../doc/html/images/%20next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/explore/libs/explore/doc/html/boost_explore/tutorial/custom_delimeters.html
==============================================================================
--- (empty file)
+++ sandbox/explore/libs/explore/doc/html/boost_explore/tutorial/custom_delimeters.html 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -0,0 +1,210 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Custom Delimiters</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<link rel="start" href="../../index.html" title="Boost.explore">
+<link rel="up" href="../tutorial.html" title="Tutorial">
+<link rel="prev" href="../tutorial.html" title="Tutorial">
+<link rel="next" href="custom_containers.html" title="Custom Containers">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../tutorial.html"><img src="../../../../../../doc/html/images/%20prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/%20up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/%20home.png" alt="Home"></a><a accesskey="n" href="custom_containers.html"><img src="../../../../../../doc/html/images/%20next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="boost_explore.tutorial.custom_delimeters"></a> Custom Delimiters</h3></div></div></div>
+<p>
+ Explore provides the ability to change the strings used in the container
+ streaming process through the use of several new stream manipulators.
+ </p>
+<div class="table">
+<a name="id973962"></a><p class="title"><b>Table 1. Explore Stream Manipulators</b></p>
+<div class="table-contents"><table class="table" summary="Explore Stream Manipulators">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Manipulator
+ </p>
+ </th>
+<th>
+ <p>
+ Default
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ start(char*)
+ </p>
+ </td>
+<td>
+ <p>
+ '['
+ </p>
+ </td>
+<td>
+ <p>
+ Changes the string output at the beginning of a container.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ end(char*)
+ </p>
+ </td>
+<td>
+ <p>
+ ']'
+ </p>
+ </td>
+<td>
+ <p>
+ Changes the string output at the end of a container.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ seperator(char*)
+ </p>
+ </td>
+<td>
+ <p>
+ ', '
+ </p>
+ </td>
+<td>
+ <p>
+ Changes the string output in between elements.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ assoc_start(char*)
+ </p>
+ </td>
+<td>
+ <p>
+ ''
+ </p>
+ </td>
+<td>
+ <p>
+ Changes the string output at the front of an association.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ assoc_end(char*)
+ </p>
+ </td>
+<td>
+ <p>
+ ''
+ </p>
+ </td>
+<td>
+ <p>
+ Changes the string output at the end of an association.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ assoc_seperator(char*)
+ </p>
+ </td>
+<td>
+ <p>
+ ':'
+ </p>
+ </td>
+<td>
+ <p>
+ Changes the string output in between elements of an association.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<br class="table-break"><p>
+ For example, to change the beginning and end output of a container to be
+ the greater and less than symbols, you would do the following.
+ </p>
+<pre class="programlisting">
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vi</span><span class="special">;</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">explore</span><span class="special">::</span><span class="identifier">start</span><span class="special">(</span><span class="string">"<"</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">explore</span><span class="special">::</span><span class="identifier">end</span><span class="special">(</span><span class="string">">"</span><span class="special">)</span> <span class="special"><<</span> <span class="identifier">vi</span><span class="special">;</span>
+</pre>
+<p>
+ prints
+ </p>
+<pre class="programlisting">
+<span class="special"><</span><span class="number">1</span><span class="special">,</span> <span class="number">2</span><span class="special">,</span> <span class="number">3</span><span class="special">></span>
+</pre>
+<a name="boost_explore.tutorial.custom_delimeters.delimeters_by_level"></a><h5>
+<a name="id974421"></a>
+ <a href="custom_delimeters.html#boost_explore.tutorial.custom_delimeters.delimeters_by_level">Delimeters
+ by Level</a>
+ </h5>
+<p>
+ finish this
+ </p>
+<a name="boost_explore.tutorial.custom_delimeters.level_breaks"></a><h5>
+<a name="id974448"></a>
+ <a href="custom_delimeters.html#boost_explore.tutorial.custom_delimeters.level_breaks">Level
+ Breaks</a>
+ </h5>
+<p>
+ finish this
+ </p>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright © 2007 Jeff Garland, 2008 Jared McIntyre<p>
+ 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="../tutorial.html"><img src="../../../../../../doc/html/images/%20prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../../../../../doc/html/images/%20up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/html/images/%20home.png" alt="Home"></a><a accesskey="n" href="custom_containers.html"><img src="../../../../../../doc/html/images/%20next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Modified: sandbox/explore/libs/explore/doc/html/boostbook.css
==============================================================================
--- sandbox/explore/libs/explore/doc/html/boostbook.css (original)
+++ sandbox/explore/libs/explore/doc/html/boostbook.css 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -10,7 +10,7 @@
Body defaults
=============================================================================*/
- body
+ body
{
margin: 1em;
font-family: sans-serif;
@@ -20,10 +20,10 @@
Paragraphs
=============================================================================*/
- p
+ p
{
text-align: left;
- font-size: 10pt;
+ font-size: 10pt;
line-height: 1.15;
}
@@ -44,7 +44,7 @@
padding: 0.5pc 0.5pc 0.5pc 0.5pc;
}
- .programlisting,
+ .programlisting,
.screen
{
font-size: 9pt;
@@ -54,7 +54,7 @@
}
/* Program listings in tables don't get borders */
- td .programlisting,
+ td .programlisting,
td .screen
{
margin: 0pc 0pc 0pc 0pc;
@@ -65,9 +65,9 @@
Headings
=============================================================================*/
- h1, h2, h3, h4, h5, h6
- {
- text-align: left;
+ h1, h2, h3, h4, h5, h6
+ {
+ text-align: left;
margin: 1em 0em 0.5em 0em;
font-weight: bold;
}
@@ -80,13 +80,13 @@
h6 { font: italic 100% }
/* Top page titles */
- title,
- h1.title,
+ title,
+ h1.title,
h2.title
- h3.title,
- h4.title,
- h5.title,
- h6.title,
+ h3.title,
+ h4.title,
+ h5.title,
+ h6.title,
.refentrytitle
{
font-weight: bold;
@@ -100,7 +100,7 @@
h5.title { font-size: 110% }
h6.title { font-size: 100% }
- .section h1
+ .section h1
{
margin: 0em 0em 0.5em 0em;
font-size: 140%;
@@ -124,9 +124,9 @@
Author
=============================================================================*/
- h3.author
- {
- font-size: 100%
+ h3.author
+ {
+ font-size: 100%
}
/*=============================================================================
@@ -138,15 +138,15 @@
font-size: 10pt;
line-height: 1.3;
}
-
+
/* Unordered lists */
- ul
+ ul
{
text-align: left;
}
-
+
/* Ordered lists */
- ol
+ ol
{
text-align: left;
}
@@ -159,7 +159,7 @@
{
text-decoration: none; /* no underline */
}
-
+
a:hover
{
text-decoration: underline;
@@ -173,19 +173,34 @@
{
text-align: right;
}
-
+
.spirit-nav a
{
color: white;
padding-left: 0.5em;
}
-
+
.spirit-nav img
{
border-width: 0px;
}
/*=============================================================================
+ Copyright footer
+=============================================================================*/
+ .copyright-footer
+ {
+ text-align: right;
+ font-size: 70%;
+ }
+
+ .copyright-footer p
+ {
+ text-align: right;
+ font-size: 80%;
+ }
+
+/*=============================================================================
Table of contents
=============================================================================*/
@@ -193,10 +208,10 @@
{
margin: 1pc 4% 0pc 4%;
padding: 0.1pc 1pc 0.1pc 1pc;
- font-size: 80%;
+ font-size: 80%;
line-height: 1.15;
}
-
+
.boost-toc
{
float: right;
@@ -207,30 +222,30 @@
Tables
=============================================================================*/
- .table-title,
+ .table-title,
div.table p.title
{
margin-left: 4%;
- padding-right: 0.5em;
+ padding-right: 0.5em;
padding-left: 0.5em;
}
-
- .informaltable table,
+
+ .informaltable table,
.table table
{
width: 92%;
margin-left: 4%;
margin-right: 4%;
}
-
- div.informaltable table,
+
+ div.informaltable table,
div.table table
{
padding: 4px;
}
-
+
/* Table Cells */
- div.informaltable table tr td,
+ div.informaltable table tr td,
div.table table tr td
{
padding: 0.5em;
@@ -238,7 +253,7 @@
font-size: 9pt;
}
- div.informaltable table tr th,
+ div.informaltable table tr th,
div.table table tr th
{
padding: 0.5em 0.5em 0.5em 0.5em;
@@ -246,6 +261,22 @@
font-size: 80%;
}
+ table.simplelist
+ {
+ width: auto !important;
+ margin: 0em !important;
+ padding: 0em !important;
+ border: none !important;
+ }
+ table.simplelist td
+ {
+ margin: 0em !important;
+ padding: 0em !important;
+ text-align: left !important;
+ font-size: 9pt !important;
+ border: none !important;
+ }
+
/*=============================================================================
Blurbs
=============================================================================*/
@@ -263,7 +294,7 @@
margin: 1pc 4% 0pc 4%;
padding: 0.5pc 0.5pc 0.5pc 0.5pc;
}
-
+
p.blurb img
{
padding: 1pt;
@@ -341,12 +372,16 @@
@media screen
{
+ body {
+ background-color: #FFFFFF;
+ }
+
/* Links */
a
{
color: #005a9c;
}
-
+
a:visited
{
color: #9c5a9c;
@@ -359,7 +394,7 @@
text-decoration: none; /* no underline */
color: #000000;
}
-
+
/* Syntax Highlighting */
.keyword { color: #0000AA; }
.identifier { color: #000000; }
@@ -371,37 +406,37 @@
.number { color: teal; }
.white_bkd { background-color: #FFFFFF; }
.dk_grey_bkd { background-color: #999999; }
-
+
/* Copyright, Legal Notice */
- .copyright
- {
- color: #666666;
- font-size: small;
+ .copyright
+ {
+ color: #666666;
+ font-size: small;
}
-
+
div div.legalnotice p
{
color: #666666;
}
-
+
/* Program listing */
pre.synopsis
{
border: 1px solid #DCDCDC;
}
-
- .programlisting,
+
+ .programlisting,
.screen
{
border: 1px solid #DCDCDC;
}
-
- td .programlisting,
+
+ td .programlisting,
td .screen
{
border: 0px solid #DCDCDC;
}
-
+
/* Blurbs */
div.note,
div.tip,
@@ -412,34 +447,39 @@
{
border: 1px solid #DCDCDC;
}
-
+
/* Table of contents */
.toc
{
border: 1px solid #DCDCDC;
}
-
+
/* Tables */
- div.informaltable table tr td,
+ div.informaltable table tr td,
div.table table tr td
{
border: 1px solid #DCDCDC;
}
-
- div.informaltable table tr th,
+
+ div.informaltable table tr th,
div.table table tr th
{
background-color: #F0F0F0;
border: 1px solid #DCDCDC;
}
-
+
+ .copyright-footer
+ {
+ color: #8F8F8F;
+ }
+
/* Misc */
span.highlight
{
color: #00A000;
}
}
-
+
@media print
{
/* Links */
@@ -447,61 +487,66 @@
{
color: black;
}
-
+
a:visited
{
color: black;
}
-
+
.spirit-nav
{
display: none;
}
-
+
/* Program listing */
pre.synopsis
{
border: 1px solid gray;
}
-
- .programlisting,
+
+ .programlisting,
.screen
{
border: 1px solid gray;
}
-
- td .programlisting,
+
+ td .programlisting,
td .screen
{
border: 0px solid #DCDCDC;
}
-
+
/* Table of contents */
.toc
{
border: 1px solid gray;
}
-
- .informaltable table,
+
+ .informaltable table,
.table table
{
border: 1px solid gray;
border-collapse: collapse;
}
-
+
/* Tables */
- div.informaltable table tr td,
+ div.informaltable table tr td,
div.table table tr td
{
border: 1px solid gray;
}
-
- div.informaltable table tr th,
+
+ div.informaltable table tr th,
div.table table tr th
{
border: 1px solid gray;
}
-
+
+ table.simplelist tr td
+ {
+ border: none !important;
+ }
+
/* Misc */
span.highlight
{
@@ -516,4 +561,28 @@
span.inlinemediaobject img
{
vertical-align: middle;
- }
\ No newline at end of file
+ }
+
+/*==============================================================================
+ Super and Subscript: style so that line spacing isn't effected, see
+ http://www.adobe.com/cfusion/communityengine/index.cfm?event=showdetails&productId=1&postId=5341
+==============================================================================*/
+
+sup,
+sub {
+ height: 0;
+ line-height: 1;
+ vertical-align: baseline;
+ _vertical-align: bottom;
+ position: relative;
+
+}
+
+sup {
+ bottom: 1ex;
+}
+
+sub {
+ top: .5ex;
+}
+
Modified: sandbox/explore/libs/explore/doc/html/index.html
==============================================================================
--- sandbox/explore/libs/explore/doc/html/index.html (original)
+++ sandbox/explore/libs/explore/doc/html/index.html 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -1,30 +1,30 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>Boost.Explore</title>
+<title>Boost.explore</title>
<link rel="stylesheet" href="boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
-<link rel="start" href="index.html" title="Boost.Explore">
-<link rel="next" href="boost_explore/tutorial.html" title=" Tutorial">
+<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
+<link rel="start" href="index.html" title="Boost.explore">
+<link rel="next" href="boost_explore/tutorial.html" title="Tutorial">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%">
+<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
-<td align="center">Home</td>
+<td align="center">Home</td>
<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
<td align="center">More</td>
-</table>
+</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="boost_explore/tutorial.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="boost_explore/tutorial.html"><img src="../../../../doc/html/images/%20next.png" alt="Next"></a></div>
<div class="chapter" lang="en">
<div class="titlepage"><div>
<div><h2 class="title">
-<a name="boost_explore"></a>Boost.Explore</h2></div>
-<div><p class="copyright">Copyright © 2007 Jeff Garland</p></div>
+<a name="boost_explore"></a>Boost.explore</h2></div>
+<div><p class="copyright">Copyright © 2007 Jeff Garland, 2008 Jared McIntyre</p></div>
<div><div class="legalnotice">
-<a name="id308141"></a><p>
+<a name="id972422"></a><p>
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)
</p>
@@ -34,17 +34,22 @@
<p><b>Table of Contents</b></p>
<dl>
<dt><span class="section"> Tutorial</span></dt>
-<dt><span class="section"> Dependencies and Platforms</span></dt>
+<dd><dl>
+<dt><span class="section"> Custom Delimiters</span></dt>
+<dt><span class="section"> Custom Containers</span></dt>
+</dl></dd>
+<dt><span class="section"><a href="boost_explore/dependencies_platforms.html"> Dependencies and
+ Platforms</a></span></dt>
<dt><span class="section"> Design Notes</span></dt>
</dl>
</div>
<p>
- Boost.Explore is a cross-platform C++ library for printing of containers.
+ Boost.explore is a cross-platform C++ library for printing of containers.
</p>
-<a name="boost_explore..getting_started"></a><h2>
-<a name="id276942"></a>
- Getting Started
- </h2>
+<a name="boost_explore..getting_started"></a><h3>
+<a name="id974754"></a>
+ Getting Started
+ </h3>
<p>
Boost.explore is a library that provides for the output of data from containers
or ranges.
@@ -53,56 +58,113 @@
The following are some simple usage examples:
</p>
<pre class="programlisting">
-<span class="comment">//explore supports output for all stl container types
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vi</span> <span class="special">+=</span> <span class="special">{</span><span class="number">1</span><span class="special">,</span><span class="number">2</span><span class="special">,</span><span class="number">3</span><span class="special">};</span> <span class="comment">//boost assign!
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">vi</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">//prints [1, 2, 3]
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">stringstream</span> <span class="identifier">ss</span><span class="special">;</span>
-<span class="identifier">print</span><span class="special">(</span><span class="identifier">vi</span><span class="special">,</span> <span class="identifier">ss</span><span class="special">);</span> <span class="comment">//prints [1, 2, 3]
-</span><span class="comment">//lets do some containers in containers
+<span class="preprocessor">#include</span> <span class="special"><</span><span class="identifier">boost</span><span class="special">/</span><span class="identifier">explore</span><span class="special">.</span><span class="identifier">hpp</span><span class="special">></span>
+
+<span class="comment">// simple vector example
+</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="identifier">vi</span><span class="special">;</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">1</span><span class="special">);</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">2</span><span class="special">);</span>
+<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="number">3</span><span class="special">);</span>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">vi</span><span class="special">;</span> <span class="comment">// prints [1, 2, 3]
+</span>
+<span class="comment">//lets do some containers in containers
</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special"><</span><span class="keyword">int</span><span class="special">></span> <span class="special">></span> <span class="identifier">vvi</span><span class="special">;</span>
<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">vi</span><span class="special">);</span>
<span class="identifier">vvi</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">vi</span><span class="special">);</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">vi</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">//prints [[1, 2, 3], [1, 2, 3]]
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">vi</span><span class="special">;</span> <span class="comment">// prints [[1, 2, 3], [1, 2, 3]]
+</span>
+<span class="comment">// associative containers
</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="keyword">int</span><span class="special">></span> <span class="identifier">si_map</span><span class="special">;</span>
<span class="identifier">si_map</span><span class="special">[</span><span class="string">"hello"</span><span class="special">]</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
<span class="identifier">si_map</span><span class="special">[</span><span class="string">"world"</span><span class="special">]</span> <span class="special">=</span> <span class="number">2</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">si_map</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">//prints [hello:1, world:2]
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special"><</span><span class="identifier">date</span><span class="special">></span> <span class="identifier">dl</span><span class="special">;</span> <span class="comment">//date from boost::gregorian
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">si_map</span><span class="special">;</span> <span class="comment">// prints [hello:1, world:2]
+</span>
+<span class="comment">// containers of complex types
+</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">list</span><span class="special"><</span><span class="identifier">date</span><span class="special">></span> <span class="identifier">dl</span><span class="special">;</span> <span class="comment">// date from boost::gregorian
</span><span class="identifier">dl</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">date</span><span class="special">(</span><span class="number">2007</span><span class="special">,</span> <span class="identifier">Jan</span><span class="special">,</span> <span class="number">1</span><span class="special">));</span>
<span class="identifier">dl</span><span class="special">.</span><span class="identifier">push_back</span><span class="special">(</span><span class="identifier">date</span><span class="special">(</span><span class="number">2007</span><span class="special">,</span> <span class="identifier">Jan</span><span class="special">,</span> <span class="number">3</span><span class="special">));</span>
-<span class="comment">//printing of user defined types uses the types operator<< if available
-</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">dl</span> <span class="special"><<</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">endl</span><span class="special">;</span> <span class="comment">//prints [2007-Jan-1, 2007-Jan-3]
-</span><span class="comment">//how about some boost container types:
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">dl</span><span class="special">;</span> <span class="comment">// prints [2007-Jan-1, 2007-Jan-3]
+</span>
+<span class="comment">// how about some boost container types:
</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special"><</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">string</span><span class="special">,</span> <span class="number">2</span><span class="special">></span> <span class="identifier">sa2</span><span class="special">;</span>
<span class="identifier">sa2</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">=</span> <span class="string">"one"</span><span class="special">;</span>
<span class="identifier">sa2</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">=</span> <span class="string">"two"</span><span class="special">;</span>
-</pre>
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special"><<</span> <span class="identifier">sa2</span><span class="special">;</span> <span class="comment">// prints [one, two]
+</span></pre>
<p>
- The tutorial shows more details
+ The tutorial shows more details
on using explore.
</p>
<p>
While explore is powerful and flexible, it is not infinitely flexible. The reasons
- for this are discussed in the design
+ for this are discussed in the design
section.For very complex output custom methods or a template output system should
be considered.
</p>
-<a name="boost_explore..acknowledgements"></a><h2>
-<a name="id317776"></a>
- Acknowledgements
- </h2>
+<a name="boost_explore..supported_containers"></a><h3>
+<a name="id975686"></a>
+ Supported Containers
+ </h3>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ C style array
+ </li>
+<li>
+ std::deque
+ </li>
+<li>
+ std::list
+ </li>
+<li>
+ std::map
+ </li>
+<li>
+ std::multimap
+ </li>
+<li>
+ std::pair
+ </li>
+<li>
+ std::set
+ </li>
+<li>
+ std::multiset
+ </li>
+<li>
+ std::vector
+ </li>
+<li>
+ boost::array
+ </li>
+<li>
+ boost::range
+ </li>
+<li>
+ boost::tuple
+ </li>
+</ul></div>
+<p>
+ Custom containers
+ can also be made to work with explore.
+ </p>
+<a name="boost_explore..acknowledgements"></a><h3>
+<a name="id975766"></a>
+ Acknowledgements
+ </h3>
<p>
Most of the major concepts and interfaces for this library were developed at
BoostCon 2007. There were many participants in the 8:00 am sessions that developed
the interfaces and concepts. Notably Hartmut Kaiser, Joao ???, and Joel De Guzman
- for discussing Karma and doing some initial prototypes.
+ for discussing Karma and doing some initial prototypes. Development was done
+ by Jeffrey Faust, Danny Havenith, and Jared McIntyre with the help of Jeff Garland,
+ who also lead the sessions.
</p>
</div>
-<table width="100%"><tr>
-<td align="left"><small><p>Last revised: May 27, 2007 at 15:50:13 GMT</p></small></td>
-<td align="right"><small></small></td>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: March 22, 2008 at 00:25:13 GMT</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>
-<div class="spirit-nav"><a accesskey="n" href="boost_explore/tutorial.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a></div>
+<div class="spirit-nav"><a accesskey="n" href="boost_explore/tutorial.html"><img src="../../../../doc/html/images/%20next.png" alt="Next"></a></div>
</body>
</html>
Modified: sandbox/explore/libs/explore/doc/tutorial.qbk
==============================================================================
--- sandbox/explore/libs/explore/doc/tutorial.qbk (original)
+++ sandbox/explore/libs/explore/doc/tutorial.qbk 2008-03-22 17:36:58 EDT (Sat, 22 Mar 2008)
@@ -1,5 +1,6 @@
[/
/ Copyright (c) 2007 Jeff Garland (jeff at crystalclearsoftware dot com)
+ / Copyright (c) 2008 Jared McIntyre
/
/ 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)
@@ -7,7 +8,7 @@
[section:tutorial Tutorial]
-[h2 Basic Container Printing]
+[heading Basic Container Printing]
All of the explore library can be used by simply including the `"explore.hpp"`
@@ -17,25 +18,85 @@
``''''''``using namespace boost::explore;
-More granular headers are also available under boost/explore.
+[heading Printing of Contained Items]
+Basic printing of containers requires the inclusing of explore.hpp. Once included, containers can be be streamed in a formated manner.
+ std::vector<int> vi;
+ vvi.push_back(1);
+ vvi.push_back(2);
+ vvi.push_back(3);
+ std::cout << vi;
-[h2 Customizing Delimiters]
+prints
-When printing a container explore users user several delimeters:
+ [1, 2, 3]
-* opening - printed at the start of the container default: '\['
-* closing - printed at the end of the container default: '\]'
-* delimiter - printed between each element default: ', '
+The beginning of the container will be marked with a '\[' and the end will be marked with a '\]'. Each item in the container will be seperated by a ', ' to allow for easier identification of each item.
+Containers that contain other containers will print the child containers using the same format for the parent, their children, their children's children, etc.
-[h2 Printing of Contained Items]
+ std::vector<std::vector<int> > vvi;
+ vvi.push_back(vi);
+ vvi.push_back(vi);
+ std::cout << vi;
+prints
+ [[1, 2, 3], [1, 2, 3]]
+[heading C Style Arrays]
+C style arrays have a standard streaming format, however, when you include explore.hpp, you override this default streaming format with the explore streaming format and all the abilities of it.
+ int arr[3] = {1,2,3};
+ std::cout << arr;
+prints
+
+ [1, 2, 3]
+
+[heading Associative Containers]
+
+Associate containers are typically implemented using some form of pair-like container. So you might expect the following
+
+ std::map<int,std::string> mis;
+ mis.insert(std::make_pair(1, "first"));
+ mis.insert(std::make_pair(2, "second"));
+ mis.insert(std::make_pair(3, "third"));
+ std::cout << mis;
+
+would print this way
+
+ [[1, first], [2, second], [3, third]]
+
+But this format doesn't describe the associative nature of the elements well. So, explore uses special delimeters for the associations within associative containers, and the above code prints in a clearer format.
+
+ [1:first, 2:second, 3:third]
+
+Currently, the only containers that explore recognizes as associative are:
+
+* std::map
+* std::multimap
+
+[link boost_explore.tutorial.custom_containers Custom containers] can be handled as associative containers.
+
+[heading lexical_cast]
+
+Because explore works with streaming operators, boost::lexical_cast will work with the explore library to allow you to create strings with the printed output of explore for cases when you don't want to use streaming directly.
+
+ std::vector<int> vi;
+ vvi.push_back(1);
+ vvi.push_back(2);
+ vvi.push_back(3);
+ std::string outVal( boost::lexical_cast<std::string>(vi) );
+
+outVal equals
+
+ [1, 2, 3]
+
+[include custom_delimeters.qbk]
+
+[include custom_containers.qbk]
[endsect]
\ No newline at end of file
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk