Refactors the Turn Handler's Fork Abstraction, resolves #3457.

This commit is contained in:
Huyen Chau Nguyen
2017-01-15 16:09:33 +01:00
committed by Daniel J. H
parent b8beac2d00
commit a40abacfca
2 changed files with 87 additions and 59 deletions
+14 -3
View File
@@ -49,10 +49,21 @@ class TurnHandler : public IntersectionHandler
private:
struct Fork
{
const Intersection::iterator right;
const Intersection::iterator left;
const Intersection::iterator intersection_base;
const Intersection::iterator begin;
const Intersection::iterator end;
const std::size_t size;
Fork(const Intersection::iterator right, const Intersection::iterator left);
Fork(const Intersection::iterator intersection_base,
const Intersection::iterator begin,
const Intersection::iterator end);
ConnectedRoad &getRight() const;
ConnectedRoad &getLeft() const;
ConnectedRoad &getMiddle() const;
ConnectedRoad &getRight();
ConnectedRoad &getLeft();
ConnectedRoad &getMiddle();
std::size_t getRightIndex() const;
std::size_t getLeftIndex() const;
};
bool isObviousOfTwo(const EdgeID via_edge,