|
dimval 0.2.0
Modern C++23 header-only library of dimensional values (units, measures, ranges)
|
Registry of measure descriptors. More...
#include <registry.hpp>
Public Member Functions | |
| void | register_measure (const MeasureDescriptor &d) |
| Register a descriptor. Existing entries with the same id are replaced. | |
| template<MeasureLike Measure> | |
| bool | register_measure () |
| Register a measure by tag — pulls the descriptor through Measure::descriptor(). | |
| bool | compatible (const std::string_view measure_id, const std::string_view unit_id) const |
True iff measure_id and unit_id both resolve and the measure's declared base unit equals unit_id. | |
Static Public Member Functions | |
| static MeasureRegistry & | global () |
| Process-wide singleton. | |
Registry of measure descriptors.
|
inline |
Register a measure by tag — pulls the descriptor through Measure::descriptor().
Returns false if the id was already present.