2016-12-07 14:26:34 -05:00
|
|
|
#ifndef OSRM_EXTRACTOR_GUIDANCE_SUPPRESS_MODE_HANDLER_HPP_
|
|
|
|
#define OSRM_EXTRACTOR_GUIDANCE_SUPPRESS_MODE_HANDLER_HPP_
|
|
|
|
|
|
|
|
#include "extractor/guidance/constants.hpp"
|
|
|
|
#include "extractor/guidance/intersection.hpp"
|
|
|
|
#include "extractor/guidance/intersection_generator.hpp"
|
|
|
|
#include "extractor/guidance/intersection_handler.hpp"
|
|
|
|
#include "extractor/travel_mode.hpp"
|
|
|
|
#include "util/node_based_graph.hpp"
|
|
|
|
|
|
|
|
namespace osrm
|
|
|
|
{
|
|
|
|
namespace extractor
|
|
|
|
{
|
|
|
|
namespace guidance
|
|
|
|
{
|
|
|
|
|
2016-12-21 06:30:56 -05:00
|
|
|
// Suppresses instructions for certain modes.
|
|
|
|
// Think: ferry route. This handler suppresses all instructions while on the ferry route.
|
|
|
|
// We don't want to announce "Turn Right", "Turn Left" while on ferries, as one example.
|
2016-12-07 14:26:34 -05:00
|
|
|
class SuppressModeHandler final : public IntersectionHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SuppressModeHandler(const IntersectionGenerator &intersection_generator,
|
|
|
|
const util::NodeBasedDynamicGraph &node_based_graph,
|
2017-09-25 09:37:11 -04:00
|
|
|
const EdgeBasedNodeDataContainer &node_data_container,
|
2017-04-02 19:58:06 -04:00
|
|
|
const std::vector<util::Coordinate> &coordinates,
|
2016-12-07 14:26:34 -05:00
|
|
|
const util::NameTable &name_table,
|
|
|
|
const SuffixTable &street_name_suffix_table);
|
|
|
|
|
|
|
|
~SuppressModeHandler() override final = default;
|
|
|
|
|
2016-12-21 06:30:56 -05:00
|
|
|
bool canProcess(const NodeID nid,
|
2016-12-07 14:26:34 -05:00
|
|
|
const EdgeID via_eid,
|
|
|
|
const Intersection &intersection) const override final;
|
|
|
|
|
|
|
|
Intersection operator()(const NodeID nid,
|
|
|
|
const EdgeID via_eid,
|
|
|
|
Intersection intersection) const override final;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace osrm
|
|
|
|
} // namespace extractor
|
|
|
|
} // namespace guidance
|
|
|
|
|
|
|
|
#endif /* OSRM_EXTRACTOR_GUIDANCE_SUPPRESS_MODE_HANDLER_HPP_ */
|