|
🛰️航天仿真算法库 SpaceAST 0.0.1
|
#include <Unit.hpp>
类 | |
| class | UnitRep |
Public 类型 | |
| using | UnitRepHandle = std::shared_ptr<UnitRep> |
| using | UnitRepPair = std::pair<UnitRepHandle, int> |
| using | SubUnitList = std::vector<UnitRepPair> |
| using | UnitRepHandleConst = std::shared_ptr<const UnitRep> |
| using | UnitRepPairConst = std::pair<UnitRepHandleConst, int> |
| using | SubUnitListConst = std::vector<UnitRepPairConst> |
Public 成员函数 | |
| Unit () | |
| Unit (StringView name, double scale, Dimension dimension) | |
| double | fromSI (double value) const |
| double | toSI (double value) const |
| double | convertTo (double value, const Unit &unit) const |
| double | convertFrom (double value, const Unit &unit) const |
| double | getScale () const |
| Dimension | dimension () const |
| const std::string & | name () const |
| bool | isValid () const |
| Unit | clone () const |
| Unit | invert () const |
| Unit | multiply (StringView newname, const Unit &other) const |
| Unit | divide (StringView newname, const Unit &other) const |
| Unit | scale (StringView newname, double factor) const |
| Unit | pow (StringView newname, int exponent) const |
| Unit | pow (int exponent) const |
| bool | operator== (const Unit &other) const |
| bool | operator!= (const Unit &other) const |
| Unit | operator* (const Unit &other) const |
| Unit | operator/ (const Unit &other) const |
| Unit & | operator*= (const Unit &other) |
| Unit & | operator/= (const Unit &other) |
静态 Public 成员函数 | |
| static Unit | NaN () |
| static Unit | None () |
| static Unit | One () |
| static AST_UTIL_API Unit | Scale (double scale) |
| static Unit | Percent () |
| static Unit | Second () |
| static Unit | Minute () |
| static Unit | Hour () |
| static Unit | Day () |
| static Unit | MilliSecond () |
| static Unit | Meter () |
| static Unit | Kilometer () |
| static Unit | Centimeter () |
| static Unit | Decimeter () |
| static Unit | Millimeter () |
| static Unit | Inch () |
| static Unit | Foot () |
| static Unit | Yard () |
| static Unit | Mile () |
| static Unit | Kilogram () |
| static Unit | Gram () |
| static Unit | Milligram () |
| static Unit | Pound () |
| static Unit | Radian () |
| static Unit | Degree () |
| static Unit | ArcSecond () |
| static Unit | Newton () |
| static Unit | Ampere () |
| static Unit | Kelvin () |
| static Unit | Mole () |
| static Unit | CentimeterPerSecond () |
| static Unit | KilometerPerHour () |
| static Unit | MeterPerMinute () |
| static Unit | SquareMeter () |
| static Unit | SquareKilometer () |
| static Unit | SquareFoot () |
| static Unit | SquareYard () |
| static Unit | CubicMeter () |
| static Unit | Liter () |
Public 属性 | |
| UnitRepHandle | rep_ |
Protected 成员函数 | |
| Unit (double scale, Dimension dimension, const SubUnitListConst &subunits) | |
| Unit (UnitRepHandle rep) | |
友元 | |
| Unit | unit_multiply (const Unit &unit1, const Unit &unit2) |
| Unit | unit_divide (const Unit &unit1, const Unit &unit2) |
| Unit | unit_power (const Unit &unit, int exponent) |
| void | unit_setname (Unit &unit, StringView name) |
单位
| using ast::Unit::UnitRepHandle = std::shared_ptr<UnitRep> |
单位表示
单位表示句柄
|
inlineprotected |
| rep | 单位表示 |
|
inline |
单位克隆
|
inline |
转换为指定单位下的值
| value | 该单位对应的值 |
|
inline |
转换为指定单位下的值
| value | 该单位对应的值 |
|
inline |
获取单位量纲
|
inline |
单位除法
| newname | 新单位名称 |
| other | 其他单位 |
|
inline |
从国际单位制转换为该单位对应的值
| value | 国际单位制下的值 |
|
inline |
获取单位缩放因子
|
inline |
是否有效单位
|
inline |
单位乘法
| newname | 新单位名称 |
| other | 其他单位 |
|
inline |
获取单位名称
|
inline |
单位不相等运算符
| other | 其他单位 |
|
inline |
单位相等运算符
| other | 其他单位 |
|
inline |
单位幂运算
| exponent | 指数 |
|
inline |
单位幂运算
| newname | 新单位名称 |
| exponent | 指数 |
|
static |
新建无量纲单位
| scale | 缩放因子 |
|
inline |
单位缩放
| newname | 新单位名称 |
| factor | 缩放因子 |
|
inline |
从该单位对应的值转换为国际单位制下的值
| value | 该单位对应的值 |
单位乘法
| unit1 | 单位1 |
| unit2 | 单位2 |
|
friend |
设置单位名称
| unit | 单位 |
| name | 名称 |