#include <units.h>

Public Member Functions | |
| Units () | |
| Units (const Units &u) | |
| Units (const Measurement &m) | |
| operator Measurement () const | |
| const Units & | operator= (const Units &u) |
| Units | operator* (const double d) const |
| Units | operator/ (const double d) const |
| const Units & | operator*= (const double d) |
| const Units & | operator/= (const double d) |
| Units | operator+ (const Units &u) const |
| Units | operator- (const Units &u) const |
| Units & | operator+= (const Units &u) |
| Units & | operator-= (const Units &u) |
| Units | operator- () const |
| bool | operator== (const Units &u) const |
| Equality. | |
| bool | operator!= (const Units &u) const |
| Inequality. | |
| bool | operator< (const Units &u) const |
| Less-than. | |
| bool | operator<= (const Units &u) const |
| Less-or-equal. | |
| bool | operator> (const Units &u) const |
| Greater-than. | |
| bool | operator>= (const Units &u) const |
| Greater-or-equal. | |
| operator double () const | |
| double | getRawValue () const |
| template<int m, int l, int t, int k, int i> | |
| Units< M-m, L-l, T-t, K-k, I-i > | operator/ (const Units< m, l, t, k, i > &u2) const |
| Division. | |
| template<int n> | |
| Units< M *n, L *n, T *n, K *n, I *n > | ipow () const |
| Integer Powers. | |
| template<> | |
| operator double () const | |
Static Public Member Functions | |
| static Units | sqrt (const Units< 2 *M, 2 *L, 2 *T, 2 *K, 2 *I > u) |
| Square root (not such nice syntax). | |
Purpose: Template class to create a 'Units' data type.
Original Author: Christopher Rettig ( rettigcd@bigfoot.com ) (This is not the original version)
Dev platform:
Tested on:
/home/john/freesteam/b13curve.h, /home/john/freesteam/b23curve.h, and /home/john/freesteam/satcurve.h.
| Units< M, L, T, K, I >::Units | ( | ) | [inline] |
| Units< M, L, T, K, I >::Units | ( | const Units< M, L, T, K, I > & | u | ) | [inline] |
| Units< M, L, T, K, I >::Units | ( | const Measurement & | m | ) | [inline] |
References Measurement::dim, Dimension::i, Dimension::k, Dimension::l, Dimension::m, Dimension::t, UNITS_CAST_ERROR, and Measurement::value.
| Units< M, L, T, K, I >::operator Measurement | ( | ) | const [inline] |
Casting *TO* Measurement objects
References Measurement::dim, Dimension::i, Dimension::k, Dimension::l, Dimension::m, Dimension::t, and Measurement::value.
| const Units& Units< M, L, T, K, I >::operator= | ( | const Units< M, L, T, K, I > & | u | ) | [inline] |
| Units Units< M, L, T, K, I >::operator* | ( | const double | d | ) | const [inline] |
| Units Units< M, L, T, K, I >::operator/ | ( | const double | d | ) | const [inline] |
| const Units& Units< M, L, T, K, I >::operator*= | ( | const double | d | ) | [inline] |
| const Units& Units< M, L, T, K, I >::operator/= | ( | const double | d | ) | [inline] |
| Units Units< M, L, T, K, I >::operator+ | ( | const Units< M, L, T, K, I > & | u | ) | const [inline] |
| Units Units< M, L, T, K, I >::operator- | ( | const Units< M, L, T, K, I > & | u | ) | const [inline] |
| Units& Units< M, L, T, K, I >::operator+= | ( | const Units< M, L, T, K, I > & | u | ) | [inline] |
| Units& Units< M, L, T, K, I >::operator-= | ( | const Units< M, L, T, K, I > & | u | ) | [inline] |
| Units Units< M, L, T, K, I >::operator- | ( | ) | const [inline] |
| bool Units< M, L, T, K, I >::operator== | ( | const Units< M, L, T, K, I > & | u | ) | const [inline] |
Equality.
| bool Units< M, L, T, K, I >::operator!= | ( | const Units< M, L, T, K, I > & | u | ) | const [inline] |
Inequality.
| bool Units< M, L, T, K, I >::operator< | ( | const Units< M, L, T, K, I > & | u | ) | const [inline] |
Less-than.
| bool Units< M, L, T, K, I >::operator<= | ( | const Units< M, L, T, K, I > & | u | ) | const [inline] |
Less-or-equal.
| bool Units< M, L, T, K, I >::operator> | ( | const Units< M, L, T, K, I > & | u | ) | const [inline] |
Greater-than.
| bool Units< M, L, T, K, I >::operator>= | ( | const Units< M, L, T, K, I > & | u | ) | const [inline] |
Greater-or-equal.
| Units< M, L, T, K, I >::operator double | ( | ) | const [inline] |
| double Units< M, L, T, K, I >::getRawValue | ( | ) | const [inline] |
| Units<M-m,L-l,T-t,K-k,I-i> Units< M, L, T, K, I >::operator/ | ( | const Units< m, l, t, k, i > & | u2 | ) | const [inline] |
Division.
SWIG can't handle the following, so this lot can't be wrapped easily, alas :-(
| Units<M*n,L*n,T*n,K*n,I*n> Units< M, L, T, K, I >::ipow | ( | ) | const [inline] |
Integer Powers.
Usage should be something like...
Temperature T = 300. * Kelvin; HeatFlux Q = SIGMA_C * ( T.pow<4>() - (300.*Kelvin).pow<4>())
| static Units Units< M, L, T, K, I >::sqrt | ( | const Units< 2 *M, 2 *L, 2 *T, 2 *K, 2 *I > | u | ) | [inline, static] |
Square root (not such nice syntax).
Usage like this:
Area ha = (100. * metre)*(100. * metre); Length side = Length::sqrt(ha);
| Units< 0, 0, 0, 0, 0 >::operator double | ( | ) | const [inline] |
Only defined for dimensionless values!
1.5.6