TypeSI
Units of 'Système international' Blended for C++
Loading...
Searching...
No Matches
Public Member Functions | List of all members
Si::Internal::GenericPrefix< Ratio, Unit > Class Template Reference

Generic type of unit with prefix. More...

#include <si_prefix.hpp>

Public Member Functions

const Unitraw () const
 Getter for raw Unit reference without prefix applied.
 
 GenericPrefix (const T &value)
 Explicit constructor from container type.
 
template<typename AnotherUnit , typename std::enable_if< std::is_same< Internal::Powers< AnotherUnit >, Internal::Powers< Unit > >::value, int >::type = 0>
 GenericPrefix (const GenericPrefix< Ratio, AnotherUnit > &unit)
 Implicit constructor from same units with different container type.
 
template<typename AnotherUnit , typename std::enable_if< std::is_same< T, Unit >::value||std::is_same< Internal::Powers< AnotherUnit >, Internal::Powers< Unit > >::value, int >::type = 0>
 GenericPrefix (const AnotherUnit &unit)
 Constructor from Unit type(implicit by default, can be made explicit by TYPE_SI_DISALLOW_IMPLICIT_PREFIX_CONVERSIONS macro)
 
template<typename AnotherRatio , typename AnotherUnit , typename std::enable_if< std::is_same< Internal::Powers< AnotherUnit >, Internal::Powers< Unit > >::value, int >::type = 0>
 GenericPrefix (const GenericPrefix< AnotherRatio, AnotherUnit > &unit)
 Explicit constructor from unit with different prefix(implicit by default, can be made explicit by TYPE_SI_DISALLOW_IMPLICIT_PREFIX_CONVERSIONS macro)
 
operator+ () const
 Conversion to container type via unary '+'.
 
template<typename U >
decltype(std::declval< Unit >()==std::declval< Unit >()) operator== (const U &unit) const
 Operator '=='.
 
template<typename U >
decltype(std::declval< Unit >() !=std::declval< Unit >()) operator!= (const U &unit) const
 Operator '!='.
 
template<typename U >
decltype(std::declval< Unit >()< std::declval< Unit >()) operator< (const U &unit) const
 Operator '<'.
 
template<typename U >
decltype(std::declval< Unit >()<=std::declval< Unit >()) operator<= (const U &unit) const
 Operator '<='.
 
template<typename U >
decltype(std::declval< Unit >() > std::declval< Unit >()) operator> (const U &unit) const
 Operator '>'.
 
template<typename U >
decltype(std::declval< Unit >() >=std::declval< Unit >()) operator>= (const U &unit) const
 Operator '>='.
 
template<typename U >
GenericPrefix operator+ (const U &unit) const
 Operator '+'.
 
template<typename U >
GenericPrefix operator+= (const U &unit)
 Operator '+='.
 
template<typename U >
GenericPrefix operator- (const U &unit) const
 Operator '-'.
 
template<typename U >
GenericPrefix operator-= (const U &unit)
 Operator '-='.
 
template<typename AnotherRatio , typename AnotherUnit >
GenericPrefix< std::ratio_multiply< Ratio, AnotherRatio >, decltype(std::declval< Unit >() *std::declval< AnotherUnit >())> operator* (const GenericPrefix< AnotherRatio, AnotherUnit > &unit) const
 Operator '*' for units with prefix.
 
template<typename AnotherUnit >
GenericPrefix< Ratio, decltype(std::declval< Unit >() *std::declval< AnotherUnit >())> operator* (const AnotherUnit &unit) const
 Operator '*' for units without prefix.
 
GenericPrefix operator*= (const T &value)
 Operator '*=' for container type.
 
template<typename AnotherRatio , typename AnotherUnit >
GenericPrefix< std::ratio_divide< Ratio, AnotherRatio >, decltype(std::declval< Unit >()/std::declval< AnotherUnit >())> operator/ (const GenericPrefix< AnotherRatio, AnotherUnit > &unit) const
 Operator '/' for units with prefix.
 
template<typename AnotherUnit >
GenericPrefix< Ratio, decltype(std::declval< Unit >() *std::declval< AnotherUnit >())> operator/ (const AnotherUnit &unit) const
 Operator '/' for units without prefix.
 
GenericPrefix operator/= (const T &value)
 Operator '/=' for container type.
 

Detailed Description

template<typename Ratio, typename Unit>
class Si::Internal::GenericPrefix< Ratio, Unit >

Generic type of unit with prefix.

Template Parameters
Ratiostd::ratio representing prefix
UnitTemplated class of SI unit

The documentation for this class was generated from the following file: