Unity Scopes API
|
Holds location attributes such as latitude, longitude, etc. More...
#include <unity/scopes/Location.h>
Public Member Functions | |
Location (double latitude, double longitude) | |
Construct a new Location with the specified latitude and longitude. More... | |
Location (VariantMap const &variant) | |
Construct a Location from a the given serialized VariantMap. | |
double | altitude () const |
Get the altitude. More... | |
bool | has_altitude () const |
Is there an altitude property. More... | |
std::string | area_code () const |
Get the area code. More... | |
bool | has_area_code () const |
Is there an area code property. More... | |
std::string | city () const |
Get the city name. More... | |
bool | has_city () const |
Is there a city property. More... | |
std::string | country_code () const |
Get the country code. More... | |
bool | has_country_code () const |
Is there a country code property. More... | |
std::string | country_name () const |
Get the country name. More... | |
bool | has_country_name () const |
Is there a country name property. More... | |
double | horizontal_accuracy () const |
Get the horizontal accuracy. More... | |
bool | has_horizontal_accuracy () const |
Is there a horizontal accuracy property. More... | |
double | latitude () const |
Get the latitude. More... | |
double | longitude () const |
Get the longitude. More... | |
VariantMap | serialize () const |
Return a dictionary of all location attributes. More... | |
std::string | region_code () const |
Get the region code. More... | |
bool | has_region_code () const |
Is there a region code property. More... | |
std::string | region_name () const |
Get the region name. More... | |
bool | has_region_name () const |
Is there a region name property. More... | |
double | vertical_accuracy () const |
Get the vertical accuracy. More... | |
bool | has_vertical_accuracy () const |
Is there a vertical accuracy property. More... | |
std::string | zip_postal_code () const |
Get the zip or postal code. More... | |
bool | has_zip_postal_code () const |
Is there a zip / postal code property. More... | |
void | set_altitude (double altitude) |
Set the altitude. More... | |
void | set_area_code (std::string const &area_code) |
Set the area code. More... | |
void | set_city (std::string const &city) |
Set the city name. More... | |
void | set_country_code (std::string const &country_code) |
Set the country code. More... | |
void | set_country_name (std::string const &country_name) |
Set the country name. More... | |
void | set_horizontal_accuracy (double horizontal_accuracy) |
Set the horizontal accuracy. More... | |
void | set_latitude (double latitude) |
Set the latitude. More... | |
void | set_longitude (double longitude) |
Set the longitude. More... | |
void | set_region_code (std::string const ®ion_code) |
Set the region code. More... | |
void | set_region_name (std::string const ®ion_name) |
Set the region name. More... | |
void | set_vertical_accuracy (double vertical_accuracy) |
Set the vertical_accuracy. More... | |
void | set_zip_postal_code (std::string const &zip_postal_code) |
Set the zip/postal code. More... | |
Copy and assignment | |
Copy and assignment operators (move and non-move versions) have the usual value semantics. | |
Location (Location const &other) | |
Location (Location &&) | |
Location & | operator= (Location const &other) |
Location & | operator= (Location &&) |
Holds location attributes such as latitude, longitude, etc.
unity::scopes::Location::Location | ( | double | latitude, |
double | longitude | ||
) |
Construct a new Location with the specified latitude and longitude.
latitude | Latitude |
longitude | Longitude |
double unity::scopes::Location::altitude | ( | ) | const |
Get the altitude.
unity::scopes::NotFoundException | if altitude is not set. |
std::string unity::scopes::Location::area_code | ( | ) | const |
Get the area code.
unity::scopes::NotFoundException | if area code is not set. |
std::string unity::scopes::Location::city | ( | ) | const |
Get the city name.
unity::scopes::NotFoundException | if city is not set. |
std::string unity::scopes::Location::country_code | ( | ) | const |
Get the country code.
unity::scopes::NotFoundException | if country code is not set. |
std::string unity::scopes::Location::country_name | ( | ) | const |
Get the country name.
unity::scopes::NotFoundException | if country name is not set. |
bool unity::scopes::Location::has_altitude | ( | ) | const |
Is there an altitude property.
bool unity::scopes::Location::has_area_code | ( | ) | const |
Is there an area code property.
bool unity::scopes::Location::has_city | ( | ) | const |
Is there a city property.
bool unity::scopes::Location::has_country_code | ( | ) | const |
Is there a country code property.
bool unity::scopes::Location::has_country_name | ( | ) | const |
Is there a country name property.
bool unity::scopes::Location::has_horizontal_accuracy | ( | ) | const |
Is there a horizontal accuracy property.
bool unity::scopes::Location::has_region_code | ( | ) | const |
Is there a region code property.
bool unity::scopes::Location::has_region_name | ( | ) | const |
Is there a region name property.
bool unity::scopes::Location::has_vertical_accuracy | ( | ) | const |
Is there a vertical accuracy property.
bool unity::scopes::Location::has_zip_postal_code | ( | ) | const |
Is there a zip / postal code property.
double unity::scopes::Location::horizontal_accuracy | ( | ) | const |
Get the horizontal accuracy.
unity::scopes::NotFoundException | if horizontal accuracy is not set. |
double unity::scopes::Location::latitude | ( | ) | const |
Get the latitude.
double unity::scopes::Location::longitude | ( | ) | const |
Get the longitude.
std::string unity::scopes::Location::region_code | ( | ) | const |
Get the region code.
unity::scopes::NotFoundException | if region code is not set. |
std::string unity::scopes::Location::region_name | ( | ) | const |
Get the region name.
unity::scopes::NotFoundException | if region name is not set. |
VariantMap unity::scopes::Location::serialize | ( | ) | const |
Return a dictionary of all location attributes.
void unity::scopes::Location::set_altitude | ( | double | altitude | ) |
Set the altitude.
altitude | In meters. |
void unity::scopes::Location::set_area_code | ( | std::string const & | area_code | ) |
Set the area code.
area_code | FIPS10-4 area code. |
void unity::scopes::Location::set_city | ( | std::string const & | city | ) |
Set the city name.
city | Name of the city. |
void unity::scopes::Location::set_country_code | ( | std::string const & | country_code | ) |
Set the country code.
country_code | FIPS10-4 country code. |
void unity::scopes::Location::set_country_name | ( | std::string const & | country_name | ) |
Set the country name.
country_name | Human readable country name. |
void unity::scopes::Location::set_horizontal_accuracy | ( | double | horizontal_accuracy | ) |
Set the horizontal accuracy.
horizontal_accuracy | Horizontal accouracy. |
void unity::scopes::Location::set_latitude | ( | double | latitude | ) |
Set the latitude.
latitude | Latitude. |
void unity::scopes::Location::set_longitude | ( | double | longitude | ) |
Set the longitude.
longitude | Latitude. |
void unity::scopes::Location::set_region_code | ( | std::string const & | region_code | ) |
Set the region code.
region_code | FIPS10-4 region code. |
void unity::scopes::Location::set_region_name | ( | std::string const & | region_name | ) |
Set the region name.
region_name | Human readable region name. |
void unity::scopes::Location::set_vertical_accuracy | ( | double | vertical_accuracy | ) |
Set the vertical_accuracy.
vertical_accuracy | Vertical accuracy in meters. |
void unity::scopes::Location::set_zip_postal_code | ( | std::string const & | zip_postal_code | ) |
Set the zip/postal code.
zip_postal_code | Either a zip or postal code. |
double unity::scopes::Location::vertical_accuracy | ( | ) | const |
Get the vertical accuracy.
unity::scopes::NotFoundException | if vertical accuracy is not set. |
std::string unity::scopes::Location::zip_postal_code | ( | ) | const |
Get the zip or postal code.
unity::scopes::NotFoundException | if postal code is not set. |