|
dimval 0.2.0
Modern C++23 header-only library of dimensional values (units, measures, ranges)
|
Polymorphic interface implemented by every UnitValue<U,T>. More...
#include <interface.hpp>

Public Member Functions | |
| virtual UnitDescriptor | descriptor () const noexcept=0 |
Full descriptor — read individual fields (descriptor().id, ...) from here. | |
| virtual double | numeric_as_double () const noexcept=0 |
| Numeric value as a double (lossy for >double types). | |
| virtual std::string | to_string () const =0 |
Render <value> <symbol> (or whatever the descriptor's formatter dictates). | |
| virtual std::string | to_formatted_string () const =0 |
| Render with the descriptor's default precision applied. | |
| virtual std::unique_ptr< IUnitValue > | clone () const =0 |
| Deep copy as the interface type — the moral equivalent of a virtual copy ctor. | |
Polymorphic interface implemented by every UnitValue<U,T>.