diff options
author | Sergey Magidovich <mgsergio@mapswithme.com> | 2016-05-17 17:11:17 +0300 |
---|---|---|
committer | Sergey Magidovich <mgsergio@mapswithme.com> | 2016-05-25 13:17:08 +0300 |
commit | 46b0728df00db943fe5f94e18bd8ce65bef9c5cf (patch) | |
tree | 244fe567486385ebdda78a9554fd6a7bb45d6573 /indexer/editable_map_object.hpp | |
parent | b779e8c366f7e3317b869aef4e308bd5b3f9ee1b (diff) |
Implement fields validation in editor.
Diffstat (limited to 'indexer/editable_map_object.hpp')
-rw-r--r-- | indexer/editable_map_object.hpp | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/indexer/editable_map_object.hpp b/indexer/editable_map_object.hpp index eef0ddb55d..ac7b0db100 100644 --- a/indexer/editable_map_object.hpp +++ b/indexer/editable_map_object.hpp @@ -78,24 +78,26 @@ public: void SetMercator(m2::PointD const & center); void SetType(uint32_t featureType); void SetID(FeatureID const & fid); + // void SetTypes(feature::TypesHolder const & types); void SetStreet(LocalizedStreet const & st); void SetNearbyStreets(vector<LocalizedStreet> && streets); - /// @returns false if house number fails validation. - static bool ValidateHouseNumber(string const & houseNumber); void SetHouseNumber(string const & houseNumber); void SetPostcode(string const & postcode); void SetPhone(string const & phone); void SetFax(string const & fax); + void SetEmail(string const & email); - void SetWebsite(string const & website); + void SetWebsite(string website); + void SetWikipedia(string const & wikipedia); + void SetInternet(Internet internet); void SetStars(int stars); void SetOperator(string const & op); + void SetElevation(double ele); - void SetWikipedia(string const & wikipedia); void SetFlats(string const & flats); - static bool ValidateBuildingLevels(string const & buildingLevels); + void SetBuildingLevels(string const & buildingLevels); /// @param[in] cuisine is a vector of osm cuisine ids. void SetCuisines(vector<string> const & cuisine); @@ -104,6 +106,15 @@ public: /// Special mark that it's a point feature, not area or line. void SetPointType(); + static bool ValidateBuildingLevels(string const & buildingLevels); + static bool ValidateHouseNumber(string const & houseNumber); + static bool ValidateFlats(string const & flats); + static bool ValidatePostCode(string const & postCode); + static bool ValidatePhone(string const & phone); + static bool ValidateFax(string const & fax); + static bool ValidateWebsite(string const & site); + static bool ValidateEmail(string const & email); + private: string m_houseNumber; LocalizedStreet m_street; |