XUnitSystem(ulong id)

原型 XUnitSystem(ulong id)
描述 构造函数
参数 [i]ulong id: 对象ID
返回值

~XUnitSystem()

原型 ~XUnitSystem()
描述 析构函数
参数
返回值

static int getUnitCount(TypeID unitType)

原型 static int getUnitCount(TypeID unitType)
描述 静态函数,获取指定类型的单位个数
参数 [i]TypeID unitType: 单位类型
返回值 指定类型的单位个数

static const char * getUnitString(TypeID unitType, ulong unitID)

原型 static const char * getUnitString(TypeID unitType, ulong unitID)
描述 静态函数,获取指定类型单位指定单位值的字符串
参数 [i]TypeID unitType: 单位类型
[i] ulong unitID: 单位值
返回值

static const char * getUnitTypeString(TypeID unitType)

原型 static const char * getUnitTypeString(TypeID unitType)
描述 静态函数,获取指定类型单位的字符串
参数 [i]TypeID unitType: 单位类型
返回值 指定类型单位的字符串

static double convertToSI(TypeID unitType, ulong unitID, double curValue)

原型 static double convertToSI(TypeID unitType, ulong unitID, double curValue)
描述 将值转换为SI单位系统的值
参数 [i]TypeID unitType: 单位类型
[i] ulong unitID: 源单位值
[i] double curValue: 源单位系下的值
返回值 SI单位系下的值

static double convertFromSI(TypeID unitType, ulong unitID, double coreValue)

原型 static double convertFromSI(TypeID unitType, ulong unitID, double coreValue)
描述 将SI单位系下的值转换为目标单位系的值
参数 [i]TypeID unitType: 单位类型
[i] ulong unitID: 目标单位值
[i] double coreValue: SI单位系下的值
返回值 目标单位系下的值

static int getSIUnit(TypeID unitType)

原型 static int getSIUnit(TypeID unitType)
描述 获取SI单位系下的指定类型的单位值
参数 [i]TypeID unitType: 单位类型
返回值 SI单位系下的指定类型的单位值

double getValue(TypeID unitType, double siValue) const

原型 double getValue(TypeID unitType, double siValue) const
描述 将SI系下的值转换为获取本单位系统下的值
参数 [i]TypeID unitType: 单位类型
[i] double siValue: SI系下的值
返回值 本单位系统下的值

double getSIValue(TypeID unitType, double value) const

原型 double getSIValue(TypeID unitType, double value) const
描述 将本单位系统下的值转为SI系下的值
参数 [i]TypeID unitType: 单位类型
[i] double value: 本单位系统下的值
返回值 SI系下的值

int & getUnit(TypeID unitType)

原型 int & getUnit(TypeID unitType)
描述 获取指定类型的单位值选项
参数 [i]TypeID unitType: 单位类型
返回值 指定类型的单位值选项

int getUnit(TypeID unitType) const

原型 int getUnit(TypeID unitType) const
描述 获取指定类型的单位值选项
参数 [i]TypeID unitType: 单位类型
返回值 指定类型的单位值选项

void setUnit(TypeID unitType, ulong unitID)

原型 void setUnit(TypeID unitType, ulong unitID)
描述 设置指定类型的单位值
参数 [i]TypeID unitType: 单位类型
[i] ulong unitID: 指定类型的单位值
返回值

virtual void write(XBinaryIO * io)

原型 virtual void write(XBinaryIO * io)
描述 将对象数据写入到二进制文件中
参数 [i]XBinaryIO * io: 二进制文件句柄
返回值

virtual ErrorCode read(XBinaryIO * io)

原型 virtual ErrorCode read(XBinaryIO * io)
描述 从二进制文件中读取对象数据
参数 [i]XBinaryIO * io: 二进制文件句柄
返回值 如成功读取返回Error_None, 否则返回相应错误码