-
Notifications
You must be signed in to change notification settings - Fork 3.5k
/
Copy pathmock_scripting_environment.hpp
52 lines (41 loc) · 1.98 KB
/
mock_scripting_environment.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef MOCK_SCRIPTING_ENVIRONMENT_HPP_
#define MOCK_SCRIPTING_ENVIRONMENT_HPP_
#include "extractor/extraction_segment.hpp"
#include "extractor/extraction_turn.hpp"
#include "extractor/maneuver_override.hpp"
#include "extractor/profile_properties.hpp"
#include "extractor/scripting_environment.hpp"
#include <string>
#include <utility>
#include <vector>
namespace osrm::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 {}; }
std::vector<std::vector<std::string>> GetExcludableClasses() override final { return {}; };
std::vector<std::string> GetClassNames() override { return {}; };
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 {}
void ProcessElements(const osmium::memory::Buffer &,
const extractor::RestrictionParser &,
const extractor::ManeuverOverrideRelationParser &,
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> &,
std::vector<extractor::InputManeuverOverride> &) override final
{
}
bool HasLocationDependentData() const override { return false; };
};
} // namespace osrm::test
#endif // MOCK_SCRIPTING_ENVIRONMENT_HPP_