diff options
author | Sergey Yershov <yershov@corp.mail.ru> | 2015-08-25 15:40:15 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 03:03:17 +0300 |
commit | 3b8766bafc4a8a86b45b4966b09b10ae1312f330 (patch) | |
tree | 1dec2350d6f381dbe73a8ec944aec3c317ae5a91 /generator | |
parent | da18ac03c90e8a8a0a605ac0aaeba9b8cf672041 (diff) |
Rename classes and files
Diffstat (limited to 'generator')
-rw-r--r-- | generator/feature_generator.cpp | 5 | ||||
-rw-r--r-- | generator/intermediate_data.hpp | 2 | ||||
-rw-r--r-- | generator/osm_decl.hpp | 7 | ||||
-rw-r--r-- | generator/osm_source.cpp | 4 | ||||
-rw-r--r-- | generator/osm_translator.hpp (renamed from generator/osm_element.hpp) | 22 |
5 files changed, 17 insertions, 23 deletions
diff --git a/generator/feature_generator.cpp b/generator/feature_generator.cpp index a6dee9c6ab..48dbd2a741 100644 --- a/generator/feature_generator.cpp +++ b/generator/feature_generator.cpp @@ -1,9 +1,8 @@ #include "generator/feature_generator.hpp" -#include "generator/intermediate_data.hpp" -#include "generator/osm_element.hpp" - #include "generator/generate_info.hpp" +#include "generator/intermediate_data.hpp" #include "generator/osm_decl.hpp" +#include "generator/osm_translator.hpp" #include "indexer/cell_id.hpp" #include "indexer/data_header.hpp" diff --git a/generator/intermediate_data.hpp b/generator/intermediate_data.hpp index ad8c9735bb..2c02753171 100644 --- a/generator/intermediate_data.hpp +++ b/generator/intermediate_data.hpp @@ -18,6 +18,8 @@ #include "std/fstream.hpp" +#include "defines.hpp" + /// Classes for reading and writing any data in file with map of offsets for /// fast searching in memory by some key. namespace cache diff --git a/generator/osm_decl.hpp b/generator/osm_decl.hpp index f0ebf78c0a..3164ffdce6 100644 --- a/generator/osm_decl.hpp +++ b/generator/osm_decl.hpp @@ -14,13 +14,6 @@ #include "std/utility.hpp" #include "std/vector.hpp" -#define NODES_FILE "nodes.dat" -#define WAYS_FILE "ways.dat" -#define RELATIONS_FILE "relations.dat" -#define OFFSET_EXT ".offs" -#define ID2REL_EXT ".id2rel" -#define MAPPED_WAYS "mapped_ways.n2w" - struct WayElement { vector<uint64_t> nodes; diff --git a/generator/osm_source.cpp b/generator/osm_source.cpp index 41dd6d4e9f..f54b930028 100644 --- a/generator/osm_source.cpp +++ b/generator/osm_source.cpp @@ -2,7 +2,7 @@ #include "generator/feature_generator.hpp" #include "generator/intermediate_data.hpp" #include "generator/osm_decl.hpp" -#include "generator/osm_element.hpp" +#include "generator/osm_translator.hpp" #include "generator/osm_o5m_source.hpp" #include "generator/osm_source.hpp" #include "generator/polygonizer.hpp" @@ -482,7 +482,7 @@ bool GenerateFeaturesImpl(feature::GenerateInfo & info) cache.LoadIndex(); MainFeaturesEmitter bucketer(info); - SecondPassParser<MainFeaturesEmitter, TDataCache> parser( + OsmToFeatureTranslator<MainFeaturesEmitter, TDataCache> parser( bucketer, cache, info.m_makeCoasts ? classif().GetCoastType() : 0, info.GetAddressesFileName()); diff --git a/generator/osm_element.hpp b/generator/osm_translator.hpp index 2ae4457169..70cc981a67 100644 --- a/generator/osm_element.hpp +++ b/generator/osm_translator.hpp @@ -21,12 +21,12 @@ /// @param TEmitter Feature accumulating policy -/// @param THolder Nodes, ways, relations holder -template <class TEmitter, class THolder> -class SecondPassParser +/// @param TCache Nodes, ways, relations holder +template <class TEmitter, class TCache> +class OsmToFeatureTranslator { TEmitter & m_emitter; - THolder & m_holder; + TCache & m_holder; bool GetPoint(uint64_t id, m2::PointD & pt) const @@ -39,11 +39,11 @@ class SecondPassParser class holes_accumulator { - AreaWayMerger<THolder> m_merger; + AreaWayMerger<TCache> m_merger; holes_list_t m_holes; public: - holes_accumulator(SecondPassParser * pMain) : m_merger(pMain->m_holder) {} + holes_accumulator(OsmToFeatureTranslator * pMain) : m_merger(pMain->m_holder) {} void operator() (uint64_t id) { @@ -71,7 +71,7 @@ class SecondPassParser holes_accumulator m_holes; public: - multipolygon_holes_processor(uint64_t id, SecondPassParser * pMain) + multipolygon_holes_processor(uint64_t id, OsmToFeatureTranslator * pMain) : m_id(id), m_holes(pMain) { } @@ -253,13 +253,13 @@ class SecondPassParser class multipolygons_emitter { - SecondPassParser * m_pMain; + OsmToFeatureTranslator * m_pMain; FeatureParams const & m_params; holes_list_t & m_holes; uint64_t m_relID; public: - multipolygons_emitter(SecondPassParser * pMain, + multipolygons_emitter(OsmToFeatureTranslator * pMain, FeatureParams const & params, holes_list_t & holes, uint64_t relID) @@ -499,7 +499,7 @@ public: return; holes_accumulator holes(this); - AreaWayMerger<THolder> outer(m_holder); + AreaWayMerger<TCache> outer(m_holder); // 3. Iterate ways to get 'outer' and 'inner' geometries for (auto const & e : p->Members()) @@ -519,7 +519,7 @@ public: } public: - SecondPassParser(TEmitter & emitter, THolder & holder, + OsmToFeatureTranslator(TEmitter & emitter, TCache & holder, uint32_t coastType, string const & addrFilePath) : m_emitter(emitter), m_holder(holder), m_coastType(coastType) { |