|
From: Steven W. <ste...@us...> - 2007-03-29 20:18:54
|
Update of /cvsroot/boost-sandbox/boost-sandbox/boost/units In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv27269/boost-sandbox/boost/units Modified Files: io.hpp Log Message: Documentation update Index: io.hpp =================================================================== RCS file: /cvsroot/boost-sandbox/boost-sandbox/boost/units/io.hpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- io.hpp 29 Mar 2007 19:00:26 -0000 1.4 +++ io.hpp 29 Mar 2007 20:18:54 -0000 1.5 @@ -43,6 +43,19 @@ namespace units { +#ifdef BOOST_UNITS_DOXYGEN + +/// Template intended to be specialized for every fundamental unit. +template<class DimensionTag, class System> +struct base_unit_info { + /// the full name of the unit for example "meter". + static std::string name(); + /// The symbol of the unit for example "m". + static std::string symbol(); +}; + +#endif + /// Write integral-valued @c static_rational to @c std::basic_ostream. template<class Char, class Traits, integer_type N> inline std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os,const static_rational<N>& val) @@ -59,7 +72,10 @@ return os; } -/// Write @c unit to @c std::basic_ostream. +/// Write @c unit to @c std::basic_ostream. Prints the symbol of +/// each fundamental unit followed by it's exponent e.g. +/// joules = m^2 kg s^(-2). If this is not what you want feel free +/// to overload it for your own units. template<class Char, class Traits, class System,class Dim> std::basic_ostream<Char, Traits>& operator<<(std::basic_ostream<Char, Traits>& os,const unit<Dim,System>& u) { |