$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r49962 - in sandbox/mirror/doc/html/mirror/non_boost_book/concepts: . overview xslt
From: chochlik_at_[hidden]
Date: 2008-11-27 14:15:04
Author: matus.chochlik
Date: 2008-11-27 14:15:03 EST (Thu, 27 Nov 2008)
New Revision: 49962
URL: http://svn.boost.org/trac/boost/changeset/49962
Log:
[mirror 0.2.x]
- documentation update
Added:
   sandbox/mirror/doc/html/mirror/non_boost_book/concepts/overview/Traversal.xml   (contents, props changed)
Text files modified: 
   sandbox/mirror/doc/html/mirror/non_boost_book/concepts/ontology.xml             |    19 +++                                     
   sandbox/mirror/doc/html/mirror/non_boost_book/concepts/overview/transform.xsl   |   190 +++++++++++++++++++++------------------ 
   sandbox/mirror/doc/html/mirror/non_boost_book/concepts/xslt/make_model_list.xsl |    13 ++                                      
   3 files changed, 130 insertions(+), 92 deletions(-)
Modified: sandbox/mirror/doc/html/mirror/non_boost_book/concepts/ontology.xml
==============================================================================
--- sandbox/mirror/doc/html/mirror/non_boost_book/concepts/ontology.xml	(original)
+++ sandbox/mirror/doc/html/mirror/non_boost_book/concepts/ontology.xml	2008-11-27 14:15:03 EST (Thu, 27 Nov 2008)
@@ -8,6 +8,21 @@
                 <model url="http://www.sgi.com/tech/stl/basic_string.html" name="::std::basic_string"/>
         </concept>
 
+	<concept name="Traversal">
+		<member_function concept="void" name="accept">
+			<fn_param concept="TraversalVisitor" name="_visitor"/>
+			<desc>Accepts the given visitor for traversal of the class' structure only.</desc>
+		</member_function>
+		<member_function concept="void" name="accept">
+			<fn_param concept="TraversalVisitor" name="_visitor"/>
+			<fn_param concept="Pointer" name="_ptr_to_instance"/>
+			<desc>Accepts the given visitor for traversal of the class and of its instance.</desc>
+		</member_function>
+
+		<model name="flat_traversal_of"/>
+		<model name="deep_traversal_of"/>
+	</concept>
+
         <concept name="ContextNodeSet">
                 <metafunction concept="MplIntegralConstant" subnamespace="meta_path" name="size">
                         <metafn_param placeholder="true">
@@ -420,7 +435,7 @@
         <concept name="MetaClass">
                 <model name="meta_class"/>
                 <member_typedef concept="MetaBaseClasses" name="base_classes">
-			<desc>The sequence of MetaInheritance(s) reflecting the inheritance of the base classes.</desc>
+			<desc>The sequence of MetaBaseClasses reflecting the inheritance of the base classes.</desc>
                 </member_typedef>
                 <member_typedef concept="MetaClassAttributes" name="meta_attributes">
                         <desc>The sequence of MetaClassAttribute(s) reflecting the "own" attributes of a class. These are the attributes that are defined directly in the class reflected by this MetaClass, not including the attributes inherited from the base classes.</desc>
@@ -523,7 +538,7 @@
         <concept name="MetaInheritance">
                 <model name="meta_inheritance"/>
                 <member_typedef concept="MetaBaseClasses" name="container">
-			<desc>The list of MetaInhertiance(s) that this MetaInheritance belongs to.</desc>
+			<desc>The list of MetaBaseClasses that this MetaInheritance belongs to.</desc>
                 </member_typedef>
         </concept>
         
Added: sandbox/mirror/doc/html/mirror/non_boost_book/concepts/overview/Traversal.xml
==============================================================================
--- (empty file)
+++ sandbox/mirror/doc/html/mirror/non_boost_book/concepts/overview/Traversal.xml	2008-11-27 14:15:03 EST (Thu, 27 Nov 2008)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="utf-8"?>
+<?xml-stylesheet type="text/xsl" href="transform.xsl" ?>
+<concept name="Traversal"/>
Modified: sandbox/mirror/doc/html/mirror/non_boost_book/concepts/overview/transform.xsl
==============================================================================
--- sandbox/mirror/doc/html/mirror/non_boost_book/concepts/overview/transform.xsl	(original)
+++ sandbox/mirror/doc/html/mirror/non_boost_book/concepts/overview/transform.xsl	2008-11-27 14:15:03 EST (Thu, 27 Nov 2008)
@@ -21,39 +21,59 @@
 
         <xsl:template name="make-list-of-already-done-members">
                 <xsl:param name="current"/>
