|
Boost-Commit : |
From: chochlik_at_[hidden]
Date: 2008-07-15 07:27:57
Author: matus.chochlik
Date: 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
New Revision: 47438
URL: http://svn.boost.org/trac/boost/changeset/47438
Log:
[mirror 0.2.x]
- Added html docs
Added:
sandbox/mirror/doc/html/about.html (contents, props changed)
sandbox/mirror/doc/html/boost/
sandbox/mirror/doc/html/boost/mirror/
sandbox/mirror/doc/html/boost/mirror/meta_class.html (contents, props changed)
sandbox/mirror/doc/html/boost/mirror/meta_namespace.html (contents, props changed)
sandbox/mirror/doc/html/boost/mirror/meta_type.html (contents, props changed)
sandbox/mirror/doc/html/boostbook.css (contents, props changed)
sandbox/mirror/doc/html/doc_HTML.manifest (contents, props changed)
sandbox/mirror/doc/html/docutils.css (contents, props changed)
sandbox/mirror/doc/html/images/
sandbox/mirror/doc/html/images/blank.png (contents, props changed)
sandbox/mirror/doc/html/images/caution.png (contents, props changed)
sandbox/mirror/doc/html/images/draft.png (contents, props changed)
sandbox/mirror/doc/html/images/home.png (contents, props changed)
sandbox/mirror/doc/html/images/important.png (contents, props changed)
sandbox/mirror/doc/html/images/next.png (contents, props changed)
sandbox/mirror/doc/html/images/next_disabled.png (contents, props changed)
sandbox/mirror/doc/html/images/note.png (contents, props changed)
sandbox/mirror/doc/html/images/prev.png (contents, props changed)
sandbox/mirror/doc/html/images/prev_disabled.png (contents, props changed)
sandbox/mirror/doc/html/images/tip.png (contents, props changed)
sandbox/mirror/doc/html/images/toc-blank.png (contents, props changed)
sandbox/mirror/doc/html/images/toc-minus.png (contents, props changed)
sandbox/mirror/doc/html/images/toc-plus.png (contents, props changed)
sandbox/mirror/doc/html/images/up.png (contents, props changed)
sandbox/mirror/doc/html/images/up_disabled.png (contents, props changed)
sandbox/mirror/doc/html/images/warning.png (contents, props changed)
sandbox/mirror/doc/html/index.html (contents, props changed)
sandbox/mirror/doc/html/libraries.html (contents, props changed)
sandbox/mirror/doc/html/mirror/
sandbox/mirror/doc/html/mirror.html (contents, props changed)
sandbox/mirror/doc/html/mirror/reference.html (contents, props changed)
sandbox/mirror/doc/html/mirror/tutorial.html (contents, props changed)
sandbox/mirror/doc/html/reference.css (contents, props changed)
Added: sandbox/mirror/doc/html/about.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/about.html 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,50 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>About this document</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="The Mirror library documentation">
+<link rel="up" href="index.html" title="The Mirror library documentation">
+<link rel="prev" href="index.html" title="The Mirror library documentation">
+<link rel="next" href="libraries.html" title="Part I. The Mirror library">
+</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="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="libraries.html"><img src="../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="preface" lang="en">
+<div class="titlepage"><div><div><h2 class="title">
+<a name="about"></a>About this document</h2></div></div></div>
+<p>This is the documentation to the Mirror C++ reflection library that is developed
+ with the intention to be proposed as a Boost C++ library at some point in the future.
+ </p>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>The documentation is far from being complete and does not cover every feature
+ already implemented, yet.
+ </p></td></tr>
+</table></div>
+</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"></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="libraries.html"><img src="../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/mirror/doc/html/boost/mirror/meta_class.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/boost/mirror/meta_class.html 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,92 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Class template meta_class</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html" title="The Mirror library documentation">
+<link rel="up" href="../../mirror/reference.html#header.boost.mirror.meta_class.hpp" title="Header <boost/mirror/meta_class.hpp>">
+<link rel="prev" href="meta_type.html" title="Class template meta_type">
+</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="meta_type.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mirror/reference.html#header.boost.mirror.meta_class.hpp"><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>
+</div>
+<div class="refentry" lang="en">
+<a name="boost.mirror.meta_class"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Class template meta_class</span></h2>
+<p>boost::mirror::meta_class —
+ This class template is to provides meta-data
+ about the reflected class.
+
+ Although the specializations of <code class="computeroutput">meta_class</code>
+ template can be used directly to get the meta data about a particular class (or type),
+ it is recomended to use the reflection macro
+ <code class="computeroutput">BOOST_MIRRORED_CLASS(CLASS)</code>
+ instead, to get the proper specializations of
+ <code class="computeroutput">meta_class</code>.
+ </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Class>
+<span class="bold"><strong>class</strong></span> <a class="link" href="meta_class.html" title="Class template meta_class">meta_class</a> : <span class="bold"><strong>public</strong></span> meta_type<Class> <span class="emphasis"><em>// The basic type meta-information about the reflected class.
+ </em></span>
+{
+<span class="bold"><strong>public</strong></span>:
+ <span class="emphasis"><em>// <a class="link" href="meta_class.html#id495310-bbtypes">types</a></em></span>
+ <span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a class="link" href="meta_class.html#boost.mirror.meta_class.base_classes">base_classes</a>;
+ <span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a class="link" href="meta_class.html#boost.mirror.meta_class.attributes">attributes</a>;
+ <span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a class="link" href="meta_class.html#boost.mirror.meta_class.all_attributes">all_attributes</a>;
+};</pre></div>
+<div class="refsect1" lang="en">
+<a name="id671795"></a><h2>Description</h2>
+<div class="refsect2" lang="en">
+<a name="id671798"></a><h3>
+<a name="id495310-bbtypes"></a><code class="computeroutput">meta_class</code> public types</h3>
+<div class="orderedlist"><ol type="1">
+<li>
+<p>
+<span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a name="boost.mirror.meta_class.base_classes"></a>base_classes;</p>
+<p>
+ </p>
+</li>
+<li>
+<p>
+<span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a name="boost.mirror.meta_class.attributes"></a>attributes;</p>
+<p>
+ </p>
+</li>
+<li>
+<p>
+<span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a name="boost.mirror.meta_class.all_attributes"></a>all_attributes;</p>
+<p>
+ </p>
+</li>
+</ol></div>
+</div>
+</div>
+</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 © 2008 Matúš Chochlík<p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> 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="meta_type.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mirror/reference.html#header.boost.mirror.meta_class.hpp"><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>
+</div>
+</body>
+</html>
Added: sandbox/mirror/doc/html/boost/mirror/meta_namespace.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/boost/mirror/meta_namespace.html 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,206 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Class template meta_namespace</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html" title="The Mirror library documentation">
+<link rel="up" href="../../mirror/reference.html#header.boost.mirror.meta_namespace.hpp" title="Header <boost/mirror/meta_namespace.hpp>">
+<link rel="prev" href="../../mirror/reference.html" title="Mirror Reference">
+<link rel="next" href="meta_type.html" title="Class template meta_type">
+</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="../../mirror/reference.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mirror/reference.html#header.boost.mirror.meta_namespace.hpp"><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="meta_type.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry" lang="en">
+<a name="boost.mirror.meta_namespace"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Class template meta_namespace</span></h2>
+<p>boost::mirror::meta_namespace —
+ This class template provides meta-data
+ about the reflected namespace, especially allows to get the
+ base and full namespace name and to
+ get information about the scope inside of which this namespace
+ has been defined.
+
+ To obtain a <code class="computeroutput">meta_namespace</code> for a particular
+ namespace (with the exception of the global scope) use the reflection
+ macro <code class="computeroutput">BOOST_MIRRORED_NAMESPACE(FULL_NAMESPACE_NAME)</code>. To
+ get the <code class="computeroutput">meta_namespace</code> specialization for
+ the global scope use the <code class="computeroutput">BOOST_MIRRORED_NAMESPACE()</code>
+ macro.
+ </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> NamespacePlaceholder>
+<span class="bold"><strong>class</strong></span> <a class="link" href="meta_namespace.html" title="Class template meta_namespace">meta_namespace</a> {
+<span class="bold"><strong>public</strong></span>:
+ <span class="emphasis"><em>// <a class="link" href="meta_namespace.html#id496123-bbtypes">types</a></em></span>
+ <span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a class="link" href="meta_namespace.html#boost.mirror.meta_namespace.scope">scope</a>;
+ <span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a class="link" href="meta_namespace.html#boost.mirror.meta_namespace.ancestors">ancestors</a>;
+ <span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a class="link" href="meta_namespace.html#id496009-bb">base_name</a>();
+ <span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a class="link" href="meta_namespace.html#id495967-bb">full_name</a>();
+ <span class="bold"><strong>template</strong></span><<span class="bold"><strong>bool</strong></span> FullName>
+ <span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a class="link" href="meta_namespace.html#id495913-bb">get_name</a>(::boost::mpl::bool_<FullName>);
+};</pre></div>
+<div class="refsect1" lang="en">
+<a name="id670751"></a><h2>Description</h2>
+<div class="refsect2" lang="en">
+<a name="id670754"></a><h3>
+<a name="id496123-bbtypes"></a><code class="computeroutput">meta_namespace</code> public types</h3>
+<div class="orderedlist"><ol type="1">
+<li>
+<p>
+<span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a name="boost.mirror.meta_namespace.scope"></a>scope;</p>
+<p>A meta-object describing the scope in which the reflected namespace
+ is defined. It is a specialization of <code class="computeroutput">meta_namespace</code>
+ with the exception of the meta-namespace reflecting the global scope where
+ this type is not defined.
+ </p>
+<p>To find out whether a meta-namespace reflects the global scope
+ use the <code class="computeroutput">reflects_global_scope</code> template meta-function.
+ </p>
+</li>
+<li>
+<p>
+<span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a name="boost.mirror.meta_namespace.ancestors"></a>ancestors;</p>
+<p>An <code class="computeroutput">mpl::vector</code> containing the <code class="computeroutput">meta_namespace</code>
+ specializations for all the namespaces in which the reflected namespace is
+ directly or indirectly nested (not-containing the <code class="computeroutput">meta_namespace</code>
+ for the reflected namespace). The elements of this <code class="computeroutput">mpl::vector</code> are
+ ordered from the <code class="computeroutput">meta_namespace</code> reflecting
+ the global scope to the <code class="computeroutput">meta_namespace</code>
+ reflecting the parent namespace. The following holds
+ for <code class="computeroutput">meta_namespace</code>s
+ reflecting any namespace with the exception of the global scope:
+ </p>
+<pre class="programlisting">
+using namespace ::boost;
+using namespace ::boost::mirror;
+
+BOOST_MPL_ASSERT((
+ reflects_global_scope <
+ mpl::front <
+ BOOST_MIRRORED_NAMESPACE(::std)::ancestors
+ >
+ >
+));
+
+BOOST_MPL_ASSERT((
+ reflects_global_scope <
+ mpl::front <
+ BOOST_MIRRORED_NAMESPACE(::boost::mirror)::ancestors
+ >
+ >
+));
+
+BOOST_MPL_ASSERT((
+ is_same <
+ mpl::back <
+ BOOST_MIRRORED_NAMESPACE(::boost::mirror)::ancestors
+ >,
+ BOOST_MIRRORED_NAMESPACE(::boost::mirror)::scope
+ >
+));
+ </pre>
+<p>For the <code class="computeroutput">meta_namespace</code>
+ reflecting the global scope the following holds true.
+ </p>
+<pre class="programlisting">
+BOOST_MPL_ASSERT((
+ mpl::empty <
+ BOOST_MIRRORED_GLOBAL_SCOPE()::ancestors
+ >
+));
+ </pre>
+<p>To find out whether a meta-namespace reflects the global scope
+ use the <code class="computeroutput">reflects_global_scope</code> template meta-function.
+ </p>
+</li>
+</ol></div>
+</div>
+<pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a name="id496009-bb"></a>base_name();</pre>
+<p>This static member function returns the base name of the
+ namespace reflected by a <code class="computeroutput">meta_namespace</code>.
+ For example the base namespace name "returned" by the invocation of
+ </p>
+<pre class="programlisting"><code class="computeroutput">BOOST_MIRRORED_NAMESPACE</code>(::boost::mirror) :: base_name()
+ </pre>
+<p>
+ is <code class="computeroutput">"mirror"</code>. When a full namespace name
+ <span class="bold"><strong>with</strong></span> the nested name specifier
+ is needed use the <code class="computeroutput">full_name</code> member function
+ instead.</p>
+<pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a name="id495967-bb"></a>full_name();</pre>
+<p>This static member function returns the full name of the
+ namespace reflected by a <code class="computeroutput">meta_namespace</code>
+ with the nested name specifier. For example:
+ </p>
+<pre class="programlisting"><code class="computeroutput">BOOST_MIRRORED_NAMESPACE</code>(::boost::mirror) :: full_name()
+ </pre>
+<p>
+ returns <code class="computeroutput">"::boost::mirror"</code>. When the base namespace name
+ <span class="bold"><strong>without</strong></span> the nested name specifier
+ is needed use the <code class="computeroutput">base_name</code> member function
+ instead.</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term">Notes:</span></p></td>
+<td><p>The first call to this function can be expensive
+ for deeply nested namespaces, because the name needs to be properly composed from
+ the base namespace names, which may
+ lead to multiple string concatenations. Subsequent calls to this member function
+ for a concrete specialization of meta_namespace
+ are usually much faster.
+ </p></td>
+</tr></tbody>
+</table></div>
+<pre class="literallayout"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>bool</strong></span> FullName>
+ <span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a name="id495913-bb"></a>get_name(::boost::mpl::bool_<FullName> full);</pre>
+<p>This static member template function returns either the base name
+ <span class="bold"><strong>without</strong></span> the nested name specifier
+ or the full name <span class="bold"><strong>with</strong></span> the
+ nested name specifier of the namespace reflected by this
+ <code class="computeroutput">meta_namespace</code>,
+ depending on the value of the template argument <code class="computeroutput">FullName</code>.
+ For example:
+ </p>
+<pre class="programlisting"><code class="computeroutput">BOOST_MIRRORED_NAMESPACE</code>(::boost::mirror) :: get_name(::boost::mpl::false_())
+ </pre>
+<p> is equivalent to calling the
+ <code class="computeroutput">base_name</code> member function and
+ returns simply <code class="computeroutput">"mirror"</code> and calling
+ </p>
+<pre class="programlisting"><code class="computeroutput">BOOST_MIRRORED_NAMESPACE</code>(::boost::mirror) :: get_name(::boost::mpl::true_())
+ </pre>
+<p> is equivalent to calling the
+ <code class="computeroutput">full_name</code> method which
+ returns <code class="computeroutput">"::boost::mirror"</code>.
+ </p>
+</div>
+</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 © 2008 Matúš Chochlík<p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> 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="../../mirror/reference.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mirror/reference.html#header.boost.mirror.meta_namespace.hpp"><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="meta_type.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/mirror/doc/html/boost/mirror/meta_type.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/boost/mirror/meta_type.html 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,293 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Class template meta_type</title>
+<link rel="stylesheet" href="../../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../../index.html" title="The Mirror library documentation">
+<link rel="up" href="../../mirror/reference.html#header.boost.mirror.meta_type.hpp" title="Header <boost/mirror/meta_type.hpp>">
+<link rel="prev" href="meta_namespace.html" title="Class template meta_namespace">
+<link rel="next" href="meta_class.html" title="Class template meta_class">
+</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="meta_namespace.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mirror/reference.html#header.boost.mirror.meta_type.hpp"><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="meta_class.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="refentry" lang="en">
+<a name="boost.mirror.meta_type"></a><div class="titlepage"></div>
+<div class="refnamediv">
+<h2><span class="refentrytitle">Class template meta_type</span></h2>
+<p>boost::mirror::meta_type — The purpose of this class template is to provide meta-data
+ about the reflected type, especially to allow to get the
+ base and full type name of the reflected type and to
+ get information about the scope inside of which this type
+ has been declared.
+ Although the specializations of <code class="computeroutput">meta_type</code>
+ template can be used directly to get the meta data about a particular type,
+ it is recomended to use the reflection macros like
+ <code class="computeroutput">BOOST_MIRRORED_TYPE(TYPE)</code> or
+ <code class="computeroutput">BOOST_MIRRORED_TYPEOF(EXPR)</code>
+ instead, to get the proper specializations of
+ <code class="computeroutput">meta_type</code>.
+ </p>
+</div>
+<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
+<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Type>
+<span class="bold"><strong>class</strong></span> <a class="link" href="meta_type.html" title="Class template meta_type">meta_type</a> {
+<span class="bold"><strong>public</strong></span>:
+ <span class="emphasis"><em>// <a class="link" href="meta_type.html#id495672-bbtypes">types</a></em></span>
+ <span class="bold"><strong>typedef</strong></span> Type <a class="link" href="meta_type.html#boost.mirror.meta_type.reflected_type">reflected_type</a>;
+ <span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a class="link" href="meta_type.html#boost.mirror.meta_type.scope">scope</a>;
+ <span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a class="link" href="meta_type.html#id495610-bb">base_name</a>();
+ <span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a class="link" href="meta_type.html#id495550-bb">full_name</a>();
+ <span class="bold"><strong>template</strong></span><<span class="bold"><strong>bool</strong></span> FullName>
+ <span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a class="link" href="meta_type.html#id495490-bb">get_name</a>(::boost::mpl::bool_<FullName>);
+};</pre></div>
+<div class="refsect1" lang="en">
+<a name="id671255"></a><h2>Description</h2>
+<p>The specializations of <code class="computeroutput">meta_type</code> can
+ be used to get meta-information about the reflected types, some at compile-time and some at run-time.
+ The following examples show type reflection and basic
+ <code class="computeroutput">meta_type</code> usage. Mirror works with the native C++ types
+ and some of the very common types like <code class="computeroutput">::std::string</code>, etc. out of the box.
+ Meta-types for many other types from the standard library and Boost
+ are also provided and can be <code class="computeroutput">#include</code>d when necessary.
+ </p>
+<div class="section" lang="en">
+<div class="titlepage"></div>
+<div class="toc"><dl>
+<dt><span class="section">Example - Basic usage</span></dt>
+<dt><span class="section">Example - Using with typeof and getting scope-related information</span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="mirror.meta_type.reference.sample01"></a>Example - Basic usage</h6></div></div></div>
+<p>This sample code shows how to reflect a type and how to get its full type name.
+ Since various specializations of <code class="computeroutput">::std::pair</code> are reflected,
+ the <code class="computeroutput">meta_type</code>s for this template need to be
+ included.
+ </p>
+<a name="mirror.reference.sample.meta_type.usage01"></a><pre class="programlisting">
+#include <boost/char_type_switch/iostream.hpp>
+#include <boost/mirror/meta_type.hpp>
+#include <boost/mirror/meta_types/std_pair.hpp>
+
+int main(void)
+{
+ using namespace ::std;
+ using namespace ::boost;
+ using namespace ::boost::mirror;
+
+ // define a little more complex type
+ typedef pair<const int*, double [654][321]> T1;
+ typedef pair<float, const ::std::string&> T2;
+ typedef pair<T1 const volatile, T2 volatile const> T3;
+ typedef pair<T2, T1 volatile> T4;
+ typedef T4 (T)(const T1&, T2, volatile T3*);
+
+ // reflect it using mirror
+ typedef BOOST_MIRRORED_TYPE(T) meta_T;
+
+ // print out the full type name
+ cts::bcout() <<
+ BOOST_CTS_LIT("The full type name is: ") <<
+ meta_T::full_name() <<
+ endl;
+
+ return 0;
+}
+</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h6 class="title">
+<a name="mirror.meta_type.reference.sample02"></a>Example - Using with typeof and getting scope-related information</h6></div></div></div>
+<p>The following example shows cooperation with the Typeof
+ library and scope-related operations.
+ </p>
+<a name="mirror.reference.sample.meta_type.usage02"></a><pre class="programlisting">
+
+#include <iostream>
+#include <string>
+#include <boost/typeof/typeof.hpp>
+#include <boost/mirror/meta_type.hpp>
+#include <boost/mirror/meta_types/std_pair.hpp>
+#include <boost/mirror/traits/reflects_global_scope.hpp>
+
+template <class MetaType>
+void print_meta_data(void)
+{
+ using namespace ::std;
+ using namespace ::boost;
+ using namespace ::boost::mirror;
+
+ // print out the base type name
+ wcout << "The type name is: "<< MetaType::base_name() << endl;
+ //
+ if(reflects_global_scope<MetaType::scope>::value)
+ wcout << "It's defined on the global scope" << endl;
+ else wcout <<
+ "It's defined in the " <<
+ MetaType::scope::full_name() <<
+ " namespace" << endl;
+ wcout << "--------------------------------------" << endl;
+}
+
+int main(void)
+{
+ using namespace ::std;
+ using namespace ::boost;
+ using namespace ::boost::mirror;
+
+ // reflect the type of an expression
+ // and print the meta-data
+ print_meta_data< BOOST_MIRRORED_TYPEOF(1+2) >();
+ print_meta_data< BOOST_MIRRORED_TYPEOF(1.0+2.0) >();
+ print_meta_data< BOOST_MIRRORED_TYPEOF("1" "+" "2") >();
+ print_meta_data< BOOST_MIRRORED_TYPEOF(string("1")+string("2")) >();
+
+ // BOOST_MIRRORED_TYPEOF is actually a shorter form of this:
+ print_meta_data< BOOST_MIRRORED_TYPE(
+ BOOST_TYPEOF(L"1" L"+" L"2")
+ ) >();
+ print_meta_data< BOOST_MIRRORED_TYPE(
+ BOOST_TYPEOF(wstring(L"1")+wstring(L"2"))
+ ) >();
+
+ return 0;
+}
+</pre>
+</div>
+</div>
+<div class="refsect2" lang="en">
+<a name="id671335"></a><h3>
+<a name="id495672-bbtypes"></a><code class="computeroutput">meta_type</code> public types</h3>
+<div class="orderedlist"><ol type="1">
+<li>
+<p>
+<span class="bold"><strong>typedef</strong></span> Type <a name="boost.mirror.meta_type.reflected_type"></a>reflected_type;</p>
+<p>The type reflected by this overload of <code class="computeroutput">meta_type</code>.
+ </p>
+</li>
+<li>
+<p>
+<span class="bold"><strong>typedef</strong></span> <span class="emphasis"><em>unspecified</em></span> <a name="boost.mirror.meta_type.scope"></a>scope;</p>
+<p>A meta-object describing the scope in which the reflected type
+ is defined. Depending on where the type has been defined <code class="computeroutput">scope</code>
+ can be either a specialization of <code class="computeroutput">meta_namespace</code>
+ or a specialization of <code class="computeroutput">meta_class</code>.
+ </p>
+</li>
+</ol></div>
+</div>
+<pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a name="id495610-bb"></a>base_name();</pre>
+<p>This static member function returns the base name of the
+ type reflected by <code class="computeroutput">meta_type</code>
+ without the nested name specifier. For example:
+ </p>
+<pre class="programlisting"><code class="computeroutput">BOOST_MIRRORED_TYPE</code>(::std::string) :: base_name()
+ </pre>
+<p> or
+ </p>
+<pre class="programlisting"><code class="computeroutput">meta_type</code> < ::std::string > :: base_name()
+ </pre>
+<p>
+ returns simply <code class="computeroutput">"string"</code>. When a full type name
+ <span class="bold"><strong>with</strong></span> the nested name specifier
+ is needed use the <code class="computeroutput">full_name</code> member function
+ instead.</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term">Notes:</span></p></td>
+<td><p>The first call to this function can be expensive
+ for derived types like pointers, references, cv-qualified
+ types, arrays etc. because the type name needs to be properly composed from
+ the base type name, which may depending on the complexity of the type
+ lead to multiple string concatenations. Subsequent calls to this member function
+ for a concrete specialization of meta_type
+ are usually much faster.
+ </p></td>
+</tr></tbody>
+</table></div>
+<pre class="literallayout"><span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a name="id495550-bb"></a>full_name();</pre>
+<p>This static member function returns the full name of the
+ type reflected by <code class="computeroutput">meta_type</code>
+ with the nested name specifier. For example:
+ </p>
+<pre class="programlisting"><code class="computeroutput">BOOST_MIRRORED_TYPE</code>(::std::string) :: full_name()
+ </pre>
+<p> or
+ </p>
+<pre class="programlisting"><code class="computeroutput">meta_type</code> < ::std::string > :: full_name()
+ </pre>
+<p>
+ returns <code class="computeroutput">"::std::string"</code>. When the base type name
+ <span class="bold"><strong>without</strong></span> the nested name specifier
+ is needed use the <code class="computeroutput">base_name</code> member function
+ instead.</p>
+<div class="variablelist"><table border="0">
+<col align="left" valign="top">
+<tbody><tr>
+<td><p><span class="term">Notes:</span></p></td>
+<td><p>The first call to this function can be expensive
+ for derived types like pointers, references, cv-qualified
+ types, arrays etc. because the type name needs to be properly composed from
+ the base type name, which may depending on the complexity of the type
+ lead to multiple string concatenations. Subsequent calls to this member function
+ for a concrete specialization of meta_type
+ are usually much faster.
+ </p></td>
+</tr></tbody>
+</table></div>
+<pre class="literallayout"><span class="bold"><strong>template</strong></span><<span class="bold"><strong>bool</strong></span> FullName>
+ <span class="type"><span class="bold"><strong>const</strong></span> cts::bstring&</span> <a name="id495490-bb"></a>get_name(::boost::mpl::bool_<FullName> full);</pre>
+<p>This static member template function returns either the base name
+ <span class="bold"><strong>without</strong></span> the nested name specifier
+ or the full name <span class="bold"><strong>with</strong></span> the
+ nested name specifier of the type reflected by this
+ <code class="computeroutput">meta_type</code>,
+ depending on the value of the template argument <code class="computeroutput">FullName</code>.
+ For example:
+ </p>
+<pre class="programlisting"><code class="computeroutput">BOOST_MIRRORED_TYPE</code>(::std::string) :: get_name(::boost::mpl::false_())</pre>
+<p> or
+ </p>
+<pre class="programlisting"><code class="computeroutput">meta_type</code> < ::std::string > :: get_name(::boost::mpl::false_())</pre>
+<p>
+ is equivalent to calling the
+ <code class="computeroutput">base_name</code> member function and
+ returns simply <code class="computeroutput">"string"</code> and
+ </p>
+<pre class="programlisting"><code class="computeroutput">BOOST_MIRRORED_TYPE</code>(::std::string) :: get_name(::boost::mpl::true_())</pre>
+<p> or
+ </p>
+<pre class="programlisting"><code class="computeroutput">meta_type</code> < ::std::string > :: get_name( ::boost::mpl::true_())</pre>
+<p> is equivalent to calling the
+ <code class="computeroutput">full_name</code> method which
+ returns <code class="computeroutput">"::std::string"</code>.
+ </p>
+</div>
+</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 © 2008 Matúš Chochlík<p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> 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="meta_namespace.html"><img src="../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../../mirror/reference.html#header.boost.mirror.meta_type.hpp"><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="meta_class.html"><img src="../../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/mirror/doc/html/boostbook.css
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/boostbook.css 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,588 @@
+/*=============================================================================
+ Copyright (c) 2004 Joel de Guzman
+ http://spirit.sourceforge.net/
+
+ Distributed under the Boost Software License, Version 1.0. (See accompany-
+ ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+=============================================================================*/
+
+/*=============================================================================
+ Body defaults
+=============================================================================*/
+
+ body
+ {
+ margin: 1em;
+ font-family: sans-serif;
+ }
+
+/*=============================================================================
+ Paragraphs
+=============================================================================*/
+
+ p
+ {
+ text-align: left;
+ font-size: 10pt;
+ line-height: 1.15;
+ }
+
+/*=============================================================================
+ Program listings
+=============================================================================*/
+
+ /* Code on paragraphs */
+ p tt.computeroutput
+ {
+ font-size: 9pt;
+ }
+
+ pre.synopsis
+ {
+ font-size: 90%;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ .programlisting,
+ .screen
+ {
+ font-size: 9pt;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ /* Program listings in tables don't get borders */
+ td .programlisting,
+ td .screen
+ {
+ margin: 0pc 0pc 0pc 0pc;
+ padding: 0pc 0pc 0pc 0pc;
+ }
+
+/*=============================================================================
+ Headings
+=============================================================================*/
+
+ h1, h2, h3, h4, h5, h6
+ {
+ text-align: left;
+ margin: 1em 0em 0.5em 0em;
+ font-weight: bold;
+ }
+
+ h1 { font: 140% }
+ h2 { font: bold 140% }
+ h3 { font: bold 130% }
+ h4 { font: bold 120% }
+ h5 { font: italic 110% }
+ h6 { font: italic 100% }
+
+ /* Top page titles */
+ title,
+ h1.title,
+ h2.title
+ h3.title,
+ h4.title,
+ h5.title,
+ h6.title,
+ .refentrytitle
+ {
+ font-weight: bold;
+ margin-bottom: 1pc;
+ }
+
+ h1.title { font-size: 140% }
+ h2.title { font-size: 140% }
+ h3.title { font-size: 130% }
+ h4.title { font-size: 120% }
+ h5.title { font-size: 110% }
+ h6.title { font-size: 100% }
+
+ .section h1
+ {
+ margin: 0em 0em 0.5em 0em;
+ font-size: 140%;
+ }
+
+ .section h2 { font-size: 140% }
+ .section h3 { font-size: 130% }
+ .section h4 { font-size: 120% }
+ .section h5 { font-size: 110% }
+ .section h6 { font-size: 100% }
+
+ /* Code on titles */
+ h1 tt.computeroutput { font-size: 140% }
+ h2 tt.computeroutput { font-size: 140% }
+ h3 tt.computeroutput { font-size: 130% }
+ h4 tt.computeroutput { font-size: 120% }
+ h5 tt.computeroutput { font-size: 110% }
+ h6 tt.computeroutput { font-size: 100% }
+
+/*=============================================================================
+ Author
+=============================================================================*/
+
+ h3.author
+ {
+ font-size: 100%
+ }
+
+/*=============================================================================
+ Lists
+=============================================================================*/
+
+ li
+ {
+ font-size: 10pt;
+ line-height: 1.3;
+ }
+
+ /* Unordered lists */
+ ul
+ {
+ text-align: left;
+ }
+
+ /* Ordered lists */
+ ol
+ {
+ text-align: left;
+ }
+
+/*=============================================================================
+ Links
+=============================================================================*/
+
+ a
+ {
+ text-decoration: none; /* no underline */
+ }
+
+ a:hover
+ {
+ text-decoration: underline;
+ }
+
+/*=============================================================================
+ Spirit style navigation
+=============================================================================*/
+
+ .spirit-nav
+ {
+ 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
+=============================================================================*/
+
+ .toc
+ {
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.1pc 1pc 0.1pc 1pc;
+ font-size: 80%;
+ line-height: 1.15;
+ }
+
+ .boost-toc
+ {
+ float: right;
+ padding: 0.5pc;
+ }
+
+/*=============================================================================
+ Tables
+=============================================================================*/
+
+ .table-title,
+ div.table p.title
+ {
+ margin-left: 4%;
+ padding-right: 0.5em;
+ padding-left: 0.5em;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ width: 92%;
+ margin-left: 4%;
+ margin-right: 4%;
+ }
+
+ div.informaltable table,
+ div.table table
+ {
+ padding: 4px;
+ }
+
+ /* Table Cells */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ padding: 0.5em;
+ text-align: left;
+ font-size: 9pt;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ padding: 0.5em 0.5em 0.5em 0.5em;
+ border: 1pt solid white;
+ 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
+=============================================================================*/
+
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ font-size: 9pt; /* A little bit smaller than the main text */
+ line-height: 1.2;
+ display: block;
+ margin: 1pc 4% 0pc 4%;
+ padding: 0.5pc 0.5pc 0.5pc 0.5pc;
+ }
+
+ p.blurb img
+ {
+ padding: 1pt;
+ }
+
+/*=============================================================================
+ Variable Lists
+=============================================================================*/
+
+ /* Make the terms in definition lists bold */
+ div.variablelist dl dt,
+ span.term
+ {
+ font-weight: bold;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td
+ {
+ text-align: left;
+ vertical-align: top;
+ padding: 0em 2em 0em 0em;
+ font-size: 10pt;
+ margin: 0em 0em 0.5em 0em;
+ line-height: 1;
+ }
+
+ div.variablelist dl dt
+ {
+ margin-bottom: 0.2em;
+ }
+
+ div.variablelist dl dd
+ {
+ margin: 0em 0em 0.5em 2em;
+ font-size: 10pt;
+ }
+
+ div.variablelist table tbody tr td p,
+ div.variablelist dl dd p
+ {
+ margin: 0em 0em 0.5em 0em;
+ line-height: 1;
+ }
+
+/*=============================================================================
+ Misc
+=============================================================================*/
+
+ /* Title of books and articles in bibliographies */
+ span.title
+ {
+ font-style: italic;
+ }
+
+ span.underline
+ {
+ text-decoration: underline;
+ }
+
+ span.strikethrough
+ {
+ text-decoration: line-through;
+ }
+
+ /* Copyright, Legal Notice */
+ div div.legalnotice p
+ {
+ text-align: left
+ }
+
+/*=============================================================================
+ Colors
+=============================================================================*/
+
+ @media screen
+ {
+ body {
+ background-color: #FFFFFF;
+ }
+
+ /* Links */
+ a
+ {
+ color: #005a9c;
+ }
+
+ a:visited
+ {
+ color: #9c5a9c;
+ }
+
+ h1 a, h2 a, h3 a, h4 a, h5 a, h6 a,
+ h1 a:hover, h2 a:hover, h3 a:hover, h4 a:hover, h5 a:hover, h6 a:hover,
+ h1 a:visited, h2 a:visited, h3 a:visited, h4 a:visited, h5 a:visited, h6 a:visited
+ {
+ text-decoration: none; /* no underline */
+ color: #000000;
+ }
+
+ /* Syntax Highlighting */
+ .keyword { color: #0000AA; }
+ .identifier { color: #000000; }
+ .special { color: #707070; }
+ .preprocessor { color: #402080; }
+ .char { color: teal; }
+ .comment { color: #800000; }
+ .string { color: teal; }
+ .number { color: teal; }
+ .white_bkd { background-color: #FFFFFF; }
+ .dk_grey_bkd { background-color: #999999; }
+
+ /* Copyright, Legal Notice */
+ .copyright
+ {
+ color: #666666;
+ font-size: small;
+ }
+
+ div div.legalnotice p
+ {
+ color: #666666;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ td .programlisting,
+ td .screen
+ {
+ border: 0px solid #DCDCDC;
+ }
+
+ /* Blurbs */
+ div.note,
+ div.tip,
+ div.important,
+ div.caution,
+ div.warning,
+ p.blurb
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid #DCDCDC;
+ }
+
+ 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 */
+ a
+ {
+ color: black;
+ }
+
+ a:visited
+ {
+ color: black;
+ }
+
+ .spirit-nav
+ {
+ display: none;
+ }
+
+ /* Program listing */
+ pre.synopsis
+ {
+ border: 1px solid gray;
+ }
+
+ .programlisting,
+ .screen
+ {
+ border: 1px solid gray;
+ }
+
+ td .programlisting,
+ td .screen
+ {
+ border: 0px solid #DCDCDC;
+ }
+
+ /* Table of contents */
+ .toc
+ {
+ border: 1px solid gray;
+ }
+
+ .informaltable table,
+ .table table
+ {
+ border: 1px solid gray;
+ border-collapse: collapse;
+ }
+
+ /* Tables */
+ div.informaltable table tr td,
+ div.table table tr td
+ {
+ border: 1px solid gray;
+ }
+
+ div.informaltable table tr th,
+ div.table table tr th
+ {
+ border: 1px solid gray;
+ }
+
+ table.simplelist tr td
+ {
+ border: none !important;
+ }
+
+ /* Misc */
+ span.highlight
+ {
+ font-weight: bold;
+ }
+ }
+
+/*=============================================================================
+ Images
+=============================================================================*/
+
+ span.inlinemediaobject img
+ {
+ vertical-align: middle;
+ }
+
+/*==============================================================================
+ 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;
+}
+
Added: sandbox/mirror/doc/html/doc_HTML.manifest
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/doc_HTML.manifest 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,9 @@
+index.html
+about.html
+libraries.html
+mirror.html
+mirror/tutorial.html
+mirror/reference.html
+boost/mirror/meta_namespace.html
+boost/mirror/meta_type.html
+boost/mirror/meta_class.html
Added: sandbox/mirror/doc/html/docutils.css
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/docutils.css 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,275 @@
+/*
+:Author: David Goodger
+:Contact: goodger_at_[hidden]
+:Date: $Date: 2007-11-25 14:34:32 -0500 (Sun, 25 Nov 2007) $
+:Revision: $Revision: 41371 $
+:Copyright: This stylesheet has been placed in the public domain.
+
+Default cascading style sheet for the HTML output of Docutils.
+
+See http://docutils.sf.net/docs/howto/html-stylesheets.html for how to
+customize this style sheet.
+*/
+
+/* used to remove borders from tables and images */
+.borderless, table.borderless td, table.borderless th {
+ border: 0 }
+
+table.borderless td, table.borderless th {
+ /* Override padding for "table.docutils td" with "! important".
+ The right padding separates the table cells. */
+ padding: 0 0.5em 0 0 ! important }
+
+.first {
+ /* Override more specific margin styles with "! important". */
+ margin-top: 0 ! important }
+
+.last, .with-subtitle {
+ margin-bottom: 0 ! important }
+
+.hidden {
+ display: none }
+
+a.toc-backref {
+ text-decoration: none ;
+ color: black }
+
+blockquote.epigraph {
+ margin: 2em 5em ; }
+
+dl.docutils dd {
+ margin-bottom: 0.5em }
+
+/* Uncomment (and remove this text!) to get bold-faced definition list terms
+dl.docutils dt {
+ font-weight: bold }
+*/
+
+div.abstract {
+ margin: 2em 5em }
+
+div.abstract p.topic-title {
+ font-weight: bold ;
+ text-align: center }
+
+div.admonition, div.attention, div.caution, div.danger, div.error,
+div.hint, div.important, div.note, div.tip, div.warning {
+ margin: 2em ;
+ border: medium outset ;
+ padding: 1em }
+
+div.admonition p.admonition-title, div.hint p.admonition-title,
+div.important p.admonition-title, div.note p.admonition-title,
+div.tip p.admonition-title {
+ font-weight: bold ;
+ font-family: sans-serif }
+
+div.attention p.admonition-title, div.caution p.admonition-title,
+div.danger p.admonition-title, div.error p.admonition-title,
+div.warning p.admonition-title {
+ color: red ;
+ font-weight: bold ;
+ font-family: sans-serif }
+
+/* Uncomment (and remove this text!) to get reduced vertical space in
+ compound paragraphs.
+div.compound .compound-first, div.compound .compound-middle {
+ margin-bottom: 0.5em }
+
+div.compound .compound-last, div.compound .compound-middle {
+ margin-top: 0.5em }
+*/
+
+div.dedication {
+ margin: 2em 5em ;
+ text-align: center ;
+ font-style: italic }
+
+div.dedication p.topic-title {
+ font-weight: bold ;
+ font-style: normal }
+
+div.figure {
+ margin-left: 2em ;
+ margin-right: 2em }
+
+div.footer, div.header {
+ clear: both;
+ font-size: smaller }
+
+div.line-block {
+ display: block ;
+ margin-top: 1em ;
+ margin-bottom: 1em }
+
+div.line-block div.line-block {
+ margin-top: 0 ;
+ margin-bottom: 0 ;
+ margin-left: 1.5em }
+
+div.sidebar {
+ margin-left: 1em ;
+ border: medium outset ;
+ padding: 1em ;
+ background-color: #ffffee ;
+ width: 40% ;
+ float: right ;
+ clear: right }
+
+div.sidebar p.rubric {
+ font-family: sans-serif ;
+ font-size: medium }
+
+div.system-messages {
+ margin: 5em }
+
+div.system-messages h1 {
+ color: red }
+
+div.system-message {
+ border: medium outset ;
+ padding: 1em }
+
+div.system-message p.system-message-title {
+ color: red ;
+ font-weight: bold }
+
+div.topic {
+ margin: 2em }
+
+h1.section-subtitle, h2.section-subtitle, h3.section-subtitle,
+h4.section-subtitle, h5.section-subtitle, h6.section-subtitle {
+ margin-top: 0.4em }
+
+h1.title {
+ text-align: center }
+
+h2.subtitle {
+ text-align: center }
+
+hr.docutils {
+ width: 75% }
+
+img.align-left {
+ clear: left }
+
+img.align-right {
+ clear: right }
+
+ol.simple, ul.simple {
+ margin-bottom: 1em }
+
+ol.arabic {
+ list-style: decimal }
+
+ol.loweralpha {
+ list-style: lower-alpha }
+
+ol.upperalpha {
+ list-style: upper-alpha }
+
+ol.lowerroman {
+ list-style: lower-roman }
+
+ol.upperroman {
+ list-style: upper-roman }
+
+p.attribution {
+ text-align: right ;
+ margin-left: 50% }
+
+p.caption {
+ font-style: italic }
+
+p.credits {
+ font-style: italic ;
+ font-size: smaller }
+
+p.label {
+ white-space: nowrap }
+
+p.rubric {
+ font-weight: bold ;
+ font-size: larger ;
+ color: maroon ;
+ text-align: center }
+
+p.sidebar-title {
+ font-family: sans-serif ;
+ font-weight: bold ;
+ font-size: larger }
+
+p.sidebar-subtitle {
+ font-family: sans-serif ;
+ font-weight: bold }
+
+p.topic-title {
+ font-weight: bold }
+
+pre.address {
+ margin-bottom: 0 ;
+ margin-top: 0 ;
+ font-family: serif ;
+ font-size: 100% }
+
+pre.literal-block, pre.doctest-block {
+ margin-left: 2em ;
+ margin-right: 2em }
+
+span.classifier {
+ font-family: sans-serif ;
+ font-style: oblique }
+
+span.classifier-delimiter {
+ font-family: sans-serif ;
+ font-weight: bold }
+
+span.interpreted {
+ font-family: sans-serif }
+
+span.option {
+ white-space: nowrap }
+
+span.pre {
+ white-space: pre }
+
+span.problematic {
+ color: red }
+
+span.section-subtitle {
+ /* font-size relative to parent (h1..h6 element) */
+ font-size: 80% }
+
+table.citation {
+ border-left: solid 1px gray;
+ margin-left: 1px }
+
+table.docinfo {
+ margin: 2em 4em }
+
+table.docutils {
+ margin-top: 0.5em ;
+ margin-bottom: 0.5em }
+
+table.footnote {
+ border-left: solid 1px black;
+ margin-left: 1px }
+
+table.docutils td, table.docutils th,
+table.docinfo td, table.docinfo th {
+ padding-left: 0.5em ;
+ padding-right: 0.5em ;
+ vertical-align: top }
+
+table.docutils th.field-name, table.docinfo th.docinfo-name {
+ font-weight: bold ;
+ text-align: left ;
+ white-space: nowrap ;
+ padding-left: 0 }
+
+h1 tt.docutils, h2 tt.docutils, h3 tt.docutils,
+h4 tt.docutils, h5 tt.docutils, h6 tt.docutils {
+ font-size: 100% }
+
+ul.auto-toc {
+ list-style-type: none }
Added: sandbox/mirror/doc/html/images/blank.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/caution.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/draft.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/home.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/important.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/next.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/next_disabled.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/note.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/prev.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/prev_disabled.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/tip.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/toc-blank.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/toc-minus.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/toc-plus.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/up.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/up_disabled.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/images/warning.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/index.html 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,43 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>The Mirror library documentation</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="The Mirror library documentation">
+<link rel="next" href="about.html" title="About this document">
+</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="n" href="about.html"><img src="../../doc/html/images/next.png" alt="Next"></a></div>
+<div class="book" lang="en">
+<div class="titlepage">
+<div><div><h1 class="title">
+<a name="id568709"></a>The Mirror library documentation</h1></div></div>
+<hr>
+</div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="preface">About this document</span></dt>
+<dt><span class="part">I. The Mirror library</span></dt>
+<dd><dl><dt><span class="chapter">1. Mirror</span></dt></dl></dd>
+</dl>
+</div>
+</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"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav"><a accesskey="n" href="about.html"><img src="../../doc/html/images/next.png" alt="Next"></a></div>
+</body>
+</html>
Added: sandbox/mirror/doc/html/libraries.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/libraries.html 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,49 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Part I. The Mirror library</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="The Mirror library documentation">
+<link rel="up" href="index.html" title="The Mirror library documentation">
+<link rel="prev" href="about.html" title="About this document">
+<link rel="next" href="mirror.html" title="Chapter 1. Mirror">
+</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="about.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="mirror.html"><img src="../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="part" lang="en">
+<div class="titlepage"><div><div><h1 class="title">
+<a name="libraries"></a>Part I. The Mirror library</h1></div></div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="chapter">1. Mirror</span></dt>
+<dd><dl>
+<dt><span class="section">Introduction</span></dt>
+<dt><span class="section">Tutorial</span></dt>
+<dt><span class="section">Mirror Reference</span></dt>
+</dl></dd>
+</dl>
+</div>
+</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"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="about.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="mirror.html"><img src="../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/mirror/doc/html/mirror.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/mirror.html 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,337 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Chapter 1. Mirror</title>
+<link rel="stylesheet" href="boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="index.html" title="The Mirror library documentation">
+<link rel="up" href="libraries.html" title="Part I. The Mirror library">
+<link rel="prev" href="libraries.html" title="Part I. The Mirror library">
+<link rel="next" href="mirror/tutorial.html" title="Tutorial">
+</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="libraries.html"><img src="../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.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="mirror/tutorial.html"><img src="../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="chapter" lang="en">
+<div class="titlepage"><div>
+<div><h2 class="title">
+<a name="mirror"></a>Chapter 1. Mirror</h2></div>
+<div><div class="author">
+<h3 class="author">
+<span class="firstname">Matúš</span> <span class="surname">Chochlík</span>
+</h3>
+<code class="email"><<a class="email" href="mailto:chochlik%20-at-%20gmail.com">chochlik -at- gmail.com</a>></code><code class="email"><<a class="email" href="mailto:Matus.Chochlik%20-at-%20fri.uniza.sk">Matus.Chochlik -at- fri.uniza.sk</a>></code>
+</div></div>
+<div><p class="copyright">Copyright © 2008 Matúš Chochlík</p></div>
+<div><div class="legalnotice">
+<a name="id670193"></a><p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> or copy at http://www.boost.org/LICENSE_1_0.txt)
+ </p>
+</div></div>
+</div></div>
+<div class="toc">
+<p><b>Table of Contents</b></p>
+<dl>
+<dt><span class="section">Introduction</span></dt>
+<dd><dl>
+<dt><span class="section">Abstract</span></dt>
+<dt><span class="section">Motivation</span></dt>
+</dl></dd>
+<dt><span class="section">Tutorial</span></dt>
+<dt><span class="section">Mirror Reference</span></dt>
+<dd><dl>
+<dt><span class="section">Header <boost/mirror/meta_namespace.hpp></span></dt>
+<dt><span class="section">Header <boost/mirror/meta_type.hpp></span></dt>
+<dt><span class="section">Header <boost/mirror/meta_class.hpp></span></dt>
+</dl></dd>
+</dl>
+</div>
+<div class="note"><table border="0" summary="Note">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Note]" src="../../doc/html/images/note.png"></td>
+<th align="left">Note</th>
+</tr>
+<tr><td align="left" valign="top"><p>The documentation is far from being complete and does not cover every feature
+ already implemented, yet.
+ </p></td></tr>
+</table></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="mirror.intro"></a>Introduction</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Abstract</span></dt>
+<dt><span class="section">Motivation</span></dt>
+</dl></div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="mirror.abstract"></a>Abstract</h3></div></div></div>
+<p>
+ The aim of the <a class="link" href="mirror.html" title="Chapter 1. Mirror">Mirror</a> library is to provide
+ useful meta-data at both compile-time and run-time about common
+ C++ constructs like namespaces, types
+ (and as an important special case <code class="computeroutput">typedef</code>-ined types),
+ classes and their base classes and member attributes, instances, etc. and to
+ provide uniform and generic interfaces for their introspection.
+</p>
+<p>
+ Because standard C++ provides only a very limited set of meta-information
+ to build upon, the main drawback of this library is, that namespace, types, classes, etc.
+ need to be registered before they can be reflected.
+ However <a class="link" href="mirror.html" title="Chapter 1. Mirror">Mirror</a> tries to make the process of
+ registering simple by providing a set of user-friendly registering macros
+ and has the native and many of the other common types, classes, templates and
+ namespaces pre-registered.
+</p>
+<p>
+ <a class="link" href="mirror.html" title="Chapter 1. Mirror">Mirror</a> is designed with the principle of stratification
+ in mind and tries to be as less intrusive as possible. New classes do not need
+ to be designed to directly support <a class="link" href="mirror.html" title="Chapter 1. Mirror">Mirror</a>
+ and no <a class="link" href="mirror.html" title="Chapter 1. Mirror">Mirror</a> related code is necessary
+ in the class' definition, as far as some general guidelines are followed
+ (the exceptions to this are explained here).
+</p>
+<p>
+ Most important features of the <a class="link" href="mirror.html" title="Chapter 1. Mirror">Mirror</a> library
+ that are currently implemented include:
+</p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Namespace-name inspection. Both the base and fully qualified namespace
+ names are supported.
+ </li>
+<li>
+ Inspection of the whole scope in which a namespace is defined (global
+ scope or nested in another namespace).
+ </li>
+<li>
+ Type-name querying, with the support for <code class="computeroutput">typedef</code>-ined
+ typenames and typenames of derived types like pointers, references,
+ cv-qualified types, arrays, functions and template names. Names
+ with or without nested-name-specifiers can be queried.
+ </li>
+<li>
+ Inspection of the scope in which a type has been defined (global-scope,
+ in a namespace, inside of a class)
+ </li>
+<li>
+ Unform and generic inspection of class' base classes. One can inspect
+ traits of the base classes for example their types, whether they are inherited
+ virtually or not and the access specifier (<code class="computeroutput">private</code>, <code class="computeroutput">protected</code>,
+ <code class="computeroutput">public</code>).
+ </li>
+<li>
+ Unform and generic inspection of class' member attributes either just those defined
+ directly in the reflected class or inherited from it's base-classes.
+ At compile-time the count of class' attributes and their types, storage class
+ specifiers (<code class="computeroutput">static</code>, <code class="computeroutput">mutable</code>) and some other traits
+ can be queried.
+ At run-time one can uniformly query the names and/or values (when given
+ an instance of the reflected class) of the member attributes and
+ sequentially execute a custom functor on every attribute of a class.
+ </li>
+<li>
+ Traversals of a class' (or generally type's) structure with user defined visitors,
+ which are optionally working on an provided instance of the type
+ or just on it's structure without any run-time data.
+ These visitors are guided by <a class="link" href="mirror.html" title="Chapter 1. Mirror">Mirror</a> through
+ the structure of the class and optionally provided with contextual
+ information about the current position in the traversal.
+ </li>
+</ul></div>
+<p>
+ Most important <span class="bold"><strong>planned</strong></span> features include:
+</p>
+<div class="itemizedlist"><ul type="disc">
+<li>
+ Facility for generating customizable object factories with a uniform interface.
+ </li>
+<li>
+ Facility for generating customizable class method dispatchers, allowing
+ to construct the arguments and call any member function on an instance
+ of a class registered with <a class="link" href="mirror.html" title="Chapter 1. Mirror">Mirror</a>, through
+ a uniform interface.
+ </li>
+</ul></div>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="mirror.motivation"></a>Motivation</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Problem - Querying typenames</span></dt>
+<dt><span class="section">Problem - Uniform access to member attributes of a class' instance</span></dt>
+</dl></div>
+<p>
+ Here are described some of the recurring situations where the facilities
+ provided by <a class="link" href="mirror.html" title="Chapter 1. Mirror">Mirror</a> are helpful.
+</p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="mirror.motivation.problem.typenames"></a>Problem - Querying typenames</h4></div></div></div>
+<p>
+ There are applications which need to get and then somehow process
+ the name of a given type. One example is a logging facility where
+ some of the messages may contain names of types. This is very helpful
+ for example if one wants to log something in a template function and wants
+ to distinguish between various instantiations in the logs. In this case
+ it is very useful if the type name that goes into the log is human-readable
+ and preferrably corresponding to the typename used in the source code.
+ A rather naive implementation could look as follows:
+ </p>
+<pre class="programlisting">
+#include <iostream>
+
+::std::ostream& log = ::std::cerr;
+using ::std::endl;
+
+// a template function that returns the name
+// of the passed type
+template < typename T >
+const char* get_typename(void);
+
+
+template < typename A, typename B, typename C >
+void foo(A a, B b, C c)
+{
+ log <<
+ "entering foo(" <<
+ get_typename<A>() <<
+ ", " <<
+ get_typename<B>() <<
+ ", " <<
+ get_typename<C>() <<
+ ")" <<
+ endl;
+ // do something useful
+ log <<
+ "leaving foo(" <<
+ get_typename<A>() <<
+ ", " <<
+ get_typename<B>() <<
+ ", " <<
+ get_typename<C>() <<
+ ")" <<
+ endl;
+}
+
+int main(void)
+{
+ foo('A', "B", 0xC);
+ foo(0xAL, ::std::string("B"), L'C');
+ return 0;
+}
+</pre>
+<p>
+ Another application might want to store its data in a format where the typenames
+ are included (for example as attributes of an XML element) to be able to do
+ additional checking when loading the data. In this case the type name must be unique
+ and usually also portable. In addition if the data files are user-editable,
+ the names of the types should be human-readable.
+ </p>
+<p>
+ Yet another example is a generic application that does some C++ source code generation.
+ In this case the typenames in the output need to correspond to C++ typenames.
+ </p>
+<p>
+ Maybe the first, obvious choice if one needs to find out what the name of a given type is is to
+ use the <code class="computeroutput">typeid</code> operator and call the <code class="computeroutput">name()</code> function
+ on the returned reference to <code class="computeroutput">type_info</code>. The implementation of our
+ <code class="computeroutput">get_typename<T>()</code> function from the previous sample code
+ could be following:
+ </p>
+<pre class="programlisting">
+#include <typeinfo>
+
+// a template function that returns the name
+// of the passed type
+template < typename T >
+const char* get_typename(void)
+{
+ return typeid(T).name();
+}
+
+</pre>
+<p>
+ There are however, several problems with is approach.
+ The notoriously known issue of <code class="computeroutput">type_info::name()</code> is that the string
+ returned by this function is implementation-defined and compilers are free
+ to return anything from an empty string, through a mangled typename to a correctly
+ formatted typename and many of them enjoy this freedom to its full extent.
+ Thus the returned name is not guarenteed to be unique nor human readable or
+ easily understandable, nor is it portable.
+ Some compilers provide functions that demangle the names returned by
+ <code class="computeroutput">type_info::name()</code>, but again this is not very portable.
+ </p>
+<p>
+ One possible solution is the standardisation of the result of <code class="computeroutput">typeid(T).name()</code>
+ or introduction of a new standard member function to the <code class="computeroutput">type_info</code> structure
+ for example <code class="computeroutput">type_info::std_name()</code>,
+ that would return human-readable, unique, portable typenames preferrably corresponding
+ to the C++ typenames.
+ Obviously, until that happens we need to stick to another solution.
+ </p>
+<p>
+ To complicate things even more, we might want to get the base name of the type
+ without the nested-name-specifier (<code class="computeroutput">basic_string</code> vs.
+ <code class="computeroutput">::std::basic_string</code>) and to get the nested-name-specifier
+ or even the individual names of the enclosing namespaces or classes
+ separatelly.
+ </p>
+<p>
+ This is when <a class="link" href="mirror.html" title="Chapter 1. Mirror">Mirror</a> comes in handy. One of the basic
+ facilities is the <code class="computeroutput">::boost::mirror::meta_type</code> template.
+ Among other things this template has two member functions - <code class="computeroutput">base_name</code>
+ and <code class="computeroutput">full_name</code> that return the base type name without the nested
+ name specifier and the full type name with the nested name specifier respectively.
+ The names returned by these functions correspond to the C++ typenames, thus
+ are human-readable, unique (if using the <code class="computeroutput">full_name</code> member function)
+ and portable.
+ </p>
+<p>
+ Using <code class="computeroutput">meta_type</code> the <code class="computeroutput">get_typename<T>()</code>
+ function could look like this:
+ </p>
+<pre class="programlisting">
+#include <boost/mirror/meta_type.hpp>
+
+template < typename T >
+const char* get_typename(void)
+{
+ // The BOOST_MIRRORED_TYPE macro expands into
+ // the proper specialization of meta_type
+ // reflecting the passed type
+ return BOOST_MIRRORED_TYPE(T)::full_name().c_str();
+}
+
+</pre>
+<p>
+ With native C++ types and some common types from the STL
+ and from Boost the <code class="computeroutput">meta_type</code>
+ works out of the box.
+ </p>
+</div>
+<div class="section" lang="en"><div class="titlepage"><div><div><h4 class="title">
+<a name="mirror.motivation.problem.uniformmemattaccess"></a>Problem - Uniform access to member attributes of a class' instance</h4></div></div></div></div>
+</div>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"><p><small>Last revised: July 11, 2008 at 11:11:00 +0200</small></p></td>
+<td align="right"><div class="copyright-footer"></div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="libraries.html"><img src="../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="libraries.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="mirror/tutorial.html"><img src="../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/mirror/doc/html/mirror/reference.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/mirror/reference.html 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,76 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Mirror Reference</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="The Mirror library documentation">
+<link rel="up" href="../mirror.html" title="Chapter 1. Mirror">
+<link rel="prev" href="tutorial.html" title="Tutorial">
+<link rel="next" href="../boost/mirror/meta_namespace.html" title="Class template meta_namespace">
+</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/prev.png" alt="Prev"></a><a accesskey="u" href="../mirror.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="../boost/mirror/meta_namespace.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="mirror.reference"></a>Mirror Reference</h2></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section">Header <boost/mirror/meta_namespace.hpp></span></dt>
+<dt><span class="section">Header <boost/mirror/meta_type.hpp></span></dt>
+<dt><span class="section">Header <boost/mirror/meta_class.hpp></span></dt>
+</dl></div>
+<p>
+ </p>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="header.boost.mirror.meta_namespace.hpp"></a>Header <boost/mirror/meta_namespace.hpp></h3></div></div></div>
+<pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost {
+ <span class="bold"><strong>namespace</strong></span> mirror {
+ <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> NamespacePlaceholder> <span class="bold"><strong>class</strong></span> <a class="link" href="../boost/mirror/meta_namespace.html" title="Class template meta_namespace">meta_namespace</a>;
+ }
+}</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="header.boost.mirror.meta_type.hpp"></a>Header <boost/mirror/meta_type.hpp></h3></div></div></div>
+<pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost {
+ <span class="bold"><strong>namespace</strong></span> mirror {
+ <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Type> <span class="bold"><strong>class</strong></span> <a class="link" href="../boost/mirror/meta_type.html" title="Class template meta_type">meta_type</a>;
+ }
+}</pre>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="header.boost.mirror.meta_class.hpp"></a>Header <boost/mirror/meta_class.hpp></h3></div></div></div>
+<pre class="synopsis"><span class="bold"><strong>namespace</strong></span> boost {
+ <span class="bold"><strong>namespace</strong></span> mirror {
+ <span class="bold"><strong>template</strong></span><<span class="bold"><strong>typename</strong></span> Class> <span class="bold"><strong>class</strong></span> <a class="link" href="../boost/mirror/meta_class.html" title="Class template meta_class">meta_class</a>;
+ }
+}</pre>
+</div>
+</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 © 2008 Matúš Chochlík<p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> 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="../mirror.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="../boost/mirror/meta_namespace.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/mirror/doc/html/mirror/tutorial.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/mirror/tutorial.html 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,44 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<title>Tutorial</title>
+<link rel="stylesheet" href="../boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.73.2">
+<link rel="start" href="../index.html" title="The Mirror library documentation">
+<link rel="up" href="../mirror.html" title="Chapter 1. Mirror">
+<link rel="prev" href="../mirror.html" title="Chapter 1. Mirror">
+<link rel="next" href="reference.html" title="Mirror Reference">
+</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="../mirror.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mirror.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="reference.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+<div class="section" lang="en">
+<div class="titlepage"><div><div><h2 class="title" style="clear: both">
+<a name="mirror.tutorial"></a>Tutorial</h2></div></div></div>
+<p>
+ </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 © 2008 Matúš Chochlík<p>Use, modification and distribution is subject to the Boost
+ Software License, Version 1.0. (See accompanying file
+ <code class="filename">LICENSE_1_0.txt</code> 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="../mirror.html"><img src="../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../mirror.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="reference.html"><img src="../../../doc/html/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>
Added: sandbox/mirror/doc/html/reference.css
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/reference.css 2008-07-15 07:27:55 EDT (Tue, 15 Jul 2008)
@@ -0,0 +1,11 @@
+/*============================================================================
+ Copyright 2003-2004 Douglas Gregor
+ Distributed under the Boost Software License, Version 1.0. (See accompany-
+ ing file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+============================================================================*/
+
+PRE.synopsis {
+ background-color: #e0ffff;
+ border: thin solid blue;
+ padding: 1em
+}
\ 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