CompiletimeSI

Generates SI units, prefixes and several utility functions (parsing and formatting) usable at compile time.

mixin template CompiletimeSI (
N
) {}

Members

Aliases

AbsorbedDose
alias AbsorbedDose = typeof(gray)
Undocumented in source.
Acceleration
alias Acceleration = typeof(meter / square(second))
Undocumented in source.
AmountOfSubstance
alias AmountOfSubstance = typeof(mole)
Undocumented in source.
Angle
alias Angle = typeof(radian)
Undocumented in source.
Area
alias Area = typeof(square(meter))
Undocumented in source.
Capacitance
alias Capacitance = typeof(farad)
Undocumented in source.
CatalyticActivity
alias CatalyticActivity = typeof(katal)
Undocumented in source.
CelsiusTemperature
alias CelsiusTemperature = typeof(celsius)
Undocumented in source.
Concentration
alias Concentration = typeof(mole / cubic(meter))
Undocumented in source.
CurrentDensity
alias CurrentDensity = typeof(ampere / square(meter))
Undocumented in source.
Dimensionless
alias Dimensionless = typeof(one)

Predefined quantity type templates for SI quantities

DoseEquivalent
alias DoseEquivalent = typeof(sievert)
Undocumented in source.
ElectricCharge
alias ElectricCharge = typeof(coulomb)
Undocumented in source.
ElectricConductance
alias ElectricConductance = typeof(siemens)
Undocumented in source.
ElectricCurrent
alias ElectricCurrent = typeof(ampere)
Undocumented in source.
ElectricPotential
alias ElectricPotential = typeof(volt)
Undocumented in source.
ElectricResistance
alias ElectricResistance = typeof(ohm)
Undocumented in source.
Energy
alias Energy = typeof(joule)
Undocumented in source.
Force
alias Force = typeof(newton)
Undocumented in source.
Frequency
alias Frequency = typeof(hertz)
Undocumented in source.
Heat
alias Heat = Energy
Undocumented in source.
Illuminance
alias Illuminance = typeof(lux)
Undocumented in source.
Inductance
alias Inductance = typeof(henry)
Undocumented in source.
Length
alias Length = typeof(meter)
Undocumented in source.
Luminance
alias Luminance = typeof(candela / square(meter))
Undocumented in source.
LuminousFlux
alias LuminousFlux = typeof(lumen)
Undocumented in source.
LuminousIntensity
alias LuminousIntensity = typeof(candela)
Undocumented in source.
MagneticFieldStrength
alias MagneticFieldStrength = typeof(ampere / meter)
Undocumented in source.
MagneticFlux
alias MagneticFlux = typeof(weber)
Undocumented in source.
MagneticFluxDensity
alias MagneticFluxDensity = typeof(tesla)
Undocumented in source.
Mass
alias Mass = typeof(kilogram)
Undocumented in source.
MassDensity
alias MassDensity = typeof(kilogram / cubic(meter))
Undocumented in source.
MassicConcentration
alias MassicConcentration = typeof(kilogram / cubic(meter))
Undocumented in source.
MolarConcentration
alias MolarConcentration = Concentration
Undocumented in source.
Power
alias Power = typeof(watt)
Undocumented in source.
Pressure
alias Pressure = typeof(pascal)
Undocumented in source.
Radioactivity
alias Radioactivity = typeof(becquerel)
Undocumented in source.
RefractiveIndex
alias RefractiveIndex = typeof(kilogram)
Undocumented in source.
SolidAngle
alias SolidAngle = typeof(steradian)
Undocumented in source.
Speed
alias Speed = typeof(meter / second)
Undocumented in source.
Surface
alias Surface = Area
Undocumented in source.
Temperature
alias Temperature = typeof(kelvin)
Undocumented in source.
Time
alias Time = typeof(second)
Undocumented in source.
Volume
alias Volume = typeof(cubic(meter))
Undocumented in source.
Work
alias Work = Energy
Undocumented in source.

Functions

parseSI
Q parseSI(S str)

Parses a string for a quantity of type Q at run time.

siFormat
auto siFormat(Q quantity)

Formats a SI quantity according to a format string known at compile time.

Manifest constants

siSymbols
enum siSymbols;
Undocumented in source.

Structs

SIFormatter
struct SIFormatter(string fmt, Q)

Formats a SI quantity according to a format string known at compile time.

Templates

si
template si(string str)

Creates a Quantity from a string at compile-time.

Meta