diff options
author | vng <viktor.govako@gmail.com> | 2014-02-06 17:58:30 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:13:26 +0300 |
commit | 610b4b2a67b189abb3eadae3005c54ceaa80143a (patch) | |
tree | 70db14bc507fb1411206b5eaae8c4bb963bd9b8c /indexer/feature_data.hpp | |
parent | ba6f650217582dd58e389980eb9e530de9b9224f (diff) |
[generator_tool] Refactoring of address file generation. Use --address_file_name=address.txt option.
Diffstat (limited to 'indexer/feature_data.hpp')
-rw-r--r-- | indexer/feature_data.hpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/indexer/feature_data.hpp b/indexer/feature_data.hpp index 8ca13a6da0..97ebf03311 100644 --- a/indexer/feature_data.hpp +++ b/indexer/feature_data.hpp @@ -1,6 +1,8 @@ #pragma once #include "feature_decl.hpp" +#include "../geometry/point2d.hpp" + #include "../coding/multilang_utf8_string.hpp" #include "../coding/value_opt_string.hpp" #include "../coding/reader.hpp" @@ -112,8 +114,6 @@ struct FeatureParamsBase string flats; int8_t layer; uint8_t rank; - /// We use it now only for search unit tests - string m_streetAddress; FeatureParamsBase() : layer(0), rank(0) {} @@ -127,7 +127,6 @@ struct FeatureParamsBase void AddHouseName(string const & s); void AddHouseNumber(string const & s); - void AddStreetAddress(string const & s); template <class TSink> void Write(TSink & sink, uint8_t header) const @@ -194,18 +193,29 @@ class FeatureParams : public FeatureParamsBase uint8_t m_geomType; + /// We use it now only for search unit tests + string m_streetAddress; + public: typedef vector<uint32_t> types_t; types_t m_Types; FeatureParams() : m_geomType(0xFF) {} + /// @name Used in storing full street address only. + //@{ + inline void AddStreetAddress(string const & s) { m_streetAddress = s; } + bool FormatFullAddress(m2::PointD const & pt, string & res) const; + //@} + /// Assign parameters except geometry type. /// Geometry is independent state and it's set by FeatureType's geometry functions. inline void SetParams(FeatureParams const & rhs) { BaseT::operator=(rhs); + m_Types = rhs.m_Types; + m_streetAddress = rhs.m_streetAddress; } inline bool IsValid() const { return !m_Types.empty(); } |