Boost logo

Boost-Commit :

From: boost_at_[hidden]
Date: 2008-05-26 13:30:51


Author: matthiasschabel
Date: 2008-05-26 13:30:51 EDT (Mon, 26 May 2008)
New Revision: 45779
URL: http://svn.boost.org/trac/boost/changeset/45779

Log:
symbols&names for some common cgs units
Added:
   sandbox/units/boost/units/systems/cgs/io.hpp (contents, props changed)
Text files modified:
   sandbox/units/boost/units/systems/cgs/current.hpp | 4 ++--
   1 files changed, 2 insertions(+), 2 deletions(-)

Modified: sandbox/units/boost/units/systems/cgs/current.hpp
==============================================================================
--- sandbox/units/boost/units/systems/cgs/current.hpp (original)
+++ sandbox/units/boost/units/systems/cgs/current.hpp 2008-05-26 13:30:51 EDT (Mon, 26 May 2008)
@@ -21,8 +21,8 @@
 
 typedef unit<current_dimension,cgs::system> current;
     
-BOOST_UNITS_STATIC_CONSTANT(ampere,current);
-BOOST_UNITS_STATIC_CONSTANT(amperes,current);
+BOOST_UNITS_STATIC_CONSTANT(biot,current);
+BOOST_UNITS_STATIC_CONSTANT(biots,current);
 
 } // namespace cgs
 

Added: sandbox/units/boost/units/systems/cgs/io.hpp
==============================================================================
--- (empty file)
+++ sandbox/units/boost/units/systems/cgs/io.hpp 2008-05-26 13:30:51 EDT (Mon, 26 May 2008)
@@ -0,0 +1,53 @@
+// Boost.Units - A C++ library for zero-overhead dimensional analysis and
+// unit/quantity manipulation and conversion
+//
+// Copyright (C) 2003-2008 Matthias Christian Schabel
+// Copyright (C) 2008 Steven Watanabe
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#ifndef BOOST_UNITS_CGS_IO_HPP
+#define BOOST_UNITS_CGS_IO_HPP
+
+#include <boost/units/io.hpp>
+
+#include <boost/units/systems/cgs.hpp>
+
+namespace boost {
+
+namespace units {
+
+inline std::string name_string(const cgs::acceleration&) { return "galileo"; }
+inline std::string symbol_string(const cgs::acceleration&) { return "Gal"; }
+
+inline std::string name_string(const cgs::current&) { return "biot"; }
+inline std::string symbol_string(const cgs::current&) { return "Bi"; }
+
+inline std::string name_string(const cgs::dynamic_viscosity&) { return "poise"; }
+inline std::string symbol_string(const cgs::dynamic_viscosity&) { return "P"; }
+
+inline std::string name_string(const cgs::electric_potential&) { return "volt"; }
+inline std::string symbol_string(const cgs::electric_potential&) { return "V"; }
+
+inline std::string name_string(const cgs::energy&) { return "erg"; }
+inline std::string symbol_string(const cgs::energy&) { return "erg"; }
+
+inline std::string name_string(const cgs::force&) { return "dyne"; }
+inline std::string symbol_string(const cgs::force&) { return "dyn"; }
+
+inline std::string name_string(const cgs::kinematic_viscosity&) { return "stoke"; }
+inline std::string symbol_string(const cgs::kinematic_viscosity&) { return "St"; }
+
+inline std::string name_string(const cgs::pressure&) { return "barye"; }
+inline std::string symbol_string(const cgs::pressure&) { return "Ba"; }
+
+inline std::string name_string(const cgs::wavenumber&) { return "kayser"; }
+inline std::string symbol_string(const cgs::wavenumber&) { return "K"; }
+
+} // namespace units
+
+} // namespace boost
+
+#endif // BOOST_UNITS_CGS_IO_HPP


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