Class ostk::physics::Unit

class Unit

Unit.

                        A unit of measurement is a definite magnitude of a quantity, defined and adopted by
                        convention or by law, that is used as a standard for measurement of the same kind of
                        quantity. Any other quantity of that kind can be expressed as a multiple of the unit of
                        measurement.

https://en.wikipedia.org/wiki/Unit_of_measurement

Public Types

enum class Type

Values:

enumerator Undefined
enumerator None
enumerator Length
enumerator Mass
enumerator Time
enumerator Temperature
enumerator ElectricCurrent
enumerator LuminousIntensity
enumerator Derived

Public Functions

Unit() = delete
Unit(const Unit &aUnit)
Unit &operator=(const Unit &aUnit)
bool operator==(const Unit &aUnit) const
bool operator!=(const Unit &aUnit) const
bool isDefined() const
bool isNone() const
Unit::Type getType() const
Real ratioTo(const Unit &aUnit) const
String toString() const

Public Static Functions

static Unit Undefined()
static Unit None()
static Unit Length(const unit::Length::Unit &aLengthUnit)
static Unit Derived(const unit::Derived::Unit &aDerivedUnit)
static String StringFromType(const Unit::Type &aType)

Friends

friend std::ostream &operator<<(std::ostream &anOutputStream, const Unit &aUnit)