#ifndef SCRIPTING_ENVIRONMENT_HPP #define SCRIPTING_ENVIRONMENT_HPP #include "extractor/internal_extractor_edge.hpp" #include "extractor/maneuver_override.hpp" #include "extractor/profile_properties.hpp" #include "extractor/restriction.hpp" #include #include #include #include namespace osmium { class Node; class Way; class Relation; } namespace osrm { namespace util { struct Coordinate; } namespace extractor { class RestrictionParser; class ManeuverOverrideRelationParser; class ExtractionRelationContainer; struct ExtractionNode; struct ExtractionWay; struct ExtractionTurn; struct ExtractionSegment; /** * Abstract class that handles processing osmium ways, nodes and relation objects by applying * user supplied profiles. */ class ScriptingEnvironment { public: ScriptingEnvironment() = default; ScriptingEnvironment(const ScriptingEnvironment &) = delete; ScriptingEnvironment &operator=(const ScriptingEnvironment &) = delete; virtual ~ScriptingEnvironment() = default; virtual const ProfileProperties &GetProfileProperties() = 0; virtual std::vector> GetExcludableClasses() = 0; virtual std::vector GetClassNames() = 0; virtual std::vector GetNameSuffixList() = 0; virtual std::vector GetRestrictions() = 0; virtual std::vector GetRelations() = 0; virtual void ProcessTurn(ExtractionTurn &turn) = 0; virtual void ProcessSegment(ExtractionSegment &segment) = 0; virtual void ProcessElements(const osmium::memory::Buffer &buffer, const RestrictionParser &restriction_parser, const ManeuverOverrideRelationParser &maneuver_override_parser, const ExtractionRelationContainer &relations, std::vector> &resulting_nodes, std::vector> &resulting_ways, std::vector &resulting_restrictions, std::vector &resulting_maneuver_overrides) = 0; virtual bool HasLocationDependentData() const = 0; }; } } #endif /* SCRIPTING_ENVIRONMENT_HPP */