blob: 14e6e0b3d4bf54ad61615238ce64fcf631a91d8e (
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
|
#include "generator/translator_coastline.hpp"
#include "generator/feature_maker.hpp"
#include "generator/filter_elements.hpp"
#include "generator/filter_planet.hpp"
#include "generator/generate_info.hpp"
#include "generator/intermediate_data.hpp"
#include "indexer/ftypes_matcher.hpp"
#include "platform/platform.hpp"
#include "base/file_name_utils.hpp"
#include "defines.hpp"
using namespace feature;
namespace generator
{
namespace
{
class CoastlineFilter : public FilterInterface
{
public:
bool IsAccepted(FeatureBuilder const & feature)
{
auto const & checker = ftypes::IsCoastlineChecker::Instance();
return checker(feature.GetTypes());
}
};
} // namespace
TranslatorCoastline::TranslatorCoastline(std::shared_ptr<EmitterInterface> emitter,
cache::IntermediateDataReader & cache)
: Translator(emitter, cache, std::make_shared<FeatureMaker>(cache))
{
AddFilter(std::make_shared<FilterPlanet>());
AddFilter(std::make_shared<CoastlineFilter>());
AddFilter(std::make_shared<FilterElements>(base::JoinPath(GetPlatform().ResourcesDir(), SKIPPED_ELEMENTS_FILE)));
}
} // namespace generator
|