File SBDQuantityType.hpp#
FileList > DataModel > Quantity > SBDQuantityType.hpp
#include "SBCMetaCheckTypeEquality.hpp"
#include "SBCMetaIsNumericType.hpp"
#include "SBDQuantityConverter.hpp"
#include "SBDQuantityPowerOfTen.hpp"
#include "SBDQuantityUnitConverter.hpp"
#include "SBDQuantityUnitType.hpp"
#include "SBDQuantityUnitDivision.hpp"
#include "SBDQuantityUnitMultiplication.hpp"
#include "SBCSerializer.hpp"
#include "SBCContainerVersionNumber.hpp"
#include "SBCLog.hpp"
#include <math.h>
Classes#
Type | Name |
---|---|
class | SBDQuantityType <typename Unit, typename Value> This template class defines physical quantity types. |
Public Attributes#
Type | Name |
---|---|
SBDQuantityType< Unit, Value > const | one |
SBDQuantityType< Unit, Value > const | zero |
Public Functions#
Type | Name |
---|---|
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > | acos (const SBDQuantityType< Unit, Value > & q) Returns the acos of physical quantity q (for dimensionless physical quantities only) |
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > | asin (const SBDQuantityType< Unit, Value > & q) Returns the asin of physical quantity q (for dimensionless physical quantities only) |
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > | atan (const SBDQuantityType< Unit, Value > & q) Returns the atan of physical quantity q (for dimensionless physical quantities only) |
SBDQuantityType< SBDQuantityUnitType< typename UnitA::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > | atan2 (const SBDQuantityType< UnitA, Value > & a, const SBDQuantityType< UnitB, Value > & b) Returns the atan2 of physical quantities a andb . |
SBDQuantityType< Unit, Value > | ceil (const SBDQuantityType< Unit, Value > & q) noexcept Returns the ceil value of physical quantity q . |
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > | cos (const SBDQuantityType< Unit, Value > & q) Returns the cos of physical quantity q (for dimensionless physical quantities only) |
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > | exp (const SBDQuantityType< Unit, Value > & q) Returns the exponential of physical quantity q (for dimensionless physical quantities only) |
SBDQuantityType< Unit, Value > | fabs (const SBDQuantityType< Unit, Value > & q) noexcept Returns the absolute value of physical quantity q . |
SBDQuantityType< Unit, Value > | floor (const SBDQuantityType< Unit, Value > & q) noexcept Returns the floor value of physical quantity q . |
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > | log (const SBDQuantityType< Unit, Value > & q) Returns the logarithm of physical quantity q (for dimensionless physical quantities only) |
bool | operator!= (double d, const SBDQuantityType< Unit, Value > & q) Returns true when double d and physical quantityq are different (for dimensionless physical quantities only) |
SBDQuantityType< Unit, Value > | operator* (double d, const SBDQuantityType< Unit, Value > & q) Returns the product of double d with physical quantityq . |
SBDQuantityType< Unit, Value > | operator* (double d, const Unit & u) Returns the product of double d with unitu . |
SBDQuantityType< Unit, Value > | operator+ (double d, const SBDQuantityType< Unit, Value > & q) Returns the sum of double d with physical quantityq (for dimensionless physical quantities only) |
SBDQuantityType< Unit, Value > | operator- (double d, const SBDQuantityType< Unit, Value > & q) Returns the difference between double d and physical quantityq (for dimensionless physical quantities only) |
SBDQuantityType< typename SBDQuantityUnitDivision< double, Unit >::UnitType, Value > | operator/ (double d, const SBDQuantityType< Unit, Value > & q) Returns the division of double d by physical quantityq . |
bool | operator< (double d, const SBDQuantityType< Unit, Value > & q) Returns true when double d is smaller than physical quantityq (for dimensionless physical quantities only) |
std::ostream & | operator<< (std::ostream & s, const SBDQuantityType< Unit, Value > & q) Inserts the physical quantity q in the output streams . |
bool | operator<= (double d, const SBDQuantityType< Unit, Value > & q) Returns true when double d is smaller than or equal to physical quantityq (for dimensionless physical quantities only) |
bool | operator== (double d, const SBDQuantityType< Unit, Value > & q) Returns true when double d and physical quantityq are equal (for dimensionless physical quantities only) |
bool | operator> (double d, const SBDQuantityType< Unit, Value > & q) Returns true when double d is larger than physical quantityq (for dimensionless physical quantities only) |
bool | operator>= (double d, const SBDQuantityType< Unit, Value > & q) Returns true when double d is larger than or equal to physical quantityq (for dimensionless physical quantities only) |
std::istream & | operator>> (std::istream & s, SBDQuantityType< Unit, Value > & q) Sets the physical quantity q from the input streams . |
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, Unit::scale1, p *Unit::exponent1, Unit::scale2, p *Unit::exponent2, Unit::scale3, p *Unit::exponent3, Unit::scale4, p *Unit::exponent4, Unit::scale5, p *Unit::exponent5, Unit::scale6, p *Unit::exponent6, Unit::scale7, p *Unit::exponent7 >, Value > | pow (const SBDQuantityType< Unit, Value > & q) Returns the p th power of physical quantityq . |
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, Unit::scale1, Unit::exponent1/p, Unit::scale2, Unit::exponent2/p, Unit::scale3, Unit::exponent3/p, Unit::scale4, Unit::exponent4/p, Unit::scale5, Unit::exponent5/p, Unit::scale6, Unit::exponent6/p, Unit::scale7, Unit::exponent7/p >, Value > | root (const SBDQuantityType< Unit, Value > & q) Returns the p th root of physical quantityq . |
SBDQuantityType< Unit, Value > | round (const SBDQuantityType< Unit, Value > & q) noexcept Returns the round value of physical quantity q . |
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > | sin (const SBDQuantityType< Unit, Value > & q) Returns the sin of physical quantity q (for dimensionless physical quantities only) |
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, Unit::scale1, Unit::exponent1/2, Unit::scale2, Unit::exponent2/2, Unit::scale3, Unit::exponent3/2, Unit::scale4, Unit::exponent4/2, Unit::scale5, Unit::exponent5/2, Unit::scale6, Unit::exponent6/2, Unit::scale7, Unit::exponent7/2 >, Value > | sqrt (const SBDQuantityType< Unit, Value > & q) Returns the square root of physical quantity q . |
SBDQuantityType< SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > | tan (const SBDQuantityType< Unit, Value > & q) Returns the tan of physical quantity q (for dimensionless physical quantities only) |
SBDQuantityType< Unit, Value > | trunc (const SBDQuantityType< Unit, Value > & q) noexcept Returns the trunc value of physical quantity q . |
Macros#
Type | Name |
---|---|
define | SBQuantityType |
Public Attributes Documentation#
variable one#
variable zero#
Public Functions Documentation#
function acos#
Returns the acos of physical quantity q
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > acos (
const SBDQuantityType < Unit, Value > & q
)
function asin#
Returns the asin of physical quantity q
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > asin (
const SBDQuantityType < Unit, Value > & q
)
function atan#
Returns the atan of physical quantity q
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > atan (
const SBDQuantityType < Unit, Value > & q
)
function atan2#
Returns the atan2 of physical quantities a
andb
.
template<typename UnitA, typename UnitB, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename UnitA::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > atan2 (
const SBDQuantityType < UnitA, Value > & a,
const SBDQuantityType < UnitB, Value > & b
)
function ceil#
Returns the ceil value of physical quantity q
.
template<typename Unit, typename Value>
SBDQuantityType < Unit, Value > ceil (
const SBDQuantityType < Unit, Value > & q
) noexcept
function cos#
Returns the cos of physical quantity q
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > cos (
const SBDQuantityType < Unit, Value > & q
)
function exp#
Returns the exponential of physical quantity q
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > exp (
const SBDQuantityType < Unit, Value > & q
)
function fabs#
Returns the absolute value of physical quantity q
.
template<typename Unit, typename Value>
SBDQuantityType < Unit, Value > fabs (
const SBDQuantityType < Unit, Value > & q
) noexcept
function floor#
Returns the floor value of physical quantity q
.
template<typename Unit, typename Value>
SBDQuantityType < Unit, Value > floor (
const SBDQuantityType < Unit, Value > & q
) noexcept
function log#
Returns the logarithm of physical quantity q
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > log (
const SBDQuantityType < Unit, Value > & q
)
function operator!=#
Returns true when double d
and physical quantityq
are different (for dimensionless physical quantities only)
template<typename Unit, typename Value>
bool operator!= (
double d,
const SBDQuantityType < Unit, Value > & q
)
function operator*#
Returns the product of double d
with physical quantityq
.
template<typename Unit, typename Value>
SBDQuantityType < Unit, Value > operator* (
double d,
const SBDQuantityType < Unit, Value > & q
)
function operator*#
Returns the product of double d
with unitu
.
template<typename Unit, typename Value>
SBDQuantityType < Unit, Value > operator* (
double d,
const Unit & u
)
function operator+#
Returns the sum of double d
with physical quantityq
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
SBDQuantityType < Unit, Value > operator+ (
double d,
const SBDQuantityType < Unit, Value > & q
)
function operator-#
Returns the difference between double d
and physical quantityq
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
SBDQuantityType < Unit, Value > operator- (
double d,
const SBDQuantityType < Unit, Value > & q
)
function operator/#
Returns the division of double d
by physical quantityq
.
template<typename Unit, typename Value>
SBDQuantityType < typename SBDQuantityUnitDivision< double, Unit >::UnitType, Value > operator/ (
double d,
const SBDQuantityType < Unit, Value > & q
)
function operator<#
Returns true when double d
is smaller than physical quantityq
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
bool operator< (
double d,
const SBDQuantityType < Unit, Value > & q
)
function operator<<#
Inserts the physical quantity q
in the output streams
.
template<typename Unit, typename Value>
std::ostream & operator<< (
std::ostream & s,
const SBDQuantityType < Unit, Value > & q
)
function operator<=#
Returns true when double d
is smaller than or equal to physical quantityq
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
bool operator<= (
double d,
const SBDQuantityType < Unit, Value > & q
)
function operator==#
Returns true when double d
and physical quantityq
are equal (for dimensionless physical quantities only)
template<typename Unit, typename Value>
bool operator== (
double d,
const SBDQuantityType < Unit, Value > & q
)
function operator>#
Returns true when double d
is larger than physical quantityq
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
bool operator> (
double d,
const SBDQuantityType < Unit, Value > & q
)
function operator>=#
Returns true when double d
is larger than or equal to physical quantityq
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
bool operator>= (
double d,
const SBDQuantityType < Unit, Value > & q
)
function operator>>#
Sets the physical quantity q
from the input streams
.
template<typename Unit, typename Value>
std::istream & operator>> (
std::istream & s,
SBDQuantityType < Unit, Value > & q
)
function pow#
Returns the p
th power of physical quantityq
.
template<int p, typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, Unit::scale1, p *Unit::exponent1, Unit::scale2, p *Unit::exponent2, Unit::scale3, p *Unit::exponent3, Unit::scale4, p *Unit::exponent4, Unit::scale5, p *Unit::exponent5, Unit::scale6, p *Unit::exponent6, Unit::scale7, p *Unit::exponent7 >, Value > pow (
const SBDQuantityType < Unit, Value > & q
)
function root#
Returns the p
th root of physical quantityq
.
template<int p, typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, Unit::scale1, Unit::exponent1/p, Unit::scale2, Unit::exponent2/p, Unit::scale3, Unit::exponent3/p, Unit::scale4, Unit::exponent4/p, Unit::scale5, Unit::exponent5/p, Unit::scale6, Unit::exponent6/p, Unit::scale7, Unit::exponent7/p >, Value > root (
const SBDQuantityType < Unit, Value > & q
)
function round#
Returns the round value of physical quantity q
.
template<typename Unit, typename Value>
SBDQuantityType < Unit, Value > round (
const SBDQuantityType < Unit, Value > & q
) noexcept
function sin#
Returns the sin of physical quantity q
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > sin (
const SBDQuantityType < Unit, Value > & q
)
function sqrt#
Returns the square root of physical quantity q
.
template<typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, Unit::scale1, Unit::exponent1/2, Unit::scale2, Unit::exponent2/2, Unit::scale3, Unit::exponent3/2, Unit::scale4, Unit::exponent4/2, Unit::scale5, Unit::exponent5/2, Unit::scale6, Unit::exponent6/2, Unit::scale7, Unit::exponent7/2 >, Value > sqrt (
const SBDQuantityType < Unit, Value > & q
)
function tan#
Returns the tan of physical quantity q
(for dimensionless physical quantities only)
template<typename Unit, typename Value>
SBDQuantityType < SBDQuantityUnitType< typename Unit::SystemType, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 >, Value > tan (
const SBDQuantityType < Unit, Value > & q
)
function trunc#
Returns the trunc value of physical quantity q
.
template<typename Unit, typename Value>
SBDQuantityType < Unit, Value > trunc (
const SBDQuantityType < Unit, Value > & q
) noexcept