Since my last update, I have implemented a
Length class. This allows one to store a length with its unit as well as to perform unit conversions. These conversions include functions similar to those found in
helper/units.cpp where a length, a “from” unit, and a “to” unit are specified as well as additional functions that allow conversions of the form
length.value("to_unit"), where length is a variable of type
to_unit is the unit that one wants the value of the length in.
Over the past few days, I have been working on transitioning over from conversions using
SPUnit and the conversion functions in
helper/units.cpp to conversions using the new
Length class. While I originally planned on working incrementally by converting one file at a time, the code is more interconnected than I originally believed, turning the porting of one file at a time to the porting of quite a few more at a time.