Repo created
This commit is contained in:
parent
4af19165ec
commit
68073add76
12458 changed files with 12350765 additions and 2 deletions
62
generator/collector_collection.cpp
Normal file
62
generator/collector_collection.cpp
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
#include "generator/collector_collection.hpp"
|
||||
|
||||
#include "generator/feature_builder.hpp"
|
||||
#include "generator/intermediate_elements.hpp"
|
||||
#include "generator/osm_element.hpp"
|
||||
|
||||
using namespace feature;
|
||||
|
||||
namespace generator
|
||||
{
|
||||
std::shared_ptr<CollectorInterface> CollectorCollection::Clone(IDRInterfacePtr const & cache) const
|
||||
{
|
||||
auto p = std::make_shared<CollectorCollection>();
|
||||
for (auto const & c : m_collection)
|
||||
p->Append(c->Clone(cache));
|
||||
return p;
|
||||
}
|
||||
|
||||
void CollectorCollection::Collect(OsmElement const & element)
|
||||
{
|
||||
for (auto & c : m_collection)
|
||||
c->Collect(element);
|
||||
}
|
||||
|
||||
void CollectorCollection::CollectRelation(RelationElement const & element)
|
||||
{
|
||||
for (auto & c : m_collection)
|
||||
c->CollectRelation(element);
|
||||
}
|
||||
|
||||
void CollectorCollection::CollectFeature(FeatureBuilder const & feature, OsmElement const & element)
|
||||
{
|
||||
for (auto & c : m_collection)
|
||||
c->CollectFeature(feature, element);
|
||||
}
|
||||
|
||||
void CollectorCollection::Finish()
|
||||
{
|
||||
for (auto & c : m_collection)
|
||||
c->Finish();
|
||||
}
|
||||
|
||||
void CollectorCollection::Save()
|
||||
{
|
||||
for (auto & c : m_collection)
|
||||
c->Save();
|
||||
}
|
||||
|
||||
void CollectorCollection::OrderCollectedData()
|
||||
{
|
||||
for (auto & c : m_collection)
|
||||
c->OrderCollectedData();
|
||||
}
|
||||
|
||||
void CollectorCollection::MergeInto(CollectorCollection & collector) const
|
||||
{
|
||||
auto & otherCollection = collector.m_collection;
|
||||
CHECK_EQUAL(m_collection.size(), otherCollection.size(), ());
|
||||
for (size_t i = 0; i < m_collection.size(); ++i)
|
||||
otherCollection[i]->Merge(*m_collection[i]);
|
||||
}
|
||||
} // namespace generator
|
||||
Loading…
Add table
Add a link
Reference in a new issue