MiseEnPlace 版本4.3.0

MiseEnPlace 版本4.3.0

测试经过测试
语言语言 SwiftSwift
许可证 MIT
发布时间最后发布日期2019年6月
SPM支持 Swift Package Manager (SPM)

Richard Piazza 维护。



MiseEnPlace 版本4.3.0

MiseEnPlace

Version Platform

MiseEnPlace 是一个用于将烹饪中常用的度量转换和解释的框架。

MeasurementUnit.swift

MeasurementUnit 枚举是 MiseEnPlace 框架的核心。这个枚举代表了一种度量单位,以及它所属的 MeasurementSystemMeasurementMethod

转换到其他单位和数量以及何时进行转换的所有逻辑都包含在这个枚举中。

MeasurementMethod.swift

MeasurementMethod 表示如何进行测量的方式。在 MiseEnPlace 框架的案例中,这意味着 Volume(体积)和 Mass(质量)。

MeasurementSystem.swift

类似于 MeasurementMethodMeasurementSystem 枚举表示可以使用的单位系统类型。目前只支持 US(美国)和 Metric(公制)。

MeasurementSystemMethod.swift

MeasurementSystemMethod 表示了如何组合 MeasurementMethodMeasurementSystem

Convertable.swift

Convertable 协议定义了执行转换和翻译所需的属性。协议的扩展提供了许多基于比率进行测量缩放的重要方法。

CookingMeasurement.swift

表示一个量和单位的配对。一个 CookingMeasurement 拥有多个关键的属性和函数,用于翻译可读性字符串。

Ratio.swift

体积和重量之间的关系。

Double+MiseEnPlace.swift

Double 的一个扩展,提供了确定值质量和在同一 MeasurementSystemMethod 内将一个量转换成另一个量的函数。

Fraction.swift

MiseEnPlace 框架中使用的分数值枚举。

Intergral.swift

一个包含常见积分值的枚举。主要用于iOS的MeasurementInputView。