Package-level declarations
Types
Link copied to clipboard
data class CurrencyDescription(val name: String, val code: String, val symbol: String, val description: String)
Link copied to clipboard
data class SiDerivedUnitDescription(val name: String, val unitSymbol: String, val formula: String, val quantity: String)
Describes derived SI unit as name as 'volt', unitSymbol e.g. 'V', formula for calculation this unit from base SI-units.
Link copied to clipboard
data class SiUnitDescription(val name: String, val unitSymbol: String, val dimensionSymbol: String, val presentationPriority: Int, val quantityName: String)
Describes base SI unit as name as 'metre', unitSymbol e.g. 'm', dimensionSymbol as 'L', presentationPriority for pretty printing e.g. by metre and second should be 'ms' ans not 'sm' and quantityName e.g. 'length'.
Functions
Link copied to clipboard
Link copied to clipboard
fun generateBaseClassFile(siUnitDescription: SiUnitDescription, fileExtension: String, dir: File, generatorHeadPart: (String, String, String, Int, String) -> String, generatorPrefixesPart: (String, String, String, List<SiPrefix>) -> String, generatorFileName: (String, String) -> String = ::generateFileName)
Link copied to clipboard
Link copied to clipboard
Generates currency classes and their Jvm parts.
Link copied to clipboard
fun generateCurrenciesFiles(fileExtension: String, targetDirPath: String, generatorCurrencyFileContent: (CurrencyDescription) -> String)
Link copied to clipboard
Link copied to clipboard
fun generateDerivedClassFiles(dir: File, generatorDerivedClass: (SiDerivedUnitDescription, File) -> Unit)
Link copied to clipboard
fun generateDerivedTest(dirPath: String, generatorHeader: (SiDerivedUnitDescription) -> String, generatorPrefixes: (SiPrefix, SiDerivedUnitDescription) -> String, fileNameSuffix: String, fileEnd: String = "}")
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun generateSiUnitBaseTestFiles(dirPath: String, fileNameSuffix: String, generatorTestClassHeadPart: (SiUnitDescription) -> String, generatorUnitTestForPrefix: (SiPrefix, SiUnitDescription) -> String, fileEnd: String = "}")
Link copied to clipboard
Generates base unit classes. Not relevant for library users.
Link copied to clipboard
Generates classes for derived SI-units.
Link copied to clipboard
Generates common and jvm-specific currency tests.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Properties
Link copied to clipboard
List of most traded currencies
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Descriptions of derived SI units.
Link copied to clipboard
Link copied to clipboard
Descriptions of base SI-Units.
Link copied to clipboard
Link copied to clipboard