Welcome to mirror list, hosted at ThFree Co, Russian Federation.

restriction_loader.hpp « routing - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 86513d3d61d73c5aa045ba39b9865463536c82c0 (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
#pragma once

#include "routing/index_graph.hpp"
#include "routing/restrictions_serialization.hpp"

#include "coding/file_container.hpp"

#include <memory>
#include <string>

class MwmValue;

namespace routing
{
class RestrictionLoader
{
public:
  explicit RestrictionLoader(MwmValue const & mwmValue, IndexGraph const & graph);

  bool HasRestrictions() const { return !m_restrictions.empty(); }
  RestrictionVec && StealRestrictions() { return move(m_restrictions); }

private:
  std::unique_ptr<FilesContainerR::TReader> m_reader;
  RestrictionHeader m_header;
  RestrictionVec m_restrictions;
  std::string const m_countryFileName;
};

void ConvertRestrictionsOnlyToNoAndSort(IndexGraph const & graph,
                                        RestrictionVec const & restrictionsOnly,
                                        RestrictionVec & restrictionsNo);
}  // namespace routing