osrm-backend/include/engine
Michael Bell 7f014bd616 Clarify identifier types used in data facade
The data facade interface contains numerous methods for looking up
datapoints by identifiers.
Many of the parameters use the NodeID or EdgeID types. However, these two
identifier types are used for representing three different contexts:

1. Node-based graph edges and nodes
2. Edge-based graph edges and nodes
3. Packed geometries

Consider the use of identifier parameters in these examples:

---

GetWeightPenaltyForEdgeID(const EdgeID id)  <- edge-based edge

GetUncompressedForwardWeights(const EdgeID id) <- packed geometry

IsLeftHandDriving(const NodeID id) <- edge-based node

GetBearingClass(const NodeID node) <- node-based node

---

This mixing of contexts within the same interface makes it
difficult to understand the relationships and dependencies between
the OSRM datasets.

For 1. and 2. we continue to use the NodeID and EdgeID types, but
change the interface parameter names to identify them as
edge-based or node-based graph properties.

For 3. we define a new type definition, PackedGeometryID.

These changes are to aid with readability. A next step would be
to strongly type these definitions, leveraging the Alias template
already used for OSM identifiers.
2022-08-21 21:37:39 +02:00
..
api Fix distance calculation consistency. (#6315) 2022-08-19 22:31:40 +01:00
datafacade Clarify identifier types used in data facade 2022-08-21 21:37:39 +02:00
guidance Fix distance calculation consistency. (#6315) 2022-08-19 22:31:40 +01:00
map_matching Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
plugins Fix distance calculation consistency. (#6315) 2022-08-19 22:31:40 +01:00
routing_algorithms Fix distance calculation consistency. (#6315) 2022-08-19 22:31:40 +01:00
trip Configure Undefined Behaviour Sanitizer (#6290) 2022-08-01 22:40:26 +01:00
algorithm.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
approach.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
base64.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
bearing.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
data_watchdog.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
datafacade_factory.hpp Enable more clang-tidy checks. (#6270) 2022-06-30 14:32:12 +01:00
datafacade_provider.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
datafacade.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
douglas_peucker.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
engine_config.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
engine.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
geospatial_query.hpp Fix distance calculation consistency. (#6315) 2022-08-19 22:31:40 +01:00
hint.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
internal_route_result.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
phantom_node.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
polyline_compressor.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
routing_algorithms.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
search_engine_data.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00
status.hpp Upgrade formatting to clang-format 10 (#5895) 2020-11-26 07:21:39 -08:00