|
Boost-Commit : |
From: steven_at_[hidden]
Date: 2007-08-28 18:08:11
Author: steven_watanabe
Date: 2007-08-28 18:08:10 EDT (Tue, 28 Aug 2007)
New Revision: 39045
URL: http://svn.boost.org/trac/boost/changeset/39045
Log:
Added desriptions of typedefs
Text files modified:
sandbox/units/boost/units/base_dimension.hpp | 7 +++++++
sandbox/units/boost/units/base_unit.hpp | 10 +++++++++-
2 files changed, 16 insertions(+), 1 deletions(-)
Modified: sandbox/units/boost/units/base_dimension.hpp
==============================================================================
--- sandbox/units/boost/units/base_dimension.hpp (original)
+++ sandbox/units/boost/units/base_dimension.hpp 2007-08-28 18:08:10 EDT (Tue, 28 Aug 2007)
@@ -61,8 +61,15 @@
public mpl::long_<N>
{
public:
+ /// INTERNAL ONLY
typedef base_dimension this_type;
+ /// A convenience typedef. Equivalent to boost::units::derived_dimension<Derived,1>::type.
+#ifndef BOOST_UNITS_DOXYGEN
typedef dimension_list<dim<Derived,static_rational<1> >, dimensionless_type> dimension_type;
+#else
+ typedef detail::unspecified dimension_type;
+#endif
+ /// Provided for mpl compatability.
typedef Derived type;
private:
Modified: sandbox/units/boost/units/base_unit.hpp
==============================================================================
--- sandbox/units/boost/units/base_unit.hpp (original)
+++ sandbox/units/boost/units/base_unit.hpp 2007-08-28 18:08:10 EDT (Tue, 28 Aug 2007)
@@ -43,7 +43,7 @@
};
};
-/// Defines a base dimension. To define a unit you need to provide
+/// Defines a base unit. To define a unit you need to provide
/// the derived class (CRTP), a dimension list and a unique integer.
/// @code
/// struct my_unit : boost::units::base_unit<my_unit, length_dimension, 1> {};
@@ -64,11 +64,16 @@
public mpl::long_<N>
{
public:
+ /// INTERNAL ONLY
typedef base_unit this_type;
+ /// The dimensions of this base unit.
typedef Dim dimension_type;
+ /// Provided for mpl compatability.
typedef Derived type;
+ /// The unit corresponding to this base unit.
+#ifndef BOOST_UNITS_DOXYGEN
typedef unit<
Dim,
heterogeneous_system<
@@ -81,6 +86,9 @@
>
>
> unit_type;
+#else
+ typedef detail::unspecified unit_type;
+#endif
private:
/// Register this ordinal
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