-		<xsl:param name="member_type"/>
-		<xsl:for-each select="document($ontology_src)/concept_ontology/concept[@name = $current]/*[name() = $member_type]">
+		<xsl:param name="member_kind"/>
+		<xsl:for-each select="document($ontology_src)/concept_ontology/concept[@name = $current]/*[name() = $member_kind]">
                         <xsl:value-of select="concat('[', @name, ']')"/>
                 </xsl:for-each>
                 <xsl:for-each select="document($ontology_src)/concept_ontology/role[@type='Specialization' and @object=$current]">
                         <xsl:call-template name="make-list-of-already-done-members">
                                 <xsl:with-param name="current" select="@subject"/>
-				<xsl:with-param name="member_type" select="$member_type"/>
+				<xsl:with-param name="member_kind" select="$member_kind"/>
                         </xsl:call-template>
                 </xsl:for-each>
         </xsl:template>
 
-	<xsl:template name="make-list-of-already-done-models">
+
+	<xsl:template name="find-and-mark-member-items">
                 <xsl:param name="current"/>
-		<xsl:for-each select="document($ontology_src)/concept_ontology/concept[@name = $current]/model">
-			<xsl:value-of select="concat('[', @name, ']')"/>
-		</xsl:for-each>
-		<xsl:for-each select="document($ontology_src)/concept_ontology/role[@type='Specialization' and @subject=$current]">
-			<xsl:call-template name="make-list-of-already-done-models">
-				<xsl:with-param name="current" select="@object"/>
-			</xsl:call-template>
-		</xsl:for-each>
+		<xsl:param name="member_kind"/>
+		
+		<xsl:choose>
+			<xsl:when test="count(document($ontology_src)/concept_ontology/concept[@name = $current]/*[name() = $member_kind]) > 0">
+				<xsl:text>X</xsl:text>
+			</xsl:when>
+			<xsl:otherwise>
+			<xsl:for-each select="document($ontology_src)/concept_ontology/role[@type='Specialization' and @object=$current]">
+				<xsl:call-template name="find-and-mark-member-items">
+					<xsl:with-param name="current" select="@subject"/>
+					<xsl:with-param name="member_kind" select="$member_kind"/>
+				</xsl:call-template>
+			</xsl:for-each>
+			</xsl:otherwise>
+		</xsl:choose>
         </xsl:template>
 
+	<xsl:template name="has-member-items">
+		<xsl:param name="concept"/>
+		<xsl:param name="member_kind"/>
+		<xsl:variable name="marks">
+			<xsl:call-template name="find-and-mark-member-items">
+				<xsl:with-param name="current" select="$concept"/>
+				<xsl:with-param name="member_kind" select="$member_kind"/>
+			</xsl:call-template>
+		</xsl:variable>
+		<xsl:value-of select="string-length($marks) > 0"/>
+	</xsl:template>
+	
 
         <xsl:template name="make-member-items">
                 <xsl:param name="concept"/>
                 <xsl:param name="current"/>
                 <xsl:param name="already_done"/>
-		<xsl:param name="member_type"/>
+		<xsl:param name="member_kind"/>
 
                 <!-- print out the typedefs of the current concept -->
-		<xsl:for-each select="document($ontology_src)/concept_ontology/concept[@name = $current]/*[name() = $member_type]">
+		<xsl:for-each select="document($ontology_src)/concept_ontology/concept[@name = $current]/*[name() = $member_kind]">
                         <xsl:if test="not(contains($already_done, concat('[', @name, ']')))">
                         <tr>
                                 <td><code>
@@ -79,22 +99,22 @@
                                         </xsl:if>
                                 </code></td>
                                 <td><code>
-					<xsl:if test="$member_type = 'member_typedef'">
+					<xsl:if test="$member_kind = 'member_typedef'">
                                                 <strong>T</strong><xsl:text>::</xsl:text>
                                         </xsl:if>
-					<xsl:if test="$member_type = 'member_function'">
+					<xsl:if test="$member_kind = 'member_function'">
                                                 <strong>x</strong><xsl:text>.</xsl:text>
                                         </xsl:if>
                                         
                                         
-					<xsl:if test="$member_type = 'free_function' or $member_type='metafunction'">
+					<xsl:if test="$member_kind = 'free_function' or $member_kind='metafunction'">
                                                 <xsl:if test="@namespace or @subnamespace">
                                                         <xsl:value-of select="@namespace | @subnamespace"/>
                                                         <xsl:text>::</xsl:text>
                                                 </xsl:if>
                                         </xsl:if>
                                         <xsl:value-of select="@name"/>
-					<xsl:if test="$member_type = 'metafunction' or template_param">
+					<xsl:if test="$member_kind = 'metafunction' or template_param">
                                                 <xsl:text>< </xsl:text>
                                                 <xsl:for-each select="metafn_param | template_param">
                                                         <xsl:variable name="templ_param_concept" select="@name"/>
@@ -121,7 +141,7 @@
                                                 </xsl:for-each>
                                                 <xsl:text> >::type</xsl:text>
                                         </xsl:if>
-					<xsl:if test="$member_type = 'member_function' or $member_type = 'free_function'">
+					<xsl:if test="$member_kind = 'member_function' or $member_kind = 'free_function'">
                                                 <xsl:text>(</xsl:text>
                                                 <xsl:for-each select="fn_param">
                                                         <xsl:variable name="fn_param_concept" select="@concept"/>
@@ -174,7 +194,7 @@
 
                 <xsl:variable name="new_already_done">
                         <xsl:value-of select="$already_done"/>
-			<xsl:for-each select="document($ontology_src)/concept_ontology/concept[@name = $current]/*[name() = $member_type]">
+			<xsl:for-each select="document($ontology_src)/concept_ontology/concept[@name = $current]/*[name() = $member_kind]">
                                 <xsl:value-of select="concat('[', @name, ']')"/>
                         </xsl:for-each>
                 </xsl:variable>
@@ -190,103 +210,93 @@
                                         <xsl:for-each select="preceding-sibling::node()[@type='Specialization' and @object=$current]">
                                                 <xsl:call-template name="make-list-of-already-done-members">
                                                         <xsl:with-param name="current" select="@subject"/>
-							<xsl:with-param name="member_type" select="$member_type"/>
+							<xsl:with-param name="member_kind" select="$member_kind"/>
                                                 </xsl:call-template>
                                         </xsl:for-each>
                                 </xsl:with-param>
-				<xsl:with-param name="member_type" select="$member_type"/>
+				<xsl:with-param name="member_kind" select="$member_kind"/>
                         </xsl:call-template>
                 </xsl:for-each>
 
 
         </xsl:template>
 
+
+	<xsl:template name="make-member-item-table">
+		<xsl:param name="concept"/>
+		<xsl:param name="member_kind"/>
+		<xsl:param name="caption"/>
+		<xsl:param name="concept_column_heading"/>
+		<xsl:variable name="has_items">
+			<xsl:call-template name="has-member-items">
+				<xsl:with-param name="concept" select="$concept"/>
+				<xsl:with-param name="member_kind" select="$member_kind"/>
+			</xsl:call-template>
+		</xsl:variable>
+
+		<xsl:if test="$has_items='true'">
+			<div class="table">
+				<p class="title"><b><xsl:value-of select="$caption"/></b></p>
+				<div class="table-contents">
+					<table class="table">
+						<tr>
+							<th><xsl:value-of select="$concept_column_heading"/></th>
+							<th>Expression</th>
+							<th>Notes</th>
+						</tr>
+						<xsl:call-template name="make-member-items">
+							<xsl:with-param name="concept" select="$concept"/>
+							<xsl:with-param name="current" select="$concept"/>
+							<xsl:with-param name="member_kind" select="$member_kind"/>
+						</xsl:call-template>
+					</table>
+				</div>
+			</div>
+		</xsl:if>
+	</xsl:template>
+
         <!-- makes the typedef table -->
         <xsl:template name="make-typedef-table">
                 <xsl:param name="concept"/>
-		<div class="table">
-			<p class="title"><b>Member types</b></p>
-			<div class="table-contents">
-				<table class="table">
-					<tr>
-						<th>Concept</th>
-						<th>Expression</th>
-						<th>Notes</th>
-					</tr>
-					<xsl:call-template name="make-member-items">
-						<xsl:with-param name="concept" select="$concept"/>
-						<xsl:with-param name="current" select="$concept"/>
-						<xsl:with-param name="member_type">member_typedef</xsl:with-param>
-					</xsl:call-template>
-				</table>
-			</div>
-		</div>
+		<xsl:call-template name="make-member-item-table">
+			<xsl:with-param name="concept" select="$concept"/>
+			<xsl:with-param name="member_kind" select="'member_typedef'"/>
+			<xsl:with-param name="caption" select="'Member types'"/>
+			<xsl:with-param name="concept_column_heading" select="'Concept'"/>
+		</xsl:call-template>
         </xsl:template>
 
         <!-- makes the member function table -->
         <xsl:template name="make-mem-fn-table">
                 <xsl:param name="concept"/>
-		<div class="table">
-			<p class="title"><b>Member functions</b></p>
-			<div class="table-contents">
-				<table class="table">
-					<tr>
-						<th>Return value concept</th>
-						<th>Expression</th>
-						<th>Notes</th>
-					</tr>
-					<xsl:call-template name="make-member-items">
-						<xsl:with-param name="concept" select="$concept"/>
-						<xsl:with-param name="current" select="$concept"/>
-						<xsl:with-param name="member_type">member_function</xsl:with-param>
-					</xsl:call-template>
-				</table>
-			</div>
-		</div>
+                <xsl:call-template name="make-member-item-table">
+                        <xsl:with-param name="concept" select="$concept"/>
+                        <xsl:with-param name="member_kind" select="'member_function'"/>
+                        <xsl:with-param name="caption" select="'Member functions'"/>
+                        <xsl:with-param name="concept_column_heading" select="'Return value concept'"/>
+                </xsl:call-template>
         </xsl:template>
 
         <!-- makes the free function table -->
         <xsl:template name="make-free-fn-table">
                 <xsl:param name="concept"/>
-		<div class="table">
-			<p class="title"><b>Free functions</b></p>
-			<div class="table-contents">
-				<table class="table">
-					<tr>
-						<th>Return value concept</th>
-						<th>Expression</th>
-						<th>Notes</th>
-					</tr>
-					<xsl:call-template name="make-member-items">
-						<xsl:with-param name="concept" select="$concept"/>
-						<xsl:with-param name="current" select="$concept"/>
-						<xsl:with-param name="member_type">free_function</xsl:with-param>
-					</xsl:call-template>
-				</table>
-			</div>
-		</div>
+                <xsl:call-template name="make-member-item-table">
+                        <xsl:with-param name="concept" select="$concept"/>
+                        <xsl:with-param name="member_kind" select="'free_function'"/>
+                        <xsl:with-param name="caption" select="'Free functions'"/>
+                        <xsl:with-param name="concept_column_heading" select="'Return value concept'"/>
+                </xsl:call-template>
         </xsl:template>
 
         <!-- makes the metafunction function table -->
         <xsl:template name="make-meta-fn-table">
                 <xsl:param name="concept"/>
-		<div class="table">
-			<p class="title"><b>Metafunctions</b></p>
-			<div class="table-contents">
-				<table class="table">
-					<tr>
-						<th>Result concept</th>
-						<th>Expression</th>
-						<th>Notes</th>
-					</tr>
-					<xsl:call-template name="make-member-items">
-						<xsl:with-param name="concept" select="$concept"/>
-						<xsl:with-param name="current" select="$concept"/>
-						<xsl:with-param name="member_type">metafunction</xsl:with-param>
-					</xsl:call-template>
-				</table>
-			</div>
-		</div>
+                <xsl:call-template name="make-member-item-table">
+                        <xsl:with-param name="concept" select="$concept"/>
+                        <xsl:with-param name="member_kind" select="'metafunction'"/>
+                        <xsl:with-param name="caption" select="'Metafunctions'"/>
+                        <xsl:with-param name="concept_column_heading" select="'Result concept'"/>
+                </xsl:call-template>
         </xsl:template>
 
         <xsl:template name="make-models-table">
Modified: sandbox/mirror/doc/html/mirror/non_boost_book/concepts/xslt/make_model_list.xsl
==============================================================================
--- sandbox/mirror/doc/html/mirror/non_boost_book/concepts/xslt/make_model_list.xsl	(original)
+++ sandbox/mirror/doc/html/mirror/non_boost_book/concepts/xslt/make_model_list.xsl	2008-11-27 14:15:03 EST (Thu, 27 Nov 2008)
@@ -2,6 +2,19 @@
 <xsl:stylesheet version="1.0" 
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 >
+        <xsl:template name="make-list-of-already-done-models">
+                <xsl:param name="current"/>
+                <xsl:for-each select="document($ontology_src)/concept_ontology/concept[@name = $current]/model">
+                        <xsl:value-of select="concat('[', @name, ']')"/>
+                </xsl:for-each>
+                <xsl:for-each select="document($ontology_src)/concept_ontology/role[@type='Specialization' and @subject=$current]">
+                        <xsl:call-template name="make-list-of-already-done-models">
+                                <xsl:with-param name="current" select="@object"/>
+                        </xsl:call-template>
+                </xsl:for-each>
+        </xsl:template>
+
+
         <xsl:template name="make-model-list">
                 <xsl:param name="concept"/>
                 <xsl:param name="current"/>