![]() |
Shamrock 2025.10.0
Astrophysical Code
|
One registry entry: a unit and the two names it can be looked up by. More...
#include <shamunits/include/shamunits/details/registry.hpp>
Public Member Functions | |
| constexpr | NamedUnit (std::string_view lname, std::string_view sname, Unit<> u) noexcept |
| Constructor, so registry rows stay compact: {"metre", "m", metre}. | |
Public Attributes | |
| std::string_view | long_name |
| e.g. "metre", "astronomical_unit" | |
| std::string_view | short_name |
| e.g. "m", "au" | |
| Unit | unit |
| the unit, always in the reference precision (double) | |
One registry entry: a unit and the two names it can be looked up by.
Definition at line 32 of file registry.hpp.
|
inlineconstexprnoexcept |
Constructor, so registry rows stay compact: {"metre", "m", metre}.
Definition at line 38 of file registry.hpp.
| std::string_view shamunits::NamedUnit::long_name |
e.g. "metre", "astronomical_unit"
Definition at line 33 of file registry.hpp.
| std::string_view shamunits::NamedUnit::short_name |
e.g. "m", "au"
Definition at line 34 of file registry.hpp.
| Unit shamunits::NamedUnit::unit |
the unit, always in the reference precision (double)
Definition at line 35 of file registry.hpp.