2018-01-05 08:33:53 -05:00
|
|
|
#ifndef OSRM_GUIDANCE_TURN_LANE_DATA_HPP_
|
|
|
|
#define OSRM_GUIDANCE_TURN_LANE_DATA_HPP_
|
2016-05-13 13:18:00 -04:00
|
|
|
|
2018-01-05 08:33:53 -05:00
|
|
|
#include "extractor/turn_lane_types.hpp"
|
2016-08-02 09:43:29 -04:00
|
|
|
#include "util/attributes.hpp"
|
2016-07-26 09:00:58 -04:00
|
|
|
#include "util/typedefs.hpp"
|
2016-05-13 13:18:00 -04:00
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace guidance
|
|
|
|
{
|
|
|
|
namespace lanes
|
|
|
|
{
|
|
|
|
|
|
|
|
struct TurnLaneData
|
|
|
|
{
|
2018-01-05 08:33:53 -05:00
|
|
|
extractor::TurnLaneType::Mask tag;
|
2016-05-13 13:18:00 -04:00
|
|
|
LaneID from;
|
|
|
|
LaneID to;
|
|
|
|
|
2016-07-08 05:45:36 -04:00
|
|
|
// a temporary data entry that does not need to be assigned to an entry.
|
|
|
|
// This is the case in situations that use partition and require the entry to perform the
|
|
|
|
// one-to-one mapping.
|
2016-05-13 13:18:00 -04:00
|
|
|
bool operator<(const TurnLaneData &other) const;
|
|
|
|
};
|
|
|
|
typedef std::vector<TurnLaneData> LaneDataVector;
|
|
|
|
|
|
|
|
// convertes a string given in the OSM format into a TurnLaneData vector
|
2016-08-02 09:43:29 -04:00
|
|
|
OSRM_ATTR_WARN_UNUSED
|
2022-07-04 16:46:59 -04:00
|
|
|
LaneDataVector laneDataFromDescription(const extractor::TurnLaneDescription &turn_lane_description);
|
2016-05-13 13:18:00 -04:00
|
|
|
|
2016-06-21 04:41:08 -04:00
|
|
|
// Locate A Tag in a lane data vector (if multiple tags are set, the first one found is returned)
|
2018-01-05 08:33:53 -05:00
|
|
|
LaneDataVector::const_iterator findTag(const extractor::TurnLaneType::Mask tag,
|
|
|
|
const LaneDataVector &data);
|
|
|
|
LaneDataVector::iterator findTag(const extractor::TurnLaneType::Mask tag, LaneDataVector &data);
|
2016-05-13 13:18:00 -04:00
|
|
|
|
2016-06-21 04:41:08 -04:00
|
|
|
// Returns true if any of the queried tags is contained
|
2018-01-05 08:33:53 -05:00
|
|
|
bool hasTag(const extractor::TurnLaneType::Mask tag, const LaneDataVector &data);
|
2020-11-26 10:21:39 -05:00
|
|
|
} // namespace lanes
|
2016-05-13 13:18:00 -04:00
|
|
|
|
|
|
|
} // namespace guidance
|
|
|
|
} // namespace osrm
|
|
|
|
|
2018-01-05 08:33:53 -05:00
|
|
|
#endif /* OSRM_GUIDANCE_TURN_LANE_DATA_HPP_ */
|