C:/nobackup/private/physical_svn/trunk/include/physical/autoformat.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_AUTOFORMAT
00015 #define PHYSICAL_AUTOFORMAT
00016 
00017 #include <ostream>
00018 
00019 #include "physical/dynamicphysical.hpp"
00020 
00021 namespace physical {
00022 
00023         namespace format {
00024 
00025                 namespace detail {
00026 
00027          template<class UnitSystem>
00028                         std::ostream& automatic_quantity(std::ostream& os, DynamicPhysical<UnitSystem> q);
00029 
00030       }; // namespace detail
00031 
00032         }; // namespace format
00033 
00034                 // define default output operator for quantities. 
00035                 // Should be found by Koenig lookup, must therefore be in 
00036                 // same namespace as FixedPhysical and DynamicPhysical 
00037                 // (instead of namespace format)
00038                 // May be quite helpfull for debugging purposes.
00039       template<class UnitSystem>
00040                 inline std::ostream& operator<<(std::ostream& os, DynamicPhysical<UnitSystem> q) {
00041                         return format::detail::automatic_quantity(os, q);
00042                 };
00043 
00044 }; // namespace physical
00045 
00046 #endif // PHYSICAL_AUTOFORMAT

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