physical::FixedPhysical< T, Exponents > Struct Template Reference

physical quantity with compile-time fixed physical dimension. More...

#include <Copy of fixedphysical.hpp>

List of all members.

Public Types

typedef Exponents exponents
typedef T numerical_value_t
typedef UnitSystem unitsystem
typedef Exponents exponents
typedef T numerical_value_t

Public Member Functions

 FixedPhysical (numerical_value_t v)
 explicit C'tor from real numbers. FIXME: should probably be private, but who is the friend?
 FixedPhysical (const FixedPhysical &v)
 copy c'tor
 FixedPhysical (const DynamicPhysical &v)
 conversion c'tor from DynamicPhysical
template<typename T2>
 FixedPhysical (const FixedPhysical< T2, exponents > &v)
 conversion c'tor from other numerical type
 FixedPhysical (numerical_value_t v)
 explicit C'tor from real numbers. FIXME: should probably be private, but who is the friend?
 FixedPhysical (const FixedPhysical &v)
 copy c'tor
 FixedPhysical (const DynamicPhysical< UnitSystem > &v)
 conversion c'tor from DynamicPhysical
template<typename T2>
 FixedPhysical (const FixedPhysical< UnitSystem, T2, exponents > &v)
 conversion c'tor from other numerical type

Public Attributes

numerical_value_t numerical_value


Detailed Description

template<typename T, class Exponents>
struct physical::FixedPhysical< T, Exponents >

physical quantity with compile-time fixed physical dimension.

Definition at line 32 of file Copy of fixedphysical.hpp.


Member Typedef Documentation

template<typename T, class Exponents>
typedef Exponents physical::FixedPhysical< T, Exponents >::exponents

Definition at line 33 of file Copy of fixedphysical.hpp.

template<typename T, class Exponents>
typedef T physical::FixedPhysical< T, Exponents >::numerical_value_t

Definition at line 34 of file Copy of fixedphysical.hpp.

template<typename T, class Exponents>
typedef UnitSystem physical::FixedPhysical< T, Exponents >::unitsystem

Definition at line 34 of file fixedphysical.hpp.

template<typename T, class Exponents>
typedef Exponents physical::FixedPhysical< T, Exponents >::exponents

Definition at line 35 of file fixedphysical.hpp.

template<typename T, class Exponents>
typedef T physical::FixedPhysical< T, Exponents >::numerical_value_t

Definition at line 36 of file fixedphysical.hpp.


Constructor & Destructor Documentation

template<typename T, class Exponents>
physical::FixedPhysical< T, Exponents >::FixedPhysical ( numerical_value_t  v  )  [inline, explicit]

explicit C'tor from real numbers. FIXME: should probably be private, but who is the friend?

Definition at line 38 of file Copy of fixedphysical.hpp.

00038 :numerical_value(v){};

template<typename T, class Exponents>
physical::FixedPhysical< T, Exponents >::FixedPhysical ( const FixedPhysical< T, Exponents > &  v  )  [inline]

copy c'tor

Definition at line 41 of file Copy of fixedphysical.hpp.

00041 : numerical_value(v.numerical_value){};

template<class UnitSystem, typename T, class Exponents>
physical::FixedPhysical< UnitSystem, T, Exponents >::FixedPhysical ( const DynamicPhysical v  ) 

conversion c'tor from DynamicPhysical

Definition at line 70 of file dynamicphysical.hpp.

References physical::DynamicPhysical< UnitSystem >::exponents, physical::DynamicPhysical< UnitSystem >::numerical_value, and physical::FixedPhysical< T, Exponents >::numerical_value.

00070                                                                                                    {
00071 
00072                 detail::DynamicExponents<UnitSystem> dynexp( (typename exponents()) );
00073 
00074                 if (dynexp==v.exponents) {
00075                         numerical_value = v.numerical_value;
00076                 } else {
00077                         // incompatible dimension, throw exception:
00078                         throw IncompatibleUnitException("attempt of conversion between incompatible quantities");
00079                 };
00080         }

template<typename T, class Exponents>
template<typename T2>
physical::FixedPhysical< T, Exponents >::FixedPhysical ( const FixedPhysical< T2, exponents > &  v  )  [inline]

conversion c'tor from other numerical type

Definition at line 48 of file Copy of fixedphysical.hpp.

00048 : numerical_value(v.numerical_value){};

template<typename T, class Exponents>
physical::FixedPhysical< T, Exponents >::FixedPhysical ( numerical_value_t  v  )  [inline, explicit]

explicit C'tor from real numbers. FIXME: should probably be private, but who is the friend?

Definition at line 40 of file fixedphysical.hpp.

00040 :numerical_value(v){};

template<typename T, class Exponents>
physical::FixedPhysical< T, Exponents >::FixedPhysical ( const FixedPhysical< T, Exponents > &  v  )  [inline]

copy c'tor

Definition at line 43 of file fixedphysical.hpp.

00043 : numerical_value(v.numerical_value){};

template<typename T, class Exponents>
physical::FixedPhysical< T, Exponents >::FixedPhysical ( const DynamicPhysical< UnitSystem > &  v  ) 

conversion c'tor from DynamicPhysical

template<typename T, class Exponents>
template<typename T2>
physical::FixedPhysical< T, Exponents >::FixedPhysical ( const FixedPhysical< UnitSystem, T2, exponents > &  v  )  [inline]

conversion c'tor from other numerical type

Definition at line 50 of file fixedphysical.hpp.

00050 : numerical_value(v.numerical_value){};


Member Data Documentation

template<typename T, class Exponents>
numerical_value_t physical::FixedPhysical< T, Exponents >::numerical_value

Definition at line 35 of file Copy of fixedphysical.hpp.

Referenced by BOOST_AUTO_UNIT_TEST(), physical::FixedPhysical< T, Exponents >::FixedPhysical(), physical::operator *(), physical::operator!=(), physical::operator+(), physical::operator-(), physical::operator/(), physical::operator==(), physical::operator>(), and physical::operator>=().


The documentation for this struct was generated from the following files:
Generated on Mon Apr 2 22:25:07 2007 for physical_svn by  doxygen 1.5.1-p1
hosted on SourceForge.net Logo