Check activation index of EntryClass and warn if activation failed

This commit is contained in:
Michael Krasnyk
2017-07-11 11:06:56 +02:00
committed by Patrick Niklaus
parent 58b61c68a3
commit b2ed46efb5
6 changed files with 28 additions and 17 deletions
-6
View File
@@ -85,12 +85,6 @@ class Extractor
std::vector<util::Coordinate> &coordinates,
extractor::PackedOSMIDs &osm_node_ids);
void WriteIntersectionClassificationData(
const std::string &output_file_name,
const std::vector<std::uint32_t> &node_based_intersection_classes,
const std::vector<util::guidance::BearingClass> &bearing_classes,
const std::vector<util::guidance::EntryClass> &entry_classes) const;
// Writes compressed node based graph and its embedding into a file for osrm-partition to use.
static void WriteCompressedNodeBasedGraph(const std::string &path,
const util::NodeBasedDynamicGraph &graph,
@@ -3,6 +3,7 @@
#include "extractor/guidance/intersection.hpp"
#include "util/coordinate.hpp"
#include "util/guidance/bearing_class.hpp"
#include "util/guidance/entry_class.hpp"
@@ -16,7 +17,7 @@ namespace guidance
{
std::pair<util::guidance::EntryClass, util::guidance::BearingClass>
classifyIntersection(Intersection intersection);
classifyIntersection(Intersection intersection, const osrm::util::Coordinate &location);
} // namespace guidance
} // namespace extractor
+2 -1
View File
@@ -43,7 +43,8 @@ class EntryClass
// we are hiding the access to the flags behind a protection wall, to make sure the bit logic
// isn't tempered with. zero based indexing
void activate(std::uint32_t index);
// return true if was activated and false if activation failed
bool activate(std::uint32_t index);
// check whether a certain turn allows entry
bool allowsEntry(std::uint32_t index) const;