Files
comaps/generator/translator_factory.hpp
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

38 lines
1013 B
C++

#pragma once
#include "generator/factory_utils.hpp"
#include "generator/translator_coastline.hpp"
//#include "generator/translator_complex.hpp"
#include "generator/translator_country.hpp"
#include "generator/translator_interface.hpp"
#include "generator/translator_world.hpp"
#include "base/assert.hpp"
#include <memory>
#include <utility>
namespace generator
{
enum class TranslatorType
{
Country,
Coastline,
World,
//Complex
};
template <class... Args>
std::shared_ptr<TranslatorInterface> CreateTranslator(TranslatorType type, Args &&... args)
{
switch (type)
{
case TranslatorType::Coastline: return create<TranslatorCoastline>(std::forward<Args>(args)...);
case TranslatorType::Country: return create<TranslatorCountry>(std::forward<Args>(args)...);
case TranslatorType::World: return create<TranslatorWorld>(std::forward<Args>(args)...);
//case TranslatorType::Complex: return create<TranslatorComplex>(std::forward<Args>(args)...);
}
UNREACHABLE();
}
} // namespace generator