$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: chochlik_at_[hidden]
Date: 2008-04-15 12:29:49
Author: matus.chochlik
Date: 2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
New Revision: 44430
URL: http://svn.boost.org/trac/boost/changeset/44430
Log:
Mainly added documentation and documentation-related files and directories and fixed minor things in several header files.
Added:
   sandbox/mirror/libs/
   sandbox/mirror/libs/boost.png   (contents, props changed)
   sandbox/mirror/libs/doc/
   sandbox/mirror/libs/doc/html/
   sandbox/mirror/libs/doc/html/index.html   (contents, props changed)
   sandbox/mirror/libs/doc/xml/
   sandbox/mirror/libs/doc/xml/mirror/
   sandbox/mirror/libs/doc/xml/mirror/_library.xml   (contents, props changed)
   sandbox/mirror/libs/doc/xml/mirror/pages/
   sandbox/mirror/libs/doc/xml/mirror/pages/index.xml   (contents, props changed)
   sandbox/mirror/libs/doc/xml/mirror/sections/
   sandbox/mirror/libs/doc/xml/mirror/sections/goals.xml   (contents, props changed)
   sandbox/mirror/libs/doc/xml/mirror/sections/overview.xml   (contents, props changed)
   sandbox/mirror/libs/doc/xml/mirror/sections/reference/
   sandbox/mirror/libs/doc/xml/xslt/
   sandbox/mirror/libs/doc/xml/xslt/html/
   sandbox/mirror/libs/doc/xml/xslt/html.xsl   (contents, props changed)
   sandbox/mirror/libs/doc/xml/xslt/html/boost_refs.xsl   (contents, props changed)
   sandbox/mirror/libs/doc/xml/xslt/html/doc_page.xsl   (contents, props changed)
   sandbox/mirror/libs/doc/xml/xslt/html/include.xsl   (contents, props changed)
   sandbox/mirror/libs/doc/xml/xslt/html/lib_refs.xsl   (contents, props changed)
   sandbox/mirror/libs/doc/xml/xslt/html/note.xsl   (contents, props changed)
   sandbox/mirror/libs/doc/xml/xslt/html/paragraph.xsl   (contents, props changed)
   sandbox/mirror/libs/doc/xml/xslt/html/section.xsl   (contents, props changed)
   sandbox/mirror/libs/examples/
   sandbox/mirror/libs/test/
Text files modified: 
   sandbox/mirror/boost/mirror/meta_attribs_base.hpp |     8 ++++----                                
   sandbox/mirror/boost/mirror/meta_class.hpp        |    18 ++++++++++++++----                      
   sandbox/mirror/boost/mirror/meta_inheritance.hpp  |     4 ++--                                    
   3 files changed, 20 insertions(+), 10 deletions(-)
Modified: sandbox/mirror/boost/mirror/meta_attribs_base.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/meta_attribs_base.hpp	(original)
+++ sandbox/mirror/boost/mirror/meta_attribs_base.hpp	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -21,17 +21,17 @@
 
 /** Defaut (empty) list of base attributes of a meta class
  */
-template <class the_class>
+template <class the_class, class variant_tag = detail::default_meta_class_variant>
 struct meta_class_attributes
 {
         typedef mpl::vector<> type_list;
 };
 
-/** This macro should start the declaration of attributes
+/** This macro starts the declaration of member attributes
  *  of the given class
  */
 #define BOOST_MIRROR_REG_CLASS_ATTRIBS_BEGIN(THE_CLASS) \
