CNES/EleFits

Parse units

kabasset opened this issue · 0 comments

Instead of merely reading Record units as strings, parsing them as a proper object, like boost::unit::quantity, would be nice, e.g. Record::quantity<Unit>(). Yet, seems complex as I didn't find any convincing runtime quantity/UoM library, and implementing one is not as straightforward as it might seem at first sight (which might be why there is none).

One thing which would be simpler in our case than in general purpose library, is that we'd only need to check that the user-required unit is (compatible with) that in the Fits (writing is easy).