C:/nobackup/private/physical_svn/trunk/include/physical/unitsymbol.hpp

Go to the documentation of this file.
00001 
00002 /*=============================================================================
00003     physical quantities / units / constants
00004     Copyright (c) 2006, 2007 Martin Schulz
00005     http://physical.sourceforge.net
00006   
00007     This is private code by Martin Schulz.
00008   
00009     Use, modification and distribution is subject to the Boost Software
00010     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
00011     http://www.boost.org/LICENSE_1_0.txt)
00012 =============================================================================*/
00013 
00014 #ifndef PHYSICAL_UNITSYMBOL
00015 #define PHYSICAL_UNITSYMBOL
00016 
00017 #include "physical/quantity.hpp"
00018 #include "physical/unit.hpp"
00019 
00020 namespace physical {
00021 
00044         namespace unitsymbol_si_double { typedef double real; namespace quantity=quantity_si_double; namespace unit=unit_si_double; };  
00045 
00046 
00050         namespace unitsymbol_si_float { typedef float real; namespace quantity=quantity_si_float; namespace unit=unit_si_float; };  
00051 
00052 #define UNITSYMBOL0(AAA)       namespace unitsymbol_si_double { AAA; }; namespace unitsymbol_si_float { AAA; };
00053 
00054 
00055 
00056                 // symbols for SI base units (from NIST table 1)
00057                 UNITSYMBOL0( const static quantity::length                                      m       =       unit::meter );
00058                 UNITSYMBOL0( const static quantity::mass                                        kg      =       unit::kilogram );
00059                 UNITSYMBOL0( const static quantity::time                                        s       =       unit::second );
00060                 UNITSYMBOL0( const static quantity::electric_current            A       =       unit::ampere );
00061                 UNITSYMBOL0( const static quantity::temperature                         K       =       unit::kelvin );
00062                 UNITSYMBOL0( const static quantity::amount_of_substance         mol     =       unit::mole );
00063                 UNITSYMBOL0( const static quantity::luminous_intensity          cd      =       unit::candela );
00064 
00065                 // symbols for ... (from NIST table 3)
00066                 UNITSYMBOL0( const static quantity::plane_angle                         rad =   unit::radian );
00067                 UNITSYMBOL0( const static quantity::solid_angle                         sr      =       unit::steradian );
00068                 UNITSYMBOL0( const static quantity::frequency                           Hz      =       unit::hertz );
00069                 UNITSYMBOL0( const static quantity::force                                       N       =       unit::newton );
00070                 UNITSYMBOL0( const static quantity::pressure                            Pa      =       unit::Pascal );
00071                 UNITSYMBOL0( const static quantity::energy                                      J       =       unit::joule );
00072                 UNITSYMBOL0( const static quantity::power                                       W       =       unit::watt );
00073                 UNITSYMBOL0( const static quantity::electric_charge                     C       =       unit::coulomb );
00074                 UNITSYMBOL0( const static quantity::electric_potential_difference       
00075                                                                                                                                         V       =       unit::volt );
00076                 UNITSYMBOL0( const static quantity::capacitance                         F       =       unit::farad );
00077                 UNITSYMBOL0( const static quantity::electric_resistance         Omega = unit::ohm );
00078                 UNITSYMBOL0( const static quantity::electric_conductance        S       =       unit::siemens );
00079                 UNITSYMBOL0( const static quantity::magnetic_flux                       Wb      =       unit::weber );
00080                 UNITSYMBOL0( const static quantity::magnetic_flux_density       T       =       unit::tesla );
00081                 UNITSYMBOL0( const static quantity::inductance                          H       =       unit::henry );
00082                 UNITSYMBOL0( const static quantity::luminous_flux                       lm      =       unit::lumen );
00083                 UNITSYMBOL0( const static quantity::illuminance                         lx      =       unit::lux );
00084                 UNITSYMBOL0( const static quantity::activity_of_a_radionuclide  
00085                                                                                                                                         Bq      =       unit::becquerel );
00086                 UNITSYMBOL0( const static quantity::absorbed_dose                       Gy      =       unit::gray );
00087                 UNITSYMBOL0( const static quantity::dose_equivalent                     Sv      =       unit::sievert );
00088                 UNITSYMBOL0( const static quantity::catalytic_activity          kat     =       unit::katal );
00089 
00090 
00091 
00092                 // FIXME: yet to be filled (cf. NIST website, udunits.dat etc)
00093 
00094                 UNITSYMBOL0( const static quantity::mass                                        g       =       unit::gram );
00095                 UNITSYMBOL0( const static quantity::length                                      km      =       unit::kilometer );
00096                 UNITSYMBOL0( const static quantity::length                                      mm      =       unit::millimeter );
00097                 UNITSYMBOL0( const static quantity::time                                        min     =       unit::minute );
00098                 UNITSYMBOL0( const static quantity::time                                        h       =       unit::hour );
00099 
00100 
00101 #undef UNITSYMBOL0
00102 
00103 }; // namespace physical
00104 
00105 #endif

Generated on Mon Apr 2 22:25:03 2007 for physical_svn by  doxygen 1.5.1-p1
hosted on SourceForge.net Logo