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

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

#include "generator/feature_builder.hpp"
#include "generator/feature_processing_layers.hpp"
#include "generator/processor_interface.hpp"

#include <memory>
#include <string>

namespace feature
{
struct GenerateInfo;
}  // namespace feature

namespace generator
{
// This class is the implementation of FeatureProcessorInterface for complexes.
class ProcessorComplex : public FeatureProcessorInterface
{
public:
  explicit ProcessorComplex(std::shared_ptr<FeatureProcessorQueue> const & queue,
                            std::string const & bordersPath, std::string const & layerLogFilename,
                            bool haveBordersForWholeWorld);

  // FeatureProcessorInterface overrides:
  std::shared_ptr<FeatureProcessorInterface> Clone() const override;

  void Process(feature::FeatureBuilder & feature) override;
  void Finish() override;

  void Merge(FeatureProcessorInterface const & other) override;
  void MergeInto(ProcessorComplex & other) const override;

private:
  void WriteDump();

  std::string m_bordersPath;
  std::string m_layerLogFilename;
  std::shared_ptr<AffiliationsFeatureLayer<>> m_affiliationsLayer;
  std::shared_ptr<FeatureProcessorQueue> m_queue;
  std::shared_ptr<LayerBase> m_processingChain;
  bool m_haveBordersForWholeWorld;
};
}  // namespace generator