blob: cb451fb7f9ce575cab753168c4a82fba8f2c918e (
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
|
#pragma once
#include "generator/collector_interface.hpp"
#include <fstream>
#include <string>
class RelationElement;
namespace routing
{
class RestrictionWriter : public generator::CollectorInterface
{
public:
RestrictionWriter(std::string const & fullPath);
// CollectorRelationsInterface overrides:
/// \brief Writes |relationElement| to |m_stream| if |relationElement| is a supported restriction.
/// See restriction_generator.hpp for the description of the format.
/// \note For the time being only line-point-line restrictions are processed. The other
/// restrictions are ignored.
// @TODO(bykoianko) It's necessary to process all kind of restrictions.
void CollectRelation(RelationElement const & relationElement) override;
void Save() override {}
private:
void Open(std::string const & fullPath);
bool IsOpened() const;
std::ofstream m_stream;
};
} // namespace routing
|