osrm-backend/include/engine/datafacade
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
..
algorithm_datafacade.hpp Clarify identifier types used in data facade 2022-08-21 21:37:39 +02:00
contiguous_block_allocator.hpp Load data in two separate data regions 2018-04-07 00:22:29 +02:00
contiguous_internalmem_datafacade.hpp Clarify identifier types used in data facade 2022-08-21 21:37:39 +02:00
datafacade_base.hpp Clarify identifier types used in data facade 2022-08-21 21:37:39 +02:00
mmap_memory_allocator.hpp Configure clang-tidy job on CI (#6261) 2022-06-28 00:14:28 +01:00
process_memory_allocator.hpp Configure clang-tidy job on CI (#6261) 2022-06-28 00:14:28 +01:00
shared_memory_allocator.hpp Configure clang-tidy job on CI (#6261) 2022-06-28 00:14:28 +01:00