Moving osm::Id to base.

This commit is contained in:
Vladimir Byko-Ianko 2017-11-28 15:28:25 +03:00 committed by Tatiana Yan
parent 90efebea81
commit c1fac277cc
27 changed files with 41 additions and 39 deletions

View file

@ -43,6 +43,8 @@ set(
newtype.hpp
normalize_unicode.cpp
observer_list.hpp
osm_id.cpp
osm_id.hpp
pprof.cpp
pprof.hpp
random.cpp

View file

@ -20,6 +20,7 @@ SOURCES += \
lower_case.cpp \
move_to_front.cpp \
normalize_unicode.cpp \
osm_id.cpp \
pprof.cpp \
random.cpp \
shared_buffer_manager.cpp \
@ -70,6 +71,7 @@ HEADERS += \
mutex.hpp \
newtype.hpp \
observer_list.hpp \
osm_id.hpp \
pprof.hpp \
random.hpp \
range_iterator.hpp \

View file

@ -1,6 +1,5 @@
#include "generator/osm_id.hpp"
#include "base/assert.hpp"
#include "base/osm_id.hpp"
#include <sstream>
@ -76,5 +75,4 @@ std::string DebugPrint(osm::Id const & id)
stream << id.Type() << " " << id.OsmId();
return stream.str();
}
} // namespace osm

View file

@ -6,7 +6,6 @@
namespace osm
{
class Id
{
uint64_t m_encodedId;
@ -41,4 +40,4 @@ struct HashId : private std::hash<uint64_t>
};
std::string DebugPrint(osm::Id const & id);
} // namespace osm
} // namespace osm

View file

@ -50,8 +50,6 @@ set(SRC
osm2type.hpp
osm_element.cpp
osm_element.hpp
osm_id.cpp
osm_id.hpp
osm_o5m_source.hpp
osm_source.cpp
osm_translator.hpp

View file

@ -12,6 +12,7 @@
#include "base/stl_add.hpp"
#include "base/string_utils.hpp"
#include "base/osm_id.hpp"
#include <cstdlib>
#include <cstring>

View file

@ -1,10 +1,9 @@
#pragma once
#include "generator/osm_id.hpp"
#include "indexer/city_boundary.hpp"
#include "base/clustering_map.hpp"
#include "base/osm_id.hpp"
#include <cstdint>
#include <string>

View file

@ -1,12 +1,12 @@
#pragma once
#include "generator/osm_id.hpp"
#include "indexer/feature.hpp"
#include "coding/file_reader.hpp"
#include "coding/read_write_utils.hpp"
#include "base/osm_id.hpp"
#include <functional>
#include <list>

View file

@ -1,12 +1,11 @@
#pragma once
#include "generator/osm_id.hpp"
#include "coding/file_reader.hpp"
#include "coding/read_write_utils.hpp"
#include "base/assert.hpp"
#include "base/logging.hpp"
#include "base/osm_id.hpp"
#include <algorithm>
#include <utility>

View file

@ -35,7 +35,6 @@ SOURCES += \
osm2meta.cpp \
osm2type.cpp \
osm_element.cpp \
osm_id.cpp \
osm_source.cpp \
region_meta.cpp \
restriction_collector.cpp \
@ -84,7 +83,6 @@ HEADERS += \
osm2meta.hpp \
osm2type.hpp \
osm_element.hpp \
osm_id.hpp \
osm_o5m_source.hpp \
osm_translator.hpp \
osm_xml_source.hpp \

View file

@ -8,6 +8,8 @@
#include "indexer/classificator_loader.hpp"
#include "indexer/feature_visibility.hpp"
#include "base/osm_id.hpp"
using namespace tests;

View file

@ -1,9 +1,9 @@
#include "testing/testing.hpp"
#include "generator/osm_id.hpp"
#include "generator/feature_builder.hpp"
#include "base/logging.hpp"
#include "base/osm_id.hpp"
using namespace osm;

View file

@ -2,7 +2,6 @@
#include "generator/generator_tests_support/routing_helpers.hpp"
#include "generator/osm_id.hpp"
#include "generator/restriction_collector.hpp"
#include "routing/restrictions_serialization.hpp"
@ -14,6 +13,7 @@
#include "coding/file_name_utils.hpp"
#include "base/osm_id.hpp"
#include "base/stl_helpers.hpp"
#include <string>

View file

@ -2,11 +2,12 @@
#include "generator/ugc_db.hpp"
#include "generator/ugc_translator.hpp"
#include "generator/osm_id.hpp"
#include "base/osm_id.hpp"
#include "ugc/types.hpp"
#include "base/math.hpp"
#include "base/osm_id.hpp"
std::string g_database(R"LLL(
PRAGMA foreign_keys=OFF;

View file

@ -3,10 +3,11 @@
#include "testing/testing.hpp"
#include "generator/gen_mwm_info.hpp"
#include "generator/osm_id.hpp"
#include "base/osm_id.hpp"
#include "coding/file_writer.hpp"
#include "base/osm_id.hpp"
#include "base/string_utils.hpp"
#include <utility>

View file

@ -19,6 +19,7 @@
#include "base/logging.hpp"
#include "base/stl_add.hpp"
#include "base/string_utils.hpp"
#include "base/osm_id.hpp"
#include <list>
#include <type_traits>

View file

@ -1,9 +1,8 @@
#pragma once
#include "generator/osm_id.hpp"
#include "routing/restrictions_serialization.hpp"
#include "base/osm_id.hpp"
#include <functional>
#include <limits>
#include <map>

View file

@ -1,7 +1,7 @@
#include "generator/restriction_writer.hpp"
#include "generator/intermediate_elements.hpp"
#include "generator/osm_id.hpp"
#include "base/osm_id.hpp"
#include "generator/restriction_collector.hpp"
#include "routing/restrictions_serialization.hpp"

View file

@ -1,6 +1,5 @@
#include "generator/road_access_generator.hpp"
#include "generator/osm_id.hpp"
#include "generator/routing_helpers.hpp"
#include "routing/road_access.hpp"
@ -16,6 +15,7 @@
#include "base/logging.hpp"
#include "base/string_utils.hpp"
#include "base/osm_id.hpp"
#include <initializer_list>

View file

@ -1,11 +1,12 @@
#pragma once
#include "generator/osm_id.hpp"
#include "generator/road_access_generator.hpp"
#include "generator/restriction_writer.hpp"
#include "routing/cross_mwm_ids.hpp"
#include "base/osm_id.hpp"
#include <cstdint>
#include <map>
#include <string>

View file

@ -2,7 +2,7 @@
#include "generator/borders_generator.hpp"
#include "generator/borders_loader.hpp"
#include "generator/osm_id.hpp"
#include "base/osm_id.hpp"
#include "generator/routing_helpers.hpp"
#include "routing/base/astar_algorithm.hpp"

View file

@ -1,7 +1,5 @@
#pragma once
#include "generator/osm_id.hpp"
#include "routing_common/transit_types.hpp"
#include "storage/index.hpp"
@ -10,6 +8,7 @@
#include "geometry/region2d.hpp"
#include "base/macros.hpp"
#include "base/osm_id.hpp"
#include "3party/jansson/myjansson.hpp"

View file

@ -1,9 +1,8 @@
#pragma once
#include "generator/osm_id.hpp"
#include "base/exception.hpp"
#include "base/macros.hpp"
#include "base/osm_id.hpp"
#include <cstdint>
#include <string>

View file

@ -10,6 +10,8 @@
#include "indexer/feature_processor.hpp"
#include "indexer/ftraits.hpp"
#include "base/osm_id.hpp"
#include <unordered_map>
#include <utility>

View file

@ -3,7 +3,8 @@
#include "ugc_db.hpp"
#include "ugc/types.hpp"
#include "generator/osm_id.hpp"
#include "base/osm_id.hpp"
namespace generator
{

View file

@ -57,6 +57,8 @@
56B1A0741E69DE4D00395022 /* random.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 56B1A0711E69DE4D00395022 /* random.cpp */; };
56B1A0751E69DE4D00395022 /* random.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 56B1A0721E69DE4D00395022 /* random.hpp */; };
56B1A0761E69DE4D00395022 /* small_set.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 56B1A0731E69DE4D00395022 /* small_set.hpp */; };
56DE23041FCD8AB4008FEFD5 /* osm_id.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 56DE23021FCD8AB3008FEFD5 /* osm_id.hpp */; };
56DE23051FCD8AB4008FEFD5 /* osm_id.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 56DE23031FCD8AB4008FEFD5 /* osm_id.cpp */; };
670E39441C46C76900E9C0A6 /* sunrise_sunset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 670E39421C46C76900E9C0A6 /* sunrise_sunset.cpp */; };
670E39451C46C76900E9C0A6 /* sunrise_sunset.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 670E39431C46C76900E9C0A6 /* sunrise_sunset.hpp */; };
671182F01C807C0A00CB8177 /* gmtime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 671182EE1C807C0A00CB8177 /* gmtime.cpp */; };
@ -185,6 +187,8 @@
56B1A0711E69DE4D00395022 /* random.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = random.cpp; sourceTree = "<group>"; };
56B1A0721E69DE4D00395022 /* random.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = random.hpp; sourceTree = "<group>"; };
56B1A0731E69DE4D00395022 /* small_set.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = small_set.hpp; sourceTree = "<group>"; };
56DE23021FCD8AB3008FEFD5 /* osm_id.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = osm_id.hpp; sourceTree = "<group>"; };
56DE23031FCD8AB4008FEFD5 /* osm_id.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osm_id.cpp; sourceTree = "<group>"; };
670E39421C46C76900E9C0A6 /* sunrise_sunset.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sunrise_sunset.cpp; sourceTree = "<group>"; };
670E39431C46C76900E9C0A6 /* sunrise_sunset.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = sunrise_sunset.hpp; sourceTree = "<group>"; };
671182EE1C807C0A00CB8177 /* gmtime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = gmtime.cpp; sourceTree = "<group>"; };
@ -341,6 +345,8 @@
675341791A3F57BF00A0A8C3 /* base */ = {
isa = PBXGroup;
children = (
56DE23031FCD8AB4008FEFD5 /* osm_id.cpp */,
56DE23021FCD8AB3008FEFD5 /* osm_id.hpp */,
3D3731FC1F9A445400D2121B /* url_helpers.cpp */,
3D3731FD1F9A445500D2121B /* url_helpers.hpp */,
3D74EF0E1F8B902B0081202C /* bwt.cpp */,
@ -460,6 +466,7 @@
buildActionMask = 2147483647;
files = (
3D74EF121F8B902C0081202C /* visitor.hpp in Headers */,
56DE23041FCD8AB4008FEFD5 /* osm_id.hpp in Headers */,
675341CF1A3F57E400A0A8C3 /* bits.hpp in Headers */,
672DD4C71E0425600078E13C /* ref_counted.hpp in Headers */,
675341E61A3F57E400A0A8C3 /* mutex.hpp in Headers */,
@ -653,6 +660,7 @@
675342061A3F57E400A0A8C3 /* thread_pool.cpp in Sources */,
670E39441C46C76900E9C0A6 /* sunrise_sunset.cpp in Sources */,
67E40EC81E4DC0D500A6D200 /* small_set_test.cpp in Sources */,
56DE23051FCD8AB4008FEFD5 /* osm_id.cpp in Sources */,
6753420E1A3F57E400A0A8C3 /* timer.cpp in Sources */,
675341F61A3F57E400A0A8C3 /* shared_buffer_manager.cpp in Sources */,
56B1A0741E69DE4D00395022 /* random.cpp in Sources */,

View file

@ -77,8 +77,6 @@
675340741A3F2A7400A0A8C3 /* generate_info.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 675340411A3F2A7400A0A8C3 /* generate_info.hpp */; };
675340781A3F2A7400A0A8C3 /* intermediate_elements.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 675340451A3F2A7400A0A8C3 /* intermediate_elements.hpp */; };
675340791A3F2A7400A0A8C3 /* osm_translator.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 675340461A3F2A7400A0A8C3 /* osm_translator.hpp */; };
6753407A1A3F2A7400A0A8C3 /* osm_id.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 675340471A3F2A7400A0A8C3 /* osm_id.cpp */; };
6753407B1A3F2A7400A0A8C3 /* osm_id.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 675340481A3F2A7400A0A8C3 /* osm_id.hpp */; };
6753407E1A3F2A7400A0A8C3 /* osm2type.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6753404B1A3F2A7400A0A8C3 /* osm2type.cpp */; };
6753407F1A3F2A7400A0A8C3 /* osm2type.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 6753404C1A3F2A7400A0A8C3 /* osm2type.hpp */; };
675340801A3F2A7400A0A8C3 /* polygonizer.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 6753404D1A3F2A7400A0A8C3 /* polygonizer.hpp */; };
@ -192,8 +190,6 @@
675340411A3F2A7400A0A8C3 /* generate_info.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = generate_info.hpp; sourceTree = "<group>"; };
675340451A3F2A7400A0A8C3 /* intermediate_elements.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = intermediate_elements.hpp; sourceTree = "<group>"; };
675340461A3F2A7400A0A8C3 /* osm_translator.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = osm_translator.hpp; sourceTree = "<group>"; };
675340471A3F2A7400A0A8C3 /* osm_id.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osm_id.cpp; sourceTree = "<group>"; };
675340481A3F2A7400A0A8C3 /* osm_id.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = osm_id.hpp; sourceTree = "<group>"; };
6753404B1A3F2A7400A0A8C3 /* osm2type.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = osm2type.cpp; sourceTree = "<group>"; };
6753404C1A3F2A7400A0A8C3 /* osm2type.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = osm2type.hpp; sourceTree = "<group>"; };
6753404D1A3F2A7400A0A8C3 /* polygonizer.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = polygonizer.hpp; sourceTree = "<group>"; };
@ -327,8 +323,6 @@
34F558801DBF4C9600A4FC11 /* opentable_scoring.cpp */,
6753405A1A3F2A7400A0A8C3 /* osm_element.cpp */,
6753405B1A3F2A7400A0A8C3 /* osm_element.hpp */,
675340471A3F2A7400A0A8C3 /* osm_id.cpp */,
675340481A3F2A7400A0A8C3 /* osm_id.hpp */,
6764B8921ADD6A3300DD8B15 /* osm_o5m_source.hpp */,
670B84BA1A8CDB0000CE4492 /* osm_source.cpp */,
670B84BB1A8CDB0000CE4492 /* osm_source.hpp */,
@ -457,7 +451,6 @@
6726C1D61A4AFEF4005EEA39 /* osm2meta.hpp in Headers */,
34F5588D1DBF4C9600A4FC11 /* sponsored_scoring.hpp in Headers */,
3D51BC491D5E50F700F1FA8D /* centers_table_builder.hpp in Headers */,
6753407B1A3F2A7400A0A8C3 /* osm_id.hpp in Headers */,
670E7BB61EF9812B00A8E9ED /* road_access_generator.hpp in Headers */,
3D51BC531D5E512500F1FA8D /* altitude_generator.hpp in Headers */,
675340731A3F2A7400A0A8C3 /* gen_mwm_info.hpp in Headers */,
@ -560,7 +553,6 @@
3D51BC521D5E512500F1FA8D /* altitude_generator.cpp in Sources */,
670E7BB31EF9812B00A8E9ED /* metalines_builder.cpp in Sources */,
3D51BC581D5E512500F1FA8D /* srtm_parser.cpp in Sources */,
6753407A1A3F2A7400A0A8C3 /* osm_id.cpp in Sources */,
675340871A3F2A7400A0A8C3 /* unpack_mwm.cpp in Sources */,
670B84BC1A8CDB0000CE4492 /* osm_source.cpp in Sources */,
675340701A3F2A7400A0A8C3 /* feature_sorter.cpp in Sources */,