6 #ifndef TRUNK_GEONAMES_GEOREADER_V2_LOCATION_H_
7 #define TRUNK_GEONAMES_GEOREADER_V2_LOCATION_H_
10 #include "./Country.h"
11 #include "./FeatureType.h"
16 std::string name =
"";
24 std::string longitude =
"";
25 std::string latitude =
"";
29 std::string getFullName() {
return (name + suffix); }
31 bool operator< (
const Location& rhs)
const {
32 return name == rhs.name ? population > rhs.population : name < rhs.name;
37 bool operator== (
const Location& rhs)
const {
38 return (name == rhs.name && country == rhs.country
39 && admin1 == rhs.admin1 && admin2 == rhs.admin2
40 && admin3 == rhs.admin3 && admin4 == rhs.admin4);
45 if (name.size() == 0) name = a.name;
46 if (country == NULL) country = a.country;
47 if (admin1 == NULL) admin1 = a.admin1;
48 if (admin2 == NULL) admin2 = a.admin2;
49 if (admin3 == NULL) admin3 = a.admin3;
50 if (admin4 == NULL) admin4 = a.admin4;
51 if (population == 0) population = a.population;
56 #endif // TRUNK_GEONAMES_GEOREADER_V2_LOCATION_H_