-	template <> struct meta_class_attributes<THE_CLASS> \
+	template <> struct meta_class_attributes<THE_CLASS, detail::default_meta_class_variant> \
         { \
                 typedef THE_CLASS the_class; \
                 typedef mpl::vector<> 
@@ -60,7 +60,7 @@
         static call_traits<TYPE>::param_type get(const the_class& context, mpl::int_<NUMBER>)\
         {\
                 return context.NAME;\
-	} \
+	}\
         static TYPE& query(const the_class& context, mpl::int_<NUMBER>, TYPE& dest)\
         {\
                 dest = context.NAME;\
Modified: sandbox/mirror/boost/mirror/meta_class.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/meta_class.hpp	(original)
+++ sandbox/mirror/boost/mirror/meta_class.hpp	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -20,20 +20,30 @@
 namespace boost {
 namespace mirror {
 
+namespace detail {
+
+	/** Because one class can have several different meta_classes 
+	 *  we require some means to distinguish between them when
+	 *  selecting the proper meta_class<> template instantiation.
+	 *  This type is used to mark the default meta-class variant.
+	 */ 
+	struct default_meta_class_variant;
+} //namespace detail
+
 /** Meta class - specializes the meta_type for classes
  */
-template <class a_class>
+template <class a_class, class variant_tag = detail::default_meta_class_variant>
 struct meta_class : public meta_type<a_class>
 {
-	typedef typename meta_base_classes<a_class>::list base_classes;
-	typedef typename meta_class_attributes<a_class> attributes;
+	typedef typename meta_base_classes<a_class, variant_tag>::list base_classes;
+	typedef typename meta_class_attributes<a_class, variant_tag> attributes;
 };
 
 /** This macro should be included in the definition of every class
  *  with private or protected members, that should be refleccted
  */
 #define BOOST_MIRROR_FRIENDLY_CLASS(CLASS_NAME) \
-	friend struct ::boost::mirror::meta_class_attributes<CLASS_NAME>;
+		friend struct ::boost::mirror::meta_class_attributes<CLASS_NAME>;
 
 } // namespace mirror
 } // namespace boost
Modified: sandbox/mirror/boost/mirror/meta_inheritance.hpp
==============================================================================
--- sandbox/mirror/boost/mirror/meta_inheritance.hpp	(original)
+++ sandbox/mirror/boost/mirror/meta_inheritance.hpp	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -74,7 +74,7 @@
 
 /** Default (empty) list of base classes of a meta_class
  */
-template <class a_class>
+template <class a_class, class variant_tag = detail::default_meta_class_variant>
 struct meta_base_classes
 {
         typedef mpl::vector<> list;
@@ -85,7 +85,7 @@
  *  of the given class
  */
 #define BOOST_MIRROR_REG_BASE_CLASSES_BEGIN(A_CLASS) \
-	template <> struct meta_base_classes<A_CLASS> \
+	template <> struct meta_base_classes<A_CLASS, detail::default_meta_class_variant> \
         { \
                 typedef mpl::vector< 
 
Added: sandbox/mirror/libs/boost.png
==============================================================================
Binary file. No diff available.
Added: sandbox/mirror/libs/doc/html/index.html
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/html/index.html	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,9 @@
+<HTML>
+	<HEAD>
+		<TITLE>Mirror C++ Library</TITLE>
+	</HEAD>
+	<BODY>
+		The documentation to mirror library is currently available only as xsl transformed xml files and can be found here (Requires a xslt capable web browser, like IE7, Firefox, and probably others). 
+	</BODY>
+</HTML>
+
Added: sandbox/mirror/libs/doc/xml/mirror/_library.xml
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/mirror/_library.xml	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?xml-stylesheet type="text/xsl" href="../xslt/html.xsl"?>
+<library>
+	<name>mirror</name>
+	<title>Mirror C++ Library</title> 
+	<date>
+		<from>2008</from>
+		<to>2008</to>
+	</date>
+	<authors>
+		<author>
+			<name>Matúš</name>
+			<surname>ChochlÃk</surname>
+			<email>chochlik_at_[hidden]</email>
+		</author>
+	</authors>
+</library>
Added: sandbox/mirror/libs/doc/xml/mirror/pages/index.xml
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/mirror/pages/index.xml	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?xml-stylesheet type="text/xsl" href="../../xslt/html.xsl"?>
+<doc_page title="Main Page">
+	<paragraph>
+		Welcome to the <lib_name_ref/> library documentation. 
+	</paragraph>
+	<note>The library is still only in the early stages of development and can be subject to major changes.</note>
+	<include section="overview" />
+	<include section="goals" />
+</doc_page>
Added: sandbox/mirror/libs/doc/xml/mirror/sections/goals.xml
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/mirror/sections/goals.xml	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8"?>
+<section title="Goals">
+	<paragraph>
+		<items>
+			<item title="">
+			</item>
+		</items>
+	</paragraph>
+</section>
Added: sandbox/mirror/libs/doc/xml/mirror/sections/overview.xml
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/mirror/sections/overview.xml	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<section title="Overview">
+	<paragraph>
+		The <lib_name_ref/> library is a compile-time reflection library, intended to be proposed as a <boost/> library at some point in the future.
+	</paragraph>
+	<items>
+	</items>
+</section>
Added: sandbox/mirror/libs/doc/xml/xslt/html.xsl
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/xslt/html.xsl	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE stylesheet [
+<!ENTITY docroot "./html">
+]>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<!-- document structure -->
+	<xsl:include href="&docroot;/doc_page.xsl"/>
+	<xsl:include href="&docroot;/section.xsl"/>
+	<xsl:include href="&docroot;/paragraph.xsl"/>
+	<xsl:include href="&docroot;/note.xsl"/>
+	<!-- inclusions -->
+	<xsl:include href="&docroot;/include.xsl"/>
+	<!-- references to various things -->
+	<xsl:include href="&docroot;/lib_refs.xsl"/>
+	<xsl:include href="&docroot;/boost_refs.xsl"/>
+</xsl:stylesheet>
Added: sandbox/mirror/libs/doc/xml/xslt/html/boost_refs.xsl
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/xslt/html/boost_refs.xsl	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<!-- 
+	- template for the boost node
+	- this node is expanded to the word boost linking to www.boost.org
+	-->
+	<xsl:template match="boost">
+		boost
+	</xsl:template>
+</xsl:stylesheet>
Added: sandbox/mirror/libs/doc/xml/xslt/html/doc_page.xsl
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/xslt/html/doc_page.xsl	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,96 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<xsl:variable name="lib_info_url">../_library.xml</xsl:variable>
+	<!-- 
+	 - template that prints out the links to pages related this page
+	-->
+	<xsl:template name="format-related-page-links">
+		<DIV>
+			Related pages: [<<][<][^][>][>>]
+		</DIV>
+	</xsl:template>
+	<!-- 
+	 - template that prints out the licensing notice
+	-->
+	<xsl:template name="format-licensing-notice">
+		<DIV>
+			<xsl:text>Distributed under the Boost Software License, Version 1.0.</xsl:text>
+			<xsl:text>(See accompanying file LICENSE_1_0.txt or copy at </xsl:text>
+			http://www.boost.org/LICENSE_1_0.txt
+			<xsl:text>)</xsl:text>
+		</DIV>
+	</xsl:template>
+	<!-- 
+	 - template that prints out the copyright notice
+	-->
+	<xsl:template name="format-copyright-notice">
+		<DIV>
+			<xsl:text>Copyright (C) </xsl:text>
+			<xsl:for-each select="document($lib_info_url)/library/authors/author">
+				<xsl:if test="position()!=1">
+					<xsl:if test="position()!=last()">
+						<xsl:text>, </xsl:text>
+					</xsl:if>
+					<xsl:if test="position()=last()">
+						<xsl:text> and </xsl:text>
+					</xsl:if>
+				</xsl:if>
+				<xsl:value-of select="name"/>
+				<xsl:text> </xsl:text>
+				<xsl:value-of select="surname"/>
+			</xsl:for-each>
+			<xsl:text>, </xsl:text>
+			<xsl:for-each select="document($lib_info_url)/library/date">
+				<xsl:choose>
+					<xsl:when test="from = to">
+						<xsl:value-of select="from"/>
+					</xsl:when>
+					<xsl:otherwise>
+						<xsl:value-of select="from"/>
+						<xsl:text> - </xsl:text>
+						<xsl:value-of select="to"/>
+					</xsl:otherwise>
+				</xsl:choose>
+			</xsl:for-each>
+		</DIV>
+	</xsl:template>
+	<!-- 
+	 - template for the root node 
+	 - just applies the templates to the xml nodes
+	-->
+	<xsl:template match="/">
+		<xsl:apply-templates/>
+	</xsl:template>
+	<!-- 
+	 - template for the root node 
+	 - generates the basic html document skeleton and applies
+	 - the templates to the xml nodes
+	-->
+	<xsl:template match="doc_page">
+		<HTML>
+			<HEAD>
+				<TITLE>
+					<xsl:value-of select="document($lib_info_url)/library/title"/>
+					<xsl:text> - </xsl:text>
+					<xsl:value-of select="@title"/>
+				</TITLE>
+				<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"/>
+				<META NAME="author" CONTENT="Matus Chochlik"/>
+			</HEAD>
+			<BODY STYLE="
+				display: block; 
+				font-family: Arial; 
+				font-size: 10pt; 
+				text-align: justify;
+				text-indent: 0mm;
+			">
+				<H1><xsl:value-of select="@title"/></H1>
+				<xsl:call-template name="format-copyright-notice"/>
+				<xsl:call-template name="format-licensing-notice"/>
+				<xsl:call-template name="format-related-page-links"/>
+				<xsl:apply-templates/>
+				<xsl:call-template name="format-related-page-links"/>
+			</BODY>
+		</HTML>
+	</xsl:template>
+</xsl:stylesheet>
Added: sandbox/mirror/libs/doc/xml/xslt/html/include.xsl
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/xslt/html/include.xsl	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<!-- 
+	 - template for the include node
+	-->
+	<xsl:template match="include">
+		<!-- try to build a url -->
+		<xsl:variable name="doc_url">
+			<xsl:choose>
+				<xsl:when test="@section">
+					<xsl:text>../sections/</xsl:text>
+					<xsl:value-of select="@section"/>
+					<xsl:text>.xml</xsl:text>
+				</xsl:when>
+				<xsl:when test="@url">
+					<xsl:value-of select="@url"/>
+				</xsl:when>
+			</xsl:choose>
+		</xsl:variable>
+		<!-- now open the document and apply templates to its nodes -->
+		<xsl:apply-templates select="document($doc_url)"/>
+	</xsl:template>
+</xsl:stylesheet>
Added: sandbox/mirror/libs/doc/xml/xslt/html/lib_refs.xsl
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/xslt/html/lib_refs.xsl	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<!-- 
+	 - template for the lib_name node
+	 - this node expands to the name of the library without the 'library' word
+	-->
+	<xsl:template match="lib_name_ref">
+		<EM>
+			<xsl:variable name="lib_info_url">../_library.xml</xsl:variable>
+			<xsl:value-of select="document($lib_info_url)/library/name"/>
+		</EM>
+	</xsl:template>
+</xsl:stylesheet>
Added: sandbox/mirror/libs/doc/xml/xslt/html/note.xsl
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/xslt/html/note.xsl	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<!-- 
+	 - template for the paragraph node
+	-->
+	<xsl:template match="note">
+		<P>
+			<B>Note:</B>
+			<EM><xsl:apply-templates/></EM>
+		</P>
+	</xsl:template>
+</xsl:stylesheet>
Added: sandbox/mirror/libs/doc/xml/xslt/html/paragraph.xsl
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/xslt/html/paragraph.xsl	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<!-- 
+	 - template for the paragraph node
+	-->
+	<xsl:template match="paragraph">
+		<P><xsl:apply-templates/></P>
+	</xsl:template>
+</xsl:stylesheet>
Added: sandbox/mirror/libs/doc/xml/xslt/html/section.xsl
==============================================================================
--- (empty file)
+++ sandbox/mirror/libs/doc/xml/xslt/html/section.xsl	2008-04-15 12:29:48 EDT (Tue, 15 Apr 2008)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+	<xsl:template name="get-section-depth">
+		<xsl:text>3</xsl:text>
+	</xsl:template>
+	<!-- 
+	 - template for the section node
+	-->
+	<xsl:template match="section">
+		<xsl:variable name="heading_kind">
+			<xsl:text>H</xsl:text>
+			<xsl:call-template name="get-section-depth"/>
+		</xsl:variable>
+		<xsl:element name="{$heading_kind}">
+			<xsl:value-of select="@title"/>
+		</xsl:element>
+		<DIV>
+			<xsl:apply-templates/>
+		</DIV>
+	</xsl:template>
+</xsl:stylesheet>