blob: 9b1d033edce65bdcb1ce90985a6999bcc0b77a11 (
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
|
#include "generator/emitter_simple.hpp"
#include "generator/feature_builder.hpp"
#include "base/macros.hpp"
using namespace feature;
namespace generator
{
EmitterSimple::EmitterSimple(feature::GenerateInfo const & info) :
m_regionGenerator(std::make_unique<SimpleGenerator>(info)) {}
void EmitterSimple::GetNames(std::vector<std::string> & names) const
{
names = m_regionGenerator->Parent().GetNames();
}
void EmitterSimple::Process(FeatureBuilder & fb)
{
auto & polygonizer = m_regionGenerator->Parent();
// Emit each feature independently: clear current country names (see Polygonizer::GetCurrentNames()).
polygonizer.Start();
(*m_regionGenerator)(fb);
polygonizer.Finish();
}
void EmitterPreserialize::Process(FeatureBuilder & fb)
{
UNUSED_VALUE(fb.PreSerialize());
EmitterSimple::Process(fb);
}
} // namespace generator
|