Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

Class template quantity

boost::units::quantity — class declaration

Synopsis

// In header: <boost/units/quantity.hpp>

template<typename Unit, typename Y> 
class quantity {
public:
  // types
  typedef  ; 
  typedef                    ;
  typedef                 ; 

  // private member functions
   ();

  // public member functions
  ();
  ();
  ();
   ();
  template<typename YY> 
    (,  = );
  template<typename YY> 
    (,  = );
  template<typename YY> 
     ();
  template<typename Unit2, typename YY> 
    (,  = );
  template<typename Unit2, typename YY> 
    (,  = );
  template<typename Unit2, typename YY> 
     ();
   () ;
  template<typename Unit2, typename YY> 
     
    ();
  template<typename Unit2, typename YY> 
     
    ();
  template<typename Unit2, typename YY> 
     
    ();
  template<typename Unit2, typename YY> 
     
    ();
   ();
   ();

  // public static functions
   ();

  // protected member functions
  (, );
};

Description

quantity private member functions

  1.  ();

quantity public member functions

  1. ();
  2. ();
  3. ( source);
  4.  ( source);
  5. template<typename YY> 
      ( source,  = );
    implicit conversion between value types is allowed if allowed for value types themselves
  6. template<typename YY> 
      ( source,  = );
    implicit conversion between value types is not allowed if not allowed for value types themselves
  7. template<typename YY> 
       
      ( source);
    implicit assignment between value types is allowed if allowed for value types themselves
  8. template<typename Unit2, typename YY> 
      ( source,  = );
    explicit conversion between different unit systems is allowed if implicit conversion is disallowed
  9. template<typename Unit2, typename YY> 
      ( source,  = );
    implicit conversion between different unit systems is allowed if each fundamental dimension is implicitly convertible
  10. template<typename Unit2, typename YY> 
       
      ( source);
    implicit assignment between different unit systems is allowed if each fundamental dimension is implicitly convertible
  11.  () ;
    constant accessor to value

    can add a quantity of the same type if add_typeof_helper<value_type,value_type>::type is convertible to value_type

  12. template<typename Unit2, typename YY> 
       
      ( source);
    can subtract a quantity of the same type if subtract_typeof_helper<value_type,value_type>::type is convertible to value_type
  13. template<typename Unit2, typename YY> 
       
      ( source);
  14. template<typename Unit2, typename YY> 
       
      ( source);
  15. template<typename Unit2, typename YY> 
       
      ( source);
    can multiply a quantity by a scalar value_type if multiply_typeof_helper<value_type,value_type>::type is convertible to value_type
  16.  ( source);
    can divide a quantity by a scalar value_type if divide_typeof_helper<value_type,value_type>::type is convertible to value_type
  17.  ( source);

quantity public static functions

  1.  ( val);
    Construct quantity directly from value_type (potentially dangerous).

quantity protected member functions

  1. ( val, );

Specializations


PrevUpHomeNext