morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::ui::Quantity Struct Reference

An exact decimal with a unit: the id of a unit of the server's unit systems (x-unitAlternatives). More...

#include <value.hpp>

Public Member Functions

bool operator== (Quantity const &other) const noexcept
 Equality of magnitude, places and unit.

Public Attributes

math::Rational value
 The exact magnitude, with its declared places.
std::string unit
 The unit id, such as mg/L.

Detailed Description

An exact decimal with a unit: the id of a unit of the server's unit systems (x-unitAlternatives).

Definition at line 109 of file value.hpp.

Member Function Documentation

◆ operator==()

bool morph::ui::Quantity::operator== ( Quantity const & other) const
inlinenodiscardnoexcept

Equality of magnitude, places and unit.

Parameters
otherThe quantity to compare with.
Returns
Whether magnitude, places and unit are all equal.

Definition at line 118 of file value.hpp.

Member Data Documentation

◆ value

math::Rational morph::ui::Quantity::value

The exact magnitude, with its declared places.

Definition at line 111 of file value.hpp.

◆ unit

std::string morph::ui::Quantity::unit

The unit id, such as mg/L.

Definition at line 113 of file value.hpp.


The documentation for this struct was generated from the following file: