#include <unit_converter.hh>
Definition at line 93 of file unit_converter.hh.
◆ UnitConverter()
UnitConverter::UnitConverter |
( |
| ) |
|
◆ add_converted_unit()
void UnitConverter::add_converted_unit |
( |
Factor |
factor, |
|
|
UnitData & |
unit_data, |
|
|
UnitSI & |
unit_si, |
|
|
double & |
coef |
|
) |
| |
|
protected |
Calculates UnitSi and coeficient of Factor, recursively calls this method for user defined formula.
Definition at line 173 of file unit_converter.cc.
◆ convert()
double UnitConverter::convert |
( |
std::string |
actual_unit | ) |
|
◆ get_input_type()
◆ read_unit()
UnitData UnitConverter::read_unit |
( |
std::string |
s | ) |
|
|
protected |
Parse and check unit defined in string format.
Return data in format UnitData
Definition at line 133 of file unit_converter.cc.
◆ unit_si()
UnitSI UnitConverter::unit_si |
( |
| ) |
const |
|
inline |
◆ basic_factors
Define all base and derived units given by their symbol.
Definition at line 96 of file unit_converter.hh.
◆ coef_
double UnitConverter::coef_ |
|
protected |
Coeficient of unit.
Coeficient is used if unit is not in basic format. Example: if the unit is specified in minutes, coeficient has value 60.
Definition at line 137 of file unit_converter.hh.
◆ unit_si_
UnitSI UnitConverter::unit_si_ |
|
protected |
The documentation for this class was generated from the following files: