Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
35
generator/processor_country.cpp
Normal file
35
generator/processor_country.cpp
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#include "generator/processor_country.hpp"
|
||||
|
||||
#include "generator/feature_builder.hpp"
|
||||
|
||||
namespace generator
|
||||
{
|
||||
ProcessorCountry::ProcessorCountry(AffiliationInterfacePtr affiliations, std::shared_ptr<FeatureProcessorQueue> queue)
|
||||
: m_affiliations(std::move(affiliations))
|
||||
, m_queue(std::move(queue))
|
||||
{
|
||||
ASSERT(m_affiliations && m_queue, ());
|
||||
|
||||
m_processingChain = std::make_shared<RepresentationLayer>();
|
||||
m_processingChain->Add(std::make_shared<PrepareFeatureLayer>());
|
||||
m_processingChain->Add(std::make_shared<CountryLayer>());
|
||||
|
||||
m_affiliationsLayer = std::make_shared<AffiliationsFeatureLayer>(kAffiliationsBufferSize, m_affiliations, m_queue);
|
||||
m_processingChain->Add(m_affiliationsLayer);
|
||||
}
|
||||
|
||||
std::shared_ptr<FeatureProcessorInterface> ProcessorCountry::Clone() const
|
||||
{
|
||||
return std::make_shared<ProcessorCountry>(m_affiliations, m_queue);
|
||||
}
|
||||
|
||||
void ProcessorCountry::Process(feature::FeatureBuilder & feature)
|
||||
{
|
||||
m_processingChain->Handle(feature);
|
||||
}
|
||||
|
||||
void ProcessorCountry::Finish()
|
||||
{
|
||||
m_affiliationsLayer->AddBufferToQueue();
|
||||
}
|
||||
} // namespace generator
|
||||
Loading…
Add table
Add a link
Reference in a new issue