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_DYNAMICUNIT 00015 #define PHYSICAL_DYNAMICUNIT 00016 00017 #include "physical/detail/dynamicexponents.hpp" 00018 #include "physical/detail/dynamicscale.hpp" 00019 #include "physical/fixedphysical.hpp" 00020 00021 namespace physical { 00022 00023 // forward declaration: 00024 template<class UnitSystem> 00025 struct DynamicPhysical; 00026 00027 template<class UnitSystem> 00028 struct DynamicUnit { 00029 detail::DynamicExponents<UnitSystem> exponents; 00030 detail::DynamicScale scale; 00031 00032 DynamicUnit(const DynamicUnit<UnitSystem>& definition, const detail::DynamicScale scale); 00033 00034 template<typename T, class Exponents> 00035 explicit DynamicUnit(const FixedPhysical<UnitSystem, T, Exponents>& definition) 00036 : exponents(Exponents()) 00037 , scale(definition.numerical_value, 0.) 00038 {}; 00039 00040 explicit DynamicUnit(const DynamicPhysical<UnitSystem>& definition); 00041 explicit DynamicUnit(const DynamicPhysical<UnitSystem>& definition, const detail::DynamicScale scacle); 00042 }; 00043 00044 00045 /* 00046 // conversion from FixedPhysical to unit (no offset possible here) 00047 template < class UnitSystem, class FixedPhysical> 00048 DynamicUnit<UnitSystem>::DynamicUnit(const FixedPhysical& definition) 00049 : exponents(typename FixedPhysical::exponents()) 00050 , scale(definition.numerical_value, 0.) 00051 {}; 00052 */ 00053 00054 }; // namespace physical 00055 00056 00057 #include "physical/detail/dynamicunit_impl.hpp" 00058 00059 #endif // PHYSICAL_DYNAMICUNIT
Generated on Mon Apr 2 22:25:03 2007 for physical_svn by 1.5.1-p1 | hosted on |