18 #ifndef LOCATION_SERVICE_COM_UBUNTU_LOCATION_WGS84_COORDINATE_H_
19 #define LOCATION_SERVICE_COM_UBUNTU_LOCATION_WGS84_COORDINATE_H_
21 #include "com/ubuntu/location/units/units.h"
33 template<
typename Coordinate>
36 static void check_and_throw_if_invalid(
const typename Coordinate::Quantity& coordinate)
41 template<
typename Tag,
typename UnitType>
44 typedef UnitType Unit;
45 typedef units::Quantity<Unit> Quantity;
47 explicit Coordinate(
const Quantity& value = Quantity()) : value(value)
54 return value == rhs.value;
59 return value != rhs.value;
65 template<
typename T,
typename U>
71 template<
typename T,
typename U>
72 std::ostream& operator<<(std::ostream& out, const Coordinate<T,U>& coord)
74 out <<
"Coordinate(" << coord.value <<
")";
81 #endif // LOCATION_SERVICE_COM_UBUNTU_LOCATION_WGS84_COORDINATE_H_