14 #ifndef DISTANCEUNIT_H
15 #define DISTANCEUNIT_H
39 std::ostream &operator << (std::ostream &out,
DistanceUnit unit);
40 std::istream &operator >> (std::istream &in,
DistanceUnit &unit);
std::string format_abbrev_unit(DistanceUnit unit)
Returns the string representing the common abbreviation for the given unit.
DistanceUnit
This enumerated type lists all the kinds of units we're likely to come across in model conversion pro...
double convert_units(DistanceUnit from, DistanceUnit to)
Returns the scaling factor that must be applied to convert from units of "from" to "to".
std::string format_long_unit(DistanceUnit unit)
Returns the string representing the full name (plural) for the given unit.
DistanceUnit string_distance_unit(const std::string &str)
Converts from a string, as might be input by the user, to one of the known DistanceUnit types.