From ca0432c4a04b7adc7355f20979451e96dc50f825 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Wed, 9 Nov 2016 10:02:03 +0300 Subject: [PATCH] Renaming RestrictionDumper to RestrictionWriter. --- generator/generator.pro | 4 ++-- generator/osm_translator.hpp | 12 ++++++------ ...restriction_dumper.cpp => restriction_writer.cpp} | 8 ++++---- ...restriction_dumper.hpp => restriction_writer.hpp} | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) rename generator/{restriction_dumper.cpp => restriction_writer.cpp} (93%) rename generator/{restriction_dumper.hpp => restriction_writer.hpp} (96%) diff --git a/generator/generator.pro b/generator/generator.pro index 22c8fb01f7..4c416eeed5 100644 --- a/generator/generator.pro +++ b/generator/generator.pro @@ -37,8 +37,8 @@ SOURCES += \ osm_source.cpp \ region_meta.cpp \ restriction_collector.cpp \ - restriction_dumper.cpp \ restriction_generator.cpp \ + restriction_writer.cpp \ routing_generator.cpp \ search_index_builder.cpp \ sponsored_scoring.cpp \ @@ -77,8 +77,8 @@ HEADERS += \ polygonizer.hpp \ region_meta.hpp \ restriction_collector.hpp \ - restriction_dumper.hpp \ restriction_generator.hpp \ + restriction_writer.hpp \ routing_generator.hpp \ search_index_builder.hpp \ sponsored_dataset.hpp \ diff --git a/generator/osm_translator.hpp b/generator/osm_translator.hpp index 1b34fd7e20..419e998264 100644 --- a/generator/osm_translator.hpp +++ b/generator/osm_translator.hpp @@ -3,7 +3,7 @@ #include "generator/feature_builder.hpp" #include "generator/osm2type.hpp" #include "generator/osm_element.hpp" -#include "generator/restriction_dumper.hpp" +#include "generator/restriction_writer.hpp" #include "generator/ways_merger.hpp" #include "indexer/classificator.hpp" @@ -29,7 +29,7 @@ namespace class RelationTagsBase { public: - RelationTagsBase(routing::RestrictionDumper & restrictionDumper) + RelationTagsBase(routing::RestrictionWriter & restrictionDumper) : m_restrictionDumper(restrictionDumper), m_cache(14) { } @@ -77,7 +77,7 @@ protected: protected: uint64_t m_featureID; OsmElement * m_current; - routing::RestrictionDumper & m_restrictionDumper; + routing::RestrictionWriter & m_restrictionDumper; private: my::Cache m_cache; @@ -88,7 +88,7 @@ class RelationTagsNode : public RelationTagsBase using TBase = RelationTagsBase; public: - RelationTagsNode(routing::RestrictionDumper & restrictionDumper) + RelationTagsNode(routing::RestrictionWriter & restrictionDumper) : RelationTagsBase(restrictionDumper) { } @@ -131,7 +131,7 @@ protected: class RelationTagsWay : public RelationTagsBase { public: - RelationTagsWay(routing::RestrictionDumper & restrictionDumper) + RelationTagsWay(routing::RestrictionWriter & restrictionDumper) : RelationTagsBase(restrictionDumper) { } @@ -213,7 +213,7 @@ class OsmToFeatureTranslator uint32_t m_coastType; unique_ptr m_addrWriter; - routing::RestrictionDumper m_restrictionDumper; + routing::RestrictionWriter m_restrictionDumper; RelationTagsNode m_nodeRelations; RelationTagsWay m_wayRelations; diff --git a/generator/restriction_dumper.cpp b/generator/restriction_writer.cpp similarity index 93% rename from generator/restriction_dumper.cpp rename to generator/restriction_writer.cpp index 5635ea50a7..c10b7aea6f 100644 --- a/generator/restriction_dumper.cpp +++ b/generator/restriction_writer.cpp @@ -1,4 +1,4 @@ -#include "generator/restriction_dumper.hpp" +#include "generator/restriction_writer.hpp" #include "generator/intermediate_elements.hpp" #include "generator/osm_id.hpp" #include "generator/restriction_collector.hpp" @@ -47,7 +47,7 @@ bool TagToType(string const & tag, Restriction::Type & type) namespace routing { -void RestrictionDumper::Open(string const & fullPath) +void RestrictionWriter::Open(string const & fullPath) { LOG(LINFO, ("Saving road restrictions in osm id terms to", fullPath)); m_stream.open(fullPath, std::ofstream::out); @@ -56,9 +56,9 @@ void RestrictionDumper::Open(string const & fullPath) LOG(LINFO, ("Cannot open file", fullPath)); } -bool RestrictionDumper::IsOpened() { return m_stream.is_open() && !m_stream.fail(); } +bool RestrictionWriter::IsOpened() { return m_stream.is_open() && !m_stream.fail(); } -void RestrictionDumper::Write(RelationElement const & relationElement) +void RestrictionWriter::Write(RelationElement const & relationElement) { if (!IsOpened()) return; diff --git a/generator/restriction_dumper.hpp b/generator/restriction_writer.hpp similarity index 96% rename from generator/restriction_dumper.hpp rename to generator/restriction_writer.hpp index 2ba7dbd750..a89aa99e01 100644 --- a/generator/restriction_dumper.hpp +++ b/generator/restriction_writer.hpp @@ -7,7 +7,7 @@ class RelationElement; namespace routing { -class RestrictionDumper +class RestrictionWriter { public: void Open(string const & fullPath);