Boost logo

Boost-Commit :

From: steven_at_[hidden]
Date: 2008-06-19 23:57:43


Author: steven_watanabe
Date: 2008-06-19 23:57:42 EDT (Thu, 19 Jun 2008)
New Revision: 46544
URL: http://svn.boost.org/trac/boost/changeset/46544

Log:
Hook up Units documentation
Text files modified:
   trunk/doc/Jamfile.v2 | 2
   trunk/doc/src/boost.xml | 2
   trunk/libs/libraries.htm | 6 ++
   trunk/libs/units/doc/Jamfile.v2 | 34 +++++++++-----
   trunk/libs/units/doc/units.qbk | 90 +++++++++++++++++++++------------------
   trunk/libs/units/example/lambda.cpp | 2
   trunk/libs/units/index.html | 10 ++--
   7 files changed, 86 insertions(+), 60 deletions(-)

Modified: trunk/doc/Jamfile.v2
==============================================================================
--- trunk/doc/Jamfile.v2 (original)
+++ trunk/doc/Jamfile.v2 2008-06-19 23:57:42 EDT (Thu, 19 Jun 2008)
@@ -39,6 +39,7 @@
     <dependency>../libs/interprocess/doc//interprocess
     <dependency>../libs/intrusive/doc//autodoc.xml
     <dependency>../libs/intrusive/doc//intrusive
+ <dependency>../libs/units/doc//units
     <dependency>../libs/unordered/doc//unordered
     <dependency>../libs/asio/doc//asio
     <dependency>../libs/thread/doc//thread
@@ -58,6 +59,7 @@
     <implicit-dependency>../libs/mpi/doc//mpi
     <implicit-dependency>../libs/interprocess/doc//interprocess
     <implicit-dependency>../libs/intrusive/doc//intrusive
+ <implicit-dependency>../libs/units/doc//units
     <implicit-dependency>../libs/unordered/doc//unordered
     <implicit-dependency>../libs/thread/doc//thread
 

Modified: trunk/doc/src/boost.xml
==============================================================================
--- trunk/doc/src/boost.xml (original)
+++ trunk/doc/src/boost.xml 2008-06-19 23:57:42 EDT (Thu, 19 Jun 2008)
@@ -709,6 +709,8 @@
      </libraryinfo>
    </library>
 
+ <xi:include href="units.xml"/>
+
    <xi:include href="unordered.xml"/>
 
    <library name="Utility" dirname="utility" html-only="1">

Modified: trunk/libs/libraries.htm
==============================================================================
--- trunk/libs/libraries.htm (original)
+++ trunk/libs/libraries.htm 2008-06-19 23:57:42 EDT (Thu, 19 Jun 2008)
@@ -275,6 +275,9 @@
         Typeof operator emulation, from Arkadiy Vertleyb and Peder Holt.</li>
     <li>uBLAS - Basic linear algebra
     for dense, packed and sparse matrices, from Joerg Walter and Mathias Koch.</li>
+ <li>units -
+ Zero-overhead dimensional analysis and unit/quantity
+ manipulation and conversion, from Matthias Schabel and Steven Watanabe.</li>
     <li>unordered - unordered associative containers, from Daniel James.</li>
     <li>utility - Class <b>noncopyable</b>
         plus <b>checked_delete()</b>, <b>checked_array_delete()</b>, <b>next(),</b>&nbsp;
@@ -671,6 +674,9 @@
     <li>tribool - 3-state boolean type library, from Doug Gregor.</li>
     <li>typeof -
         Typeof operator emulation, from Arkadiy Vertleyb and Peder Holt.</li>
+ <li>units -
+ Zero-overhead dimensional analysis and unit/quantity
+ manipulation and conversion, from Matthias Schabel and Steven Watanabe.</li>
     <li>utility - Class <b>noncopyable</b>
         plus <b>checked_delete()</b>, <b>checked_array_delete()</b>, <b>next(),</b>&nbsp;
       <b>prior()</b>

Modified: trunk/libs/units/doc/Jamfile.v2
==============================================================================
--- trunk/libs/units/doc/Jamfile.v2 (original)
+++ trunk/libs/units/doc/Jamfile.v2 2008-06-19 23:57:42 EDT (Thu, 19 Jun 2008)
@@ -13,6 +13,8 @@
 using doxygen ;
 import generate_base_units ;
 
+path-constant here : . ;
+
 rule run_doxygen ( target : files * : name : expand ? )
 {
 
@@ -51,23 +53,23 @@
 
 run_doxygen units_reference
   :
- [ glob ../../../boost/units/*.hpp ]
+ [ glob $(here)/../../../boost/units/*.hpp ]
   :
     "Units Reference"
   ;
 
 run_doxygen si_reference
   :
- ../../../boost/units/systems/si.hpp
- [ path.glob-tree ../../../boost/units/systems/si : *.hpp : detail ]
+ $(here)/../../../boost/units/systems/si.hpp
+ [ path.glob-tree $(here)/../../../boost/units/systems/si : *.hpp : detail ]
   :
     "SI System Reference"
   ;
 
 run_doxygen cgs_reference
   :
- ../../../boost/units/systems/cgs.hpp
- [ path.glob-tree ../../../boost/units/systems/cgs : *.hpp : detail ]
+ $(here)/../../../boost/units/systems/cgs.hpp
+ [ path.glob-tree $(here)/../../../boost/units/systems/cgs : *.hpp : detail ]
   :
     "CGS System Reference"
   ;
@@ -75,7 +77,7 @@
 rule make_base_units_doc ( directory : name ) {
     run_doxygen $(directory)_base_units_reference
       :
- [ path.glob-tree ../../../boost/units/base_units/$(directory) : *.hpp : detail conversions.hpp ]
+ [ path.glob-tree $(here)/../../../boost/units/base_units/$(directory) : *.hpp : detail conversions.hpp ]
       :
         "$(name) Base Units Reference"
       ;
@@ -95,8 +97,8 @@
 
 run_doxygen dimensions_reference
   :
- ../../../boost/units/physical_dimensions.hpp
- [ path.glob-tree ../../../boost/units/physical_dimensions : *.hpp : detail ]
+ $(here)/../../../boost/units/physical_dimensions.hpp
+ [ path.glob-tree $(here)/../../../boost/units/physical_dimensions : *.hpp : detail ]
   :
     "Dimensions Reference"
   ;
@@ -104,31 +106,31 @@
 run_doxygen trig_reference
   :
     #../../../boost/units/systems/trig.hpp
- [ path.glob-tree ../../../boost/units/systems/angle : *.hpp : detail ]
+ [ path.glob-tree $(here)/../../../boost/units/systems/angle : *.hpp : detail ]
   :
     "Trigonometry and Angle System Reference"
   ;
 
 run_doxygen temperature_reference
   :
- [ path.glob-tree ../../../boost/units/systems/temperature : *.hpp : detail ]
+ [ path.glob-tree $(here)/../../../boost/units/systems/temperature : *.hpp : detail ]
   :
     "Temperature System Reference"
   ;
 
 run_doxygen abstract_reference
   :
- ../../../boost/units/systems/abstract.hpp
+ $(here)/../../../boost/units/systems/abstract.hpp
   :
     "Abstract System Reference"
   ;
 
-generated-qbk base_units : [ path.glob-tree ../../../boost/units/base_units : *.hpp : detail conversions.hpp ] ;
+generated-qbk base_units : [ path.glob-tree $(here)/../../../boost/units/base_units : *.hpp : detail conversions.hpp ] ;
 explicit base_units ;
 
 install base_units_install : base_units : <location>. ;
 
-boostbook standalone
+xml units
   :
     units.qbk
   :
@@ -141,6 +143,12 @@
     <dependency>trig_reference
     <dependency>temperature_reference
     <dependency>abstract_reference
+;
+
+boostbook standalone
+ :
+ units
+ :
     <xsl:param>toc.max.depth=1
     <xsl:param>toc.section.depth=8
     <xsl:param>chunk.section.depth=8

Modified: trunk/libs/units/doc/units.qbk
==============================================================================
--- trunk/libs/units/doc/units.qbk (original)
+++ trunk/libs/units/doc/units.qbk 2008-06-19 23:57:42 EDT (Thu, 19 Jun 2008)
@@ -125,7 +125,7 @@
 * *Quantity* : A quantity represents a concrete amount of a unit. Thus, while the meter is the base
    unit of length in the SI system, 5.5 meters is a quantity of length in that system.
 
-To begin, we present two short tutorials. [@../../tutorial/tutorial_1.cpp Tutorial1] demonstrates the use of
+To begin, we present two short tutorials. [@../../libs/units/tutorial/tutorial_1.cpp Tutorial1] demonstrates the use of
 [@http://en.wikipedia.org/wiki/SI_units SI] units. After including the appropriate system headers
 and the headers for the various SI units we will need (all SI units can be included with
 [headerref boost/units/systems/si.hpp]) and for quantity I/O ([headerref boost/units/io.hpp]), we define
@@ -183,23 +183,23 @@
 [@http://en.wikipedia.org/wiki/Fundamental_units units] obey the rules of a specific algebra.
 We will refer to a pair of a base dimension and a rational exponent as a *fundamental dimension*,
 and a list composed of an arbitrary number of fundamental dimensions as a *composite dimension* or, simply,
-*dimension*. In particular, given a set of [$../../../units/images/form_0.png] fundamental dimensions
-denoted by [$../../../units/images/form_1.png] and a set of [$../../../units/images/form_0.png]
-rational exponents [$../../../units/images/form_2.png], any possible (composite) dimension can be written
-as [$../../../units/images/form_3.png].
+*dimension*. In particular, given a set of [$../../libs/units/images/form_0.png] fundamental dimensions
+denoted by [$../../libs/units/images/form_1.png] and a set of [$../../libs/units/images/form_0.png]
+rational exponents [$../../libs/units/images/form_2.png], any possible (composite) dimension can be written
+as [$../../libs/units/images/form_3.png].
 
 Composite dimensions obey the algebraic rules for dimensional analysis. In particular, for any scalar value,
-[$../../../units/images/form_4.png],
-and composite dimensions [$../../../units/images/form_5.png]
-and [$../../../units/images/form_6.png], where
-[$../../../units/images/form_7.png], we have:
+[$../../libs/units/images/form_4.png],
+and composite dimensions [$../../libs/units/images/form_5.png]
+and [$../../libs/units/images/form_6.png], where
+[$../../libs/units/images/form_7.png], we have:
 
-[$../../../units/images/form_8.png]
+[$../../libs/units/images/form_8.png]
 
 Users of a dimensional analysis library should be able to specify an arbitrary list of base dimensions to
 produce a composite dimension. This potentially includes repeated tags. For example,
-it should be possible to express energy as [$../../../units/images/form_9.png], [$../../../units/images/form_10.png],
-[$../../../units/images/form_11.png], or any other permutation of mass, length, and time having aggregate exponents of
+it should be possible to express energy as [$../../libs/units/images/form_9.png], [$../../libs/units/images/form_10.png],
+[$../../libs/units/images/form_11.png], or any other permutation of mass, length, and time having aggregate exponents of
 1, 2, and -2, respectively.
 In order to be able to perform computations on arbitrary sets of dimensions,
 all composite dimensions must be reducible to an unambiguous final composite dimension, which we will refer to as a
@@ -207,7 +207,7 @@
 
 # fundamental dimensions are consistently ordered
 # dimensions with zero exponent are elided. Note that reduced dimensions never have more than
- [$../../../units/images/form_0.png] base dimensions, one for each distinct fundamental dimension, but may have fewer.
+ [$../../libs/units/images/form_0.png] base dimensions, one for each distinct fundamental dimension, but may have fewer.
 
 In our implementation, base dimensions are associated with tag types. As we will ultimately
 represent composite dimensions as typelists, we must provide some mechanism for sorting
@@ -389,10 +389,10 @@
 natural numbers] where the operator arithmetic obeys the following rules (using the standard notation for
 [@http://en.wikipedia.org/wiki/Number number systems]):
 
-* [$../../../units/images/form_12.png]
-* [$../../../units/images/form_13.png]
-* [$../../../units/images/form_14.png]
-* [$../../../units/images/form_15.png]
+* [$../../libs/units/images/form_12.png]
+* [$../../libs/units/images/form_13.png]
+* [$../../libs/units/images/form_14.png]
+* [$../../libs/units/images/form_15.png]
 
 This library is designed to support arbitrary value type algebra for addition, subtraction, multiplication, division, and
 rational powers and roots. It uses Boost.Typeof to deduce the result of these operators. For compilers that
@@ -493,7 +493,7 @@
 
 [section:DimensionExample Dimension Example]
 
-([@../../example/dimension.cpp dimension.cpp])
+([@../../libs/units/example/dimension.cpp dimension.cpp])
 
 By using MPL metafunctions and the template specializations for operations on composite dimensions
 (defined in [headerref boost/units/dimension.hpp]) it is possible to perform compile time arithmetic
@@ -512,7 +512,7 @@
 
 [section:UnitExample Unit Example]
 
-([@../../example/unit.cpp unit.cpp])
+([@../../libs/units/example/unit.cpp unit.cpp])
 
 This example demonstrates the use of the simple but functional unit system implemented in
 [headerref libs/units/example/test_system.hpp] :
@@ -529,7 +529,7 @@
 
 [section:QuantityExample Quantity Example]
 
-([@../../example/quantity.cpp quantity.cpp])
+([@../../libs/units/example/quantity.cpp quantity.cpp])
 
 This example demonstrates how to use quantities of our toy unit system :
 
@@ -556,7 +556,7 @@
 
 [section:KitchenSinkExample Kitchen Sink Example]
 
-([@../../example/kitchen_sink.cpp kitchen_sink.cpp])
+([@../../libs/units/example/kitchen_sink.cpp kitchen_sink.cpp])
 
 This example provides a fairly extensive set of tests covering most of the [___quantity] functionality.
 It uses the SI unit system defined in [headerref boost/units/systems/si.hpp].
@@ -675,7 +675,7 @@
 
 [section:ConversionExample Conversion Example]
 
-([@../../example/conversion.cpp conversion.cpp])
+([@../../libs/units/example/conversion.cpp conversion.cpp])
 
 This example demonstrates the various allowed conversions between SI and CGS units. Defining some
 quantities
@@ -713,7 +713,7 @@
 
 [section:UDTExample User Defined Types]
 
-([@../../example/quaternion.cpp quaternion.cpp])
+([@../../libs/units/example/quaternion.cpp quaternion.cpp])
 
 This example demonstrates the use of `boost::math::quaternion` as a value type for [___quantity] and the converse.
 For the first case, we first define specializations of [___power_typeof_helper] and [___root_typeof_helper] for
@@ -758,7 +758,7 @@
 
 [section:ComplexExample Complex Example]
 
-([@../../example/complex.cpp complex.cpp])
+([@../../libs/units/example/complex.cpp complex.cpp])
 
 This example demonstrates how to implement a replacement `complex` class that functions correctly both as a
 quantity value type and as a quantity container class, including heterogeneous multiplication and division
@@ -792,7 +792,7 @@
 
 [section:PerformanceExample Performance Example]
 
-([@../../example/performance.cpp performance.cpp])
+([@../../libs/units/example/performance.cpp performance.cpp])
 
 This example provides an ad hoc performance test to verify that zero runtime overhead
 is incurred when using [___quantity] in place of `double`. Note that performance
@@ -806,7 +806,7 @@
 
 [section:RadarBeamHeightExample Radar Beam Height]
 
-([@../../example/radar_beam_height.cpp radar_beam_height.cpp])
+([@../../libs/units/example/radar_beam_height.cpp radar_beam_height.cpp])
 
 [import ../example/radar_beam_height.cpp]
 
@@ -850,7 +850,7 @@
 
 [section:HeterogeneousUnitExample Heterogeneous Unit Example]
 
-([@../../example/heterogeneous_unit.cpp heterogeneous_unit.cpp])
+([@../../libs/units/example/heterogeneous_unit.cpp heterogeneous_unit.cpp])
 
 [import ../example/heterogeneous_unit.cpp]
 
@@ -876,7 +876,7 @@
 
 [section:AbsoluteRelativeTemperatureExample Absolute and Relative Temperature Example]
 
-([@../../example/temperature.cpp temperature.cpp])
+([@../../libs/units/example/temperature.cpp temperature.cpp])
 
 [import ../example/temperature.cpp]
 
@@ -902,7 +902,7 @@
 
 [section:RuntimeConversionFactorExample Runtime Conversion Factor Example]
 
-([@../../example/runtime_conversion_factor.cpp runtime_conversion_factor.cpp])
+([@../../libs/units/example/runtime_conversion_factor.cpp runtime_conversion_factor.cpp])
 
 [import ../example/runtime_conversion_factor.cpp]
 
@@ -915,7 +915,7 @@
 
 [section:UnitsWithNonbaseDimensions Units with Non-base Dimensions]
 
-([@../../example/non_base_dimension.cpp non_base_dimension.cpp])
+([@../../libs/units/example/non_base_dimension.cpp non_base_dimension.cpp])
 
 [import ../example/non_base_dimension.cpp]
 
@@ -927,7 +927,7 @@
 
 [section:OutputForCompositeUnits Output for Composite Units]
 
-([@../../example/composite_output.cpp composite_output.cpp])
+([@../../libs/units/example/composite_output.cpp composite_output.cpp])
 
 [import ../example/composite_output.cpp]
 
@@ -960,7 +960,7 @@
 This code demonstrates the use of the `conversion_factor` free function to determine
 the scale factor between two units.
 
-([@../../example/conversion_factor.cpp conversion_factor.cpp])
+([@../../libs/units/example/conversion_factor.cpp conversion_factor.cpp])
 
 [import ../example/conversion_factor.cpp]
 
@@ -974,7 +974,7 @@
 
 [section:RuntimeUnits Runtime Units]
 
-([@../../example/runtime_unit.cpp runtime_unit.cpp])
+([@../../libs/units/example/runtime_unit.cpp runtime_unit.cpp])
 
 [import ../example/runtime_unit.cpp]
 
@@ -986,6 +986,20 @@
 
 [endsect]
 
+[section:lambda Interoperability with Boost.Lambda]
+
+([@../../libs/units/example/lambda.cpp lambda.cpp])
+
+[import ../example/lambda.cpp]
+
+The header [headerref boost/units/lambda.hpp] provides overloads
+and specializations needed to make Boost.Units usable with the
+Boost.Lambda library.
+
+[lambda_snippet_1]
+
+[endsect]
+
 [endsect]
 
 [section:Utilities Utilities]
@@ -1050,14 +1064,6 @@
 
 [endsect]
 
-[section Library Interoperability]
-
-The header [headerref boost/lambda/lambda.hpp] provides overloads
-and specializations needed to make Boost.Units usable with the
-Boost.Lambda library.
-
-[endsect]
-
 [section:Reference Reference]
 
 [xinclude units_reference.xml]
@@ -1266,7 +1272,7 @@
 * added abstract units in [headerref boost/units/systems/abstract.hpp] to allow abstract dimensional
   analysis
 * new example demonstrating implementation of code based on requirements from
- Michael Fawcett ([@../../libs/units/example/radar_beam_height.hpp radar_beam_height.cpp])
+ Michael Fawcett ([@../../libs/units/example/radar_beam_height.cpp radar_beam_height.cpp])
 
 0.6.1 (February 13, 2007) :
 

Modified: trunk/libs/units/example/lambda.cpp
==============================================================================
--- trunk/libs/units/example/lambda.cpp (original)
+++ trunk/libs/units/example/lambda.cpp 2008-06-19 23:57:42 EDT (Thu, 19 Jun 2008)
@@ -49,6 +49,7 @@
 
 #include <boost/lambda/bind.hpp>
 
+//[lambda_snippet_1
 
 int main(int argc, char **argv) {
 
@@ -151,3 +152,4 @@
 
    return 0;
 }
+//]

Modified: trunk/libs/units/index.html
==============================================================================
--- trunk/libs/units/index.html (original)
+++ trunk/libs/units/index.html 2008-06-19 23:57:42 EDT (Thu, 19 Jun 2008)
@@ -1,17 +1,17 @@
 <html>
 <head>
-<meta http-equiv="refresh" content="0; URL=doc/html/index.html">
+<meta http-equiv="refresh" content="0; URL=../../doc/html/boost_units.html">
 </head>
 <body>
 Automatic redirection failed, please go to
-doc/html/index.html
+../../doc/html/boost_units.html
 <hr>
 <tt>
-mcs::units - A C++ library for zero-overhead dimensional analysis and
+Boost.Units - A C++ library for zero-overhead dimensional analysis and
 unit/quantity manipulation and conversion <br>
 <br>
-Copyright (C) 2003-2007 Matthias Christian Schabel <br>
-Copyright (C) 2007 Steven Watanabe <br>
+Copyright (C) 2003-2008 Matthias Christian Schabel <br>
+Copyright (C) 2007-2008 Steven Watanabe <br>
 <br>
 Distributed under the Boost Software License, Version 1.0. (See
 accompanying file LICENSE_1_0.txt or copy at


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