#include <InterpKernelUnit.hxx>
Public Member Functions | |
| Unit (const char *reprC, bool tryToInterp=true) | |
| Unit (const char *reprFortran, int sizeOfRepr, bool tryToInterp=true) | |
| void | tryToInterprate () const |
| bool | isInterpretationOK () const |
| bool | isCompatibleWith (const Unit &other) const |
| double | convert (const Unit &target, double sourceVal) const |
| std::string | getCoarseRepr () const |
Private Attributes | |
| std::string | _coarse_repr |
| bool | _is_interpreted |
| bool | _is_interpretation_ok |
| DecompositionInUnitBase | _decomp_in_base |
This class deals with units. This class has two main responsabilities :
All the possible units are represented with a unique tuple with 5 elements representing the unique decomposition of a unit in the following base.
dimension 0 stands for mass in g (NOT kg to simplify parsing). dimension 1 stands for length in m. dimension 2 stands for time in s. dimension 3 stands for elec intensity A. dimension 4 stands for temperature in K.
| Unit::Unit | ( | const char * | reprC, |
| bool | tryToInterp = true |
||
| ) |
References INTERP_KERNEL.Unit.tryToInterprate().
| Unit::Unit | ( | const char * | reprFortran, |
| int | sizeOfRepr, | ||
| bool | tryToInterp = true |
||
| ) |
| void Unit::tryToInterprate | ( | ) | const |
| bool Unit::isInterpretationOK | ( | ) | const |
References INTERP_KERNEL.Unit._is_interpretation_ok.
| bool Unit::isCompatibleWith | ( | const Unit & | other | ) | const |
| std::string Unit::getCoarseRepr | ( | ) | const |
References INTERP_KERNEL.Unit._coarse_repr.
std::string INTERP_KERNEL.Unit._coarse_repr [private] |
bool INTERP_KERNEL.Unit._is_interpreted [mutable, private] |
bool INTERP_KERNEL.Unit._is_interpretation_ok [mutable, private] |
DecompositionInUnitBase INTERP_KERNEL.Unit._decomp_in_base [mutable, private] |