|
BIMHome v1.0.0
BIMHome接口文档说明
|
QuantityFormat 结构,用于定义数量的格式化选项 更多...
#include <Quantity.h>
Public 类型 | |
| enum | NumberFormat { Default = 0 , Fixed = 1 , Scientific = 2 } |
| 数字格式枚举 更多... | |
| enum | NumberOption { None = 0x00 , OmitGroupSeparator = 0x01 , RejectGroupSeparator = 0x02 } |
| 数字选项枚举 更多... | |
| typedef int | NumberOptions |
| 定义了数字格式化时的选项。 | |
Public 成员函数 | |
| int | getDenominator () const |
| 获取分母 | |
| QuantityFormat () | |
| 默认构造函数 | |
| QuantityFormat (NumberFormat format, int decimals=-1) | |
| 构造函数 | |
| void | setDenominator (int denom) |
| 设置分母 | |
| char | toFormat () const |
| 将数字格式转换为字符 | |
静态 Public 成员函数 | |
| static int | getDefaultDenominator () |
| 获取默认分母 | |
| static void | setDefaultDenominator (int denom) |
| 设置默认分母 | |
| static NumberFormat | toFormat (char c, bool *ok=nullptr) |
| 将字符转换为数字格式 | |
Public 属性 | |
| int | denominator |
| 分母 | |
| NumberFormat | format |
| 数字格式 | |
| NumberOptions | option |
| 数字选项 | |
| int | precision |
| 精度 | |
静态 Public 属性 | |
| static int | defaultDenominator |
| 默认的最小分数英寸分母 | |
QuantityFormat 结构,用于定义数量的格式化选项
该结构用于定义数量的格式化方式,包括数字格式、精度、分母等。