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

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

#include "generator/feature_builder.hpp"
#include "generator/feature_maker_base.hpp"

struct OsmElement;

namespace generator
{
// Class FeatureMakerSimple is class FeatureMakerBase implementation for simple features building.
// It is only trying to build a feature and does not filter features in any way,
// except for bad geometry. This class is suitable for most cases.
class FeatureMakerSimple: public FeatureMakerBase
{
public:
  using FeatureMakerBase::FeatureMakerBase;

protected:
  // FeatureMaker overrides:
  void ParseParams(FeatureParams & params, OsmElement & element) const override;

private:
  // FeatureMaker overrides:
  bool BuildFromNode(OsmElement & element, FeatureParams const & params) override;
  bool BuildFromWay(OsmElement & element, FeatureParams const & params) override;
  bool BuildFromRelation(OsmElement & element, FeatureParams const & params) override;
};

// The difference between class FeatureMakerSimple and class FeatureMaker is that
// class FeatureMaker processes the types more strictly.
class FeatureMaker : public FeatureMakerSimple
{
public:
  using FeatureMakerSimple::FeatureMakerSimple;

private:
  // FeatureMaker overrides:
  void ParseParams(FeatureParams & params, OsmElement & element) const override;
};
}  // namespace generator