[routing] add new restriction type

This commit is contained in:
Mikhail Gorbushin 2019-04-16 01:11:43 +03:00 committed by Vladimir Byko-Ianko
parent ad0bca72b5
commit 00b2d89eec

View file

@ -18,12 +18,18 @@ namespace
{
using namespace routing;
std::vector<std::pair<std::string, Restriction::Type>> const kRestrictionTypes =
{{"no_right_turn", Restriction::Type::No}, {"no_left_turn", Restriction::Type::No},
{"no_u_turn", Restriction::Type::No}, {"no_straight_on", Restriction::Type::No},
{"no_entry", Restriction::Type::No}, {"no_exit", Restriction::Type::No},
{"only_right_turn", Restriction::Type::Only}, {"only_left_turn", Restriction::Type::Only},
{"only_straight_on", Restriction::Type::Only}};
std::vector<std::pair<std::string, Restriction::Type>> const kRestrictionTypes ={
{"no_entry", Restriction::Type::No},
{"no_exit", Restriction::Type::No},
{"no_left_turn", Restriction::Type::No},
{"no_right_turn", Restriction::Type::No},
{"no_straight_on", Restriction::Type::No},
{"no_u_turn", Restriction::Type::No},
{"only_left_turn", Restriction::Type::Only},
{"only_right_turn", Restriction::Type::Only},
{"only_straight_on", Restriction::Type::Only},
{"only_u_turn", Restriction::Type::Only}
};
/// \brief Converts restriction type form string to RestrictionCollector::Type.
/// \returns true if conversion was successful and false otherwise.