osrm-backend/include/guidance/turn_lane_data.hpp

46 lines
1.4 KiB
C++
Raw Normal View History

#ifndef OSRM_GUIDANCE_TURN_LANE_DATA_HPP_
#define OSRM_GUIDANCE_TURN_LANE_DATA_HPP_
2016-05-13 13:18:00 -04:00
#include "extractor/turn_lane_types.hpp"
#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
{
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
OSRM_ATTR_WARN_UNUSED
LaneDataVector laneDataFromDescription(extractor::TurnLaneDescription turn_lane_description);
2016-05-13 13:18:00 -04:00
// Locate A Tag in a lane data vector (if multiple tags are set, the first one found is returned)
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
// Returns true if any of the queried tags is contained
bool hasTag(const extractor::TurnLaneType::Mask tag, const LaneDataVector &data);
2016-05-13 13:18:00 -04:00
} // namespace lane_data_generation
} // namespace guidance
} // namespace osrm
#endif /* OSRM_GUIDANCE_TURN_LANE_DATA_HPP_ */