blob: c63e847e88c27d2fae1a2c66a014a746daa86ada (
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
|
#include "generator/translator_collection.hpp"
#include "generator/osm_element.hpp"
#include <algorithm>
#include <iterator>
namespace generator
{
void TranslatorCollection::Emit(OsmElement /* const */ & element)
{
for (auto & t : m_collection)
{
OsmElement copy = element;
t->Emit(copy);
}
}
bool TranslatorCollection::Finish()
{
return std::all_of(std::begin(m_collection), std::end(m_collection), [](auto & t) {
return t->Finish();
});
}
void TranslatorCollection::GetNames(std::vector<std::string> & names) const
{
for (auto & t : m_collection)
{
std::vector<std::string> temp;
t->GetNames(temp);
std::move(std::begin(temp), std::end(temp), std::back_inserter(names));
}
}
} // namespace generator
|