blob: e561f28631f66d224d3307e616cb42ba3c8fd044 (
plain)
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
|
#pragma once
#include "generator/collector_interface.hpp"
#include "generator/intermediate_data.hpp"
#include <fstream>
#include <string>
class RelationElement;
namespace routing
{
class RestrictionWriter : public generator::CollectorInterface
{
public:
enum class ViaType
{
Node,
Way,
Count,
};
static std::string const kNodeString;
static std::string const kWayString;
RestrictionWriter(std::string const & fullPath,
generator::cache::IntermediateDataReader const & cache);
// generator::CollectorInterface overrides:
// @{
void CollectRelation(RelationElement const & relationElement) override;
void Save() override {}
// @}
static ViaType ConvertFromString(std::string const & str);
private:
void Open(std::string const & fullPath);
bool IsOpened() const;
std::ofstream m_stream;
generator::cache::IntermediateDataReader const & m_cache;
};
std::string DebugPrint(RestrictionWriter::ViaType const & type);
} // namespace routing
|