Skip to content

Rename NameTable→StringTable and name_id→string_view_id#7406

Merged
DennisOSRM merged 11 commits intomasterfrom
claude/rename-name-table-and-properties
Mar 22, 2026
Merged

Rename NameTable→StringTable and name_id→string_view_id#7406
DennisOSRM merged 11 commits intomasterfrom
claude/rename-name-table-and-properties

Conversation

@Claude
Copy link
Copy Markdown
Contributor

@Claude Claude AI commented Mar 6, 2026

Addresses the semantic confusion described in #4709: the NameTable class stores much more than just names (refs, exit numbers, destinations, pronunciations), and name_id checks like data.name_id != EMPTY_NAMEID were misleading.

Changes

Core renames

  • detail::NameTableImpldetail::StringTableImpl in include/extractor/name_table.hpp
  • using NameTableusing StringTable, NameTableViewStringTableView
  • NodeBasedEdgeAnnotation::name_idNodeBasedEdgeAnnotation::string_view_id
  • NameIDStringViewID, EMPTY_NAMEIDEMPTY_STRINGVIEWID, INVALID_NAMEIDINVALID_STRINGVIEWID

Backwards compatibility

Old names (NameTable, NameID, EMPTY_NAMEID, etc.) are kept as deprecated aliases so downstream code continues to compile.

All call sites updated

All 15 files that accessed NodeBasedEdgeAnnotation::name_id are updated to use string_view_id:

  • include/extractor/node_data_container.hpp, serialization.hpp
  • include/guidance/intersection_handler.hpp, is_through_street.hpp
  • src/extractor/: graph_compressor, extraction_containers, node_based_graph_factory, mergable_road_detector, node_based_graph_walker
  • src/guidance/: intersection_handler, motorway_handler, sliproad_handler, turn_handler, roundabout_handler, segregated_intersection_classification

Fixes #4709

…iew_id

Co-authored-by: DennisOSRM <1067895+DennisOSRM@users.noreply.github.com>
@Claude Claude AI changed the title [WIP] Rename NameTable class and name_id property Rename NameTable to PreDatafacadeStringViewer and name_id to string_view_id Mar 6, 2026
Co-authored-by: DennisOSRM <1067895+DennisOSRM@users.noreply.github.com>
@Claude Claude AI changed the title Rename NameTable to PreDatafacadeStringViewer and name_id to string_view_id Simplify StringTable naming: use StringTable instead of PreDatafacadeStringViewer Mar 6, 2026
@DennisOSRM DennisOSRM changed the title Simplify StringTable naming: use StringTable instead of PreDatafacadeStringViewer Simplify NameTable naming: use StringTable instead of NameTable Mar 6, 2026
Co-authored-by: DennisOSRM <1067895+DennisOSRM@users.noreply.github.com>
@Claude Claude AI changed the title Simplify NameTable naming: use StringTable instead of NameTable Fix clang-format violations in node_based_edge.hpp Mar 7, 2026
@DennisOSRM DennisOSRM changed the title Fix clang-format violations in node_based_edge.hpp Simplify NameTable naming: use StringTable instead of NameTable Mar 20, 2026
@DennisOSRM DennisOSRM changed the title Simplify NameTable naming: use StringTable instead of NameTable Rename NameTable→StringTable and name_id→string_view_id Mar 20, 2026
DennisOSRM and others added 4 commits March 20, 2026 16:06
…→StringTableImpl rename

- Replace detail::NameTableImpl with detail::StringTableImpl in serialization.hpp
- Replace NodeBasedEdgeAnnotation::name_id with string_view_id across all
  affected files: node_data_container.hpp, graph_compressor.cpp,
  extraction_containers.cpp, node_based_graph_factory.cpp,
  node_based_graph_walker.cpp, mergable_road_detector.cpp,
  intersection_handler.cpp/.hpp, motorway_handler.cpp,
  sliproad_handler.cpp, turn_handler.cpp, roundabout_handler.cpp,
  segregated_intersection_classification.cpp, is_through_street.hpp

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@DennisOSRM DennisOSRM marked this pull request as ready for review March 20, 2026 18:43
@DennisOSRM DennisOSRM merged commit 5086fb3 into master Mar 22, 2026
23 checks passed
@DennisOSRM DennisOSRM deleted the claude/rename-name-table-and-properties branch March 22, 2026 21:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rename name_table class and name_id property

3 participants