osrm-backend/unit_tests/mocks/mock_scripting_environment.hpp

57 lines
2.0 KiB
C++
Raw Normal View History

#ifndef MOCK_SCRIPTING_ENVIRONMENT_HPP_
#define MOCK_SCRIPTING_ENVIRONMENT_HPP_
#include "extractor/extraction_segment.hpp"
#include "extractor/extraction_turn.hpp"
2018-02-09 13:32:09 -05:00
#include "extractor/maneuver_override.hpp"
#include "extractor/profile_properties.hpp"
#include "extractor/scripting_environment.hpp"
#include <string>
#include <utility>
#include <vector>
namespace osrm
{
namespace test
{
// a mock implementation of the scripting environment doing exactly nothing
class MockScriptingEnvironment : public extractor::ScriptingEnvironment
{
const extractor::ProfileProperties &GetProfileProperties() override final
{
static extractor::ProfileProperties properties;
return properties;
}
std::vector<std::string> GetNameSuffixList() override final { return {}; }
2017-08-16 16:21:19 -04:00
std::vector<std::vector<std::string>> GetExcludableClasses() override final { return {}; };
2017-08-14 18:18:57 -04:00
std::vector<std::string> GetClassNames() override { return {}; };
2017-09-29 12:01:33 -04:00
std::vector<std::string> GetRelations() override { return {}; };
std::vector<std::string> GetRestrictions() override final { return {}; }
void ProcessTurn(extractor::ExtractionTurn &) override final {}
void ProcessSegment(extractor::ExtractionSegment &) override final {}
2017-10-04 10:31:15 -04:00
void ProcessElements(const osmium::memory::Buffer &,
const extractor::RestrictionParser &,
2018-02-09 13:32:09 -05:00
const extractor::ManeuverOverrideRelationParser &,
2017-10-04 10:31:15 -04:00
const extractor::ExtractionRelationContainer &,
std::vector<std::pair<const osmium::Node &, extractor::ExtractionNode>> &,
std::vector<std::pair<const osmium::Way &, extractor::ExtractionWay>> &,
std::vector<extractor::InputTurnRestriction> &,
2018-02-09 13:32:09 -05:00
std::vector<extractor::InputManeuverOverride> &) override final
{
}
2017-09-22 11:33:06 -04:00
bool HasLocationDependentData() const override { return false; };
};
} // namespace test
} // namespace osrm
#endif // MOCK_SCRIPTING_ENVIRONMENT_HPP_