[generator] country specifiers in inl files

This commit is contained in:
LaGrunge 2019-07-18 18:03:08 +03:00 committed by cc-engineering
parent d23aa3cf18
commit cf7ec3ad17
257 changed files with 2475 additions and 3359 deletions

View file

@ -173,259 +173,6 @@ set(
regions/regions.hpp
regions/regions_builder.cpp
regions/regions_builder.hpp
regions/specs/afghanistan.cpp
regions/specs/afghanistan.hpp
regions/specs/albania.cpp
regions/specs/albania.hpp
regions/specs/algeria.cpp
regions/specs/algeria.hpp
regions/specs/andorra.cpp
regions/specs/andorra.hpp
regions/specs/angola.cpp
regions/specs/angola.hpp
regions/specs/antigua_and_barbuda.cpp
regions/specs/antigua_and_barbuda.hpp
regions/specs/argentina.cpp
regions/specs/argentina.hpp
regions/specs/aruba.cpp
regions/specs/aruba.hpp
regions/specs/australia.cpp
regions/specs/australia.hpp
regions/specs/austria.cpp
regions/specs/austria.hpp
regions/specs/azerbaijan.cpp
regions/specs/azerbaijan.hpp
regions/specs/bahamas.cpp
regions/specs/bahamas.hpp
regions/specs/bahrain.cpp
regions/specs/bahrain.hpp
regions/specs/bangladesh.cpp
regions/specs/bangladesh.hpp
regions/specs/barbados.cpp
regions/specs/barbados.hpp
regions/specs/belarus.cpp
regions/specs/belarus.hpp
regions/specs/belgium.cpp
regions/specs/belgium.hpp
regions/specs/belize.cpp
regions/specs/belize.hpp
regions/specs/benin.cpp
regions/specs/benin.hpp
regions/specs/bhutan.cpp
regions/specs/bhutan.hpp
regions/specs/bolivia.cpp
regions/specs/bolivia.hpp
regions/specs/bosnia_and_herzegovina.cpp
regions/specs/bosnia_and_herzegovina.hpp
regions/specs/brazil.cpp
regions/specs/brazil.hpp
regions/specs/brunei.cpp
regions/specs/brunei.hpp
regions/specs/bulgaria.cpp
regions/specs/bulgaria.hpp
regions/specs/burkina_faso.cpp
regions/specs/burkina_faso.hpp
regions/specs/burundi.cpp
regions/specs/burundi.hpp
regions/specs/cameroon.cpp
regions/specs/cameroon.hpp
regions/specs/canada.cpp
regions/specs/canada.hpp
regions/specs/chad.cpp
regions/specs/chad.hpp
regions/specs/chile.cpp
regions/specs/chile.hpp
regions/specs/china.cpp
regions/specs/china.hpp
regions/specs/colombia.cpp
regions/specs/colombia.hpp
regions/specs/costa_rica.cpp
regions/specs/costa_rica.hpp
regions/specs/cote_divoire.cpp
regions/specs/cote_divoire.hpp
regions/specs/croatia.cpp
regions/specs/croatia.hpp
regions/specs/cuba.cpp
regions/specs/cuba.hpp
regions/specs/cyprus.cpp
regions/specs/cyprus.hpp
regions/specs/czech_republic.cpp
regions/specs/czech_republic.hpp
regions/specs/denmark.cpp
regions/specs/denmark.hpp
regions/specs/dominican_republic.cpp
regions/specs/dominican_republic.hpp
regions/specs/egypt.cpp
regions/specs/egypt.hpp
regions/specs/estonia.cpp
regions/specs/estonia.hpp
regions/specs/ethiopia.cpp
regions/specs/ethiopia.hpp
regions/specs/finland.cpp
regions/specs/finland.hpp
regions/specs/france.cpp
regions/specs/france.hpp
regions/specs/french_polynesia.cpp
regions/specs/french_polynesia.hpp
regions/specs/gabon.cpp
regions/specs/gabon.hpp
regions/specs/gambia.cpp
regions/specs/gambia.hpp
regions/specs/georgia.cpp
regions/specs/georgia.hpp
regions/specs/germany.cpp
regions/specs/germany.hpp
regions/specs/ghana.cpp
regions/specs/ghana.hpp
regions/specs/greece.cpp
regions/specs/greece.hpp
regions/specs/guinea.cpp
regions/specs/guinea.hpp
regions/specs/haiti.cpp
regions/specs/haiti.hpp
regions/specs/hong_kong.cpp
regions/specs/hong_kong.hpp
regions/specs/hungary.cpp
regions/specs/hungary.hpp
regions/specs/iceland.cpp
regions/specs/iceland.hpp
regions/specs/india.cpp
regions/specs/india.hpp
regions/specs/indonesia.cpp
regions/specs/indonesia.hpp
regions/specs/iran.cpp
regions/specs/iran.hpp
regions/specs/iraq.cpp
regions/specs/iraq.hpp
regions/specs/ireland.cpp
regions/specs/ireland.hpp
regions/specs/isle_of_man.cpp
regions/specs/isle_of_man.hpp
regions/specs/israel.cpp
regions/specs/israel.hpp
regions/specs/italy.cpp
regions/specs/italy.hpp
regions/specs/japan.cpp
regions/specs/japan.hpp
regions/specs/jordan.cpp
regions/specs/jordan.hpp
regions/specs/kosovo.cpp
regions/specs/kosovo.hpp
regions/specs/laos.cpp
regions/specs/laos.hpp
regions/specs/latvia.cpp
regions/specs/latvia.hpp
regions/specs/lebanon.cpp
regions/specs/lebanon.hpp
regions/specs/lesotho.cpp
regions/specs/lesotho.hpp
regions/specs/liberia.cpp
regions/specs/liberia.hpp
regions/specs/libya.cpp
regions/specs/libya.hpp
regions/specs/lithuania.cpp
regions/specs/lithuania.hpp
regions/specs/luxembourg.cpp
regions/specs/luxembourg.hpp
regions/specs/macedonia.cpp
regions/specs/macedonia.hpp
regions/specs/madagascar.cpp
regions/specs/madagascar.hpp
regions/specs/malawi.cpp
regions/specs/malawi.hpp
regions/specs/malaysia.cpp
regions/specs/malaysia.hpp
regions/specs/mali.cpp
regions/specs/mali.hpp
regions/specs/mauritania.cpp
regions/specs/mauritania.hpp
regions/specs/moldova.cpp
regions/specs/moldova.hpp
regions/specs/morocco.cpp
regions/specs/morocco.hpp
regions/specs/mozambique.cpp
regions/specs/mozambique.hpp
regions/specs/myanmar.cpp
regions/specs/myanmar.hpp
regions/specs/nepal.cpp
regions/specs/nepal.hpp
regions/specs/netherlands.cpp
regions/specs/netherlands.hpp
regions/specs/new_zealand.cpp
regions/specs/new_zealand.hpp
regions/specs/niger.cpp
regions/specs/niger.hpp
regions/specs/nigeria.cpp
regions/specs/nigeria.hpp
regions/specs/north_korea.cpp
regions/specs/north_korea.hpp
regions/specs/norway.cpp
regions/specs/norway.hpp
regions/specs/philippines.cpp
regions/specs/philippines.hpp
regions/specs/poland.cpp
regions/specs/poland.hpp
regions/specs/portugal.cpp
regions/specs/portugal.hpp
regions/specs/romania.cpp
regions/specs/romania.hpp
regions/specs/russia.cpp
regions/specs/russia.hpp
regions/specs/senegal.cpp
regions/specs/senegal.hpp
regions/specs/serbia.cpp
regions/specs/serbia.hpp
regions/specs/sierra_leone.cpp
regions/specs/sierra_leone.hpp
regions/specs/slovakia.cpp
regions/specs/slovakia.hpp
regions/specs/slovenia.cpp
regions/specs/slovenia.hpp
regions/specs/south_africa.cpp
regions/specs/south_africa.hpp
regions/specs/south_korea.cpp
regions/specs/south_korea.hpp
regions/specs/south_sudan.cpp
regions/specs/south_sudan.hpp
regions/specs/swaziland.cpp
regions/specs/swaziland.hpp
regions/specs/sweden.cpp
regions/specs/sweden.hpp
regions/specs/suriname.cpp
regions/specs/suriname.hpp
regions/specs/switzerland.cpp
regions/specs/switzerland.hpp
regions/specs/syria.cpp
regions/specs/syria.hpp
regions/specs/taiwan.cpp
regions/specs/taiwan.hpp
regions/specs/tajikistan.cpp
regions/specs/tajikistan.hpp
regions/specs/tanzania.cpp
regions/specs/tanzania.hpp
regions/specs/thailand.cpp
regions/specs/thailand.hpp
regions/specs/the_central_african_republic.cpp
regions/specs/the_central_african_republic.hpp
regions/specs/togo.cpp
regions/specs/togo.hpp
regions/specs/tunisia.cpp
regions/specs/tunisia.hpp
regions/specs/turkey.cpp
regions/specs/turkey.hpp
regions/specs/uganda.cpp
regions/specs/uganda.hpp
regions/specs/ukraine.cpp
regions/specs/ukraine.hpp
regions/specs/united_kingdom.cpp
regions/specs/united_kingdom.hpp
regions/specs/united_states.cpp
regions/specs/united_states.hpp
regions/specs/vanuatu.cpp
regions/specs/vanuatu.hpp
regions/specs/vietnam.cpp
regions/specs/vietnam.hpp
relation_tags.cpp
relation_tags.hpp
relation_tags_enricher.cpp

View file

@ -89,6 +89,7 @@ omim_link_libraries(
opening_hours
stb_image
sdf_image
ugc
vulkan_wrapper
# TODO(syershov): Use FindPackage.
sqlite3
@ -101,5 +102,3 @@ if (PLATFORM_LINUX)
dl
)
endif()
link_qt5_core(${PROJECT_NAME})

View file

@ -4,8 +4,144 @@ namespace generator
{
namespace regions
{
// static
std::unordered_map<std::string, std::function<std::unique_ptr<CountrySpecifier>(void)>>
CountrySpecifierBuilder::m_specifiers;
std::unique_ptr<CountrySpecifier> CountrySpecifierBuilder::GetCountrySpecifier(
std::string const & country) const
{
auto it = m_specifiers.find(country);
if (it == m_specifiers.end())
{
LOG(LWARNING, ("Country", country, "has not specifier, look at generator/regions/specs"));
return std::make_unique<CountrySpecifier>();
}
return it->second();
}
} // namespace regions
} // namespace generator
#include "generator/regions/specs/afghanistan.inl"
#include "generator/regions/specs/albania.inl"
#include "generator/regions/specs/algeria.inl"
#include "generator/regions/specs/andorra.inl"
#include "generator/regions/specs/angola.inl"
#include "generator/regions/specs/antigua_and_barbuda.inl"
#include "generator/regions/specs/argentina.inl"
#include "generator/regions/specs/aruba.inl"
#include "generator/regions/specs/australia.inl"
#include "generator/regions/specs/austria.inl"
#include "generator/regions/specs/azerbaijan.inl"
#include "generator/regions/specs/bahamas.inl"
#include "generator/regions/specs/bahrain.inl"
#include "generator/regions/specs/bangladesh.inl"
#include "generator/regions/specs/barbados.inl"
#include "generator/regions/specs/belarus.inl"
#include "generator/regions/specs/belgium.inl"
#include "generator/regions/specs/belize.inl"
#include "generator/regions/specs/benin.inl"
#include "generator/regions/specs/bhutan.inl"
#include "generator/regions/specs/bolivia.inl"
#include "generator/regions/specs/bosnia_and_herzegovina.inl"
#include "generator/regions/specs/brazil.inl"
#include "generator/regions/specs/brunei.inl"
#include "generator/regions/specs/bulgaria.inl"
#include "generator/regions/specs/burkina_faso.inl"
#include "generator/regions/specs/burundi.inl"
#include "generator/regions/specs/cameroon.inl"
#include "generator/regions/specs/canada.inl"
#include "generator/regions/specs/chad.inl"
#include "generator/regions/specs/chile.inl"
#include "generator/regions/specs/china.inl"
#include "generator/regions/specs/colombia.inl"
#include "generator/regions/specs/costa_rica.inl"
#include "generator/regions/specs/cote_divoire.inl"
#include "generator/regions/specs/croatia.inl"
#include "generator/regions/specs/cuba.inl"
#include "generator/regions/specs/cyprus.inl"
#include "generator/regions/specs/czech_republic.inl"
#include "generator/regions/specs/denmark.inl"
#include "generator/regions/specs/dominican_republic.inl"
#include "generator/regions/specs/egypt.inl"
#include "generator/regions/specs/estonia.inl"
#include "generator/regions/specs/ethiopia.inl"
#include "generator/regions/specs/finland.inl"
#include "generator/regions/specs/france.inl"
#include "generator/regions/specs/french_polynesia.inl"
#include "generator/regions/specs/gabon.inl"
#include "generator/regions/specs/gambia.inl"
#include "generator/regions/specs/georgia.inl"
#include "generator/regions/specs/germany.inl"
#include "generator/regions/specs/ghana.inl"
#include "generator/regions/specs/greece.inl"
#include "generator/regions/specs/guinea.inl"
#include "generator/regions/specs/haiti.inl"
#include "generator/regions/specs/hong_kong.inl"
#include "generator/regions/specs/hungary.inl"
#include "generator/regions/specs/iceland.inl"
#include "generator/regions/specs/india.inl"
#include "generator/regions/specs/indonesia.inl"
#include "generator/regions/specs/iran.inl"
#include "generator/regions/specs/iraq.inl"
#include "generator/regions/specs/ireland.inl"
#include "generator/regions/specs/isle_of_man.inl"
#include "generator/regions/specs/israel.inl"
#include "generator/regions/specs/italy.inl"
#include "generator/regions/specs/japan.inl"
#include "generator/regions/specs/jordan.inl"
#include "generator/regions/specs/kosovo.inl"
#include "generator/regions/specs/laos.inl"
#include "generator/regions/specs/latvia.inl"
#include "generator/regions/specs/lebanon.inl"
#include "generator/regions/specs/lesotho.inl"
#include "generator/regions/specs/liberia.inl"
#include "generator/regions/specs/libya.inl"
#include "generator/regions/specs/lithuania.inl"
#include "generator/regions/specs/luxembourg.inl"
#include "generator/regions/specs/macedonia.inl"
#include "generator/regions/specs/madagascar.inl"
#include "generator/regions/specs/malawi.inl"
#include "generator/regions/specs/malaysia.inl"
#include "generator/regions/specs/mali.inl"
#include "generator/regions/specs/mauritania.inl"
#include "generator/regions/specs/moldova.inl"
#include "generator/regions/specs/morocco.inl"
#include "generator/regions/specs/mozambique.inl"
#include "generator/regions/specs/myanmar.inl"
#include "generator/regions/specs/nepal.inl"
#include "generator/regions/specs/netherlands.inl"
#include "generator/regions/specs/new_zealand.inl"
#include "generator/regions/specs/niger.inl"
#include "generator/regions/specs/nigeria.inl"
#include "generator/regions/specs/north_korea.inl"
#include "generator/regions/specs/norway.inl"
#include "generator/regions/specs/philippines.inl"
#include "generator/regions/specs/poland.inl"
#include "generator/regions/specs/portugal.inl"
#include "generator/regions/specs/romania.inl"
#include "generator/regions/specs/russia.inl"
#include "generator/regions/specs/senegal.inl"
#include "generator/regions/specs/serbia.inl"
#include "generator/regions/specs/sierra_leone.inl"
#include "generator/regions/specs/slovakia.inl"
#include "generator/regions/specs/slovenia.inl"
#include "generator/regions/specs/south_africa.inl"
#include "generator/regions/specs/south_korea.inl"
#include "generator/regions/specs/south_sudan.inl"
#include "generator/regions/specs/suriname.inl"
#include "generator/regions/specs/swaziland.inl"
#include "generator/regions/specs/sweden.inl"
#include "generator/regions/specs/switzerland.inl"
#include "generator/regions/specs/syria.inl"
#include "generator/regions/specs/taiwan.inl"
#include "generator/regions/specs/tajikistan.inl"
#include "generator/regions/specs/tanzania.inl"
#include "generator/regions/specs/thailand.inl"
#include "generator/regions/specs/the_central_african_republic.inl"
#include "generator/regions/specs/togo.inl"
#include "generator/regions/specs/tunisia.inl"
#include "generator/regions/specs/turkey.inl"
#include "generator/regions/specs/uganda.inl"
#include "generator/regions/specs/ukraine.inl"
#include "generator/regions/specs/united_kingdom.inl"
#include "generator/regions/specs/united_states.inl"
#include "generator/regions/specs/vanuatu.inl"
#include "generator/regions/specs/vietnam.inl"

View file

@ -14,39 +14,40 @@ namespace regions
class CountrySpecifierBuilder
{
public:
static CountrySpecifierBuilder & GetInstance()
{
static CountrySpecifierBuilder instance;
return instance;
}
std::unique_ptr<CountrySpecifier> GetCountrySpecifier(std::string const & country) const;
template <class T>
void static Register()
void Register()
{
for (std::string name : T::GetCountryNames())
m_specifiers.emplace(std::make_pair(std::move(name), []() { return std::make_unique<T>(); }));
}
static std::unique_ptr<CountrySpecifier> GetCountrySpecifier(std::string const & country)
{
auto it = m_specifiers.find(country);
if (it == m_specifiers.end())
{
LOG(LWARNING, ("Country", country, "has not specifier, look at generator/regions/specs"));
return std::make_unique<CountrySpecifier>();
}
return it->second();
}
private:
static std::unordered_map<std::string, std::function<std::unique_ptr<CountrySpecifier>(void)>>
CountrySpecifierBuilder() = default;
CountrySpecifierBuilder(const CountrySpecifierBuilder&) = delete;
CountrySpecifierBuilder& operator=(const CountrySpecifierBuilder&) = delete;
CountrySpecifierBuilder(CountrySpecifierBuilder&&) = delete;
CountrySpecifierBuilder& operator=(CountrySpecifierBuilder&&) = delete;
std::unordered_map<std::string, std::function<std::unique_ptr<CountrySpecifier>(void)>>
m_specifiers;
static std::set<std::string> kCountriesWithoutSpecifier;
static std::set<std::string> kCountriesWithSpecifier;
static std::mutex kMutex;
};
#define REGISTER_COUNTRY_SPECIFIER(Specifier) \
struct REGISTER_COUNTRY_SPECIFIER##Specifier \
struct COUNTRY_SPECIFIER_##Specifier \
{ \
REGISTER_COUNTRY_SPECIFIER##Specifier() { CountrySpecifierBuilder::Register<Specifier>(); } \
COUNTRY_SPECIFIER_##Specifier() \
{ \
CountrySpecifierBuilder::GetInstance().Register<Specifier>(); \
} \
}; \
static REGISTER_COUNTRY_SPECIFIER##Specifier a;
static COUNTRY_SPECIFIER_##Specifier STATIC_VAR_COUNTRY_SPECIFIER_##Specifier;
} // namespace regions
} // namespace generator

View file

@ -3,7 +3,6 @@
#include "generator/regions/admin_suburbs_marker.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include "generator/regions/place_points_integrator.hpp"
#include "generator/regions/specs/russia.hpp"
#include "base/assert.hpp"
#include "base/stl_helpers.hpp"
@ -297,7 +296,7 @@ Node::PtrList RegionsBuilder::BuildCountry(std::string const & countryName) cons
};
std::copy_if(std::begin(countries), std::end(countries), std::back_inserter(outers), pred);
auto countrySpecifier = CountrySpecifierBuilder::GetCountrySpecifier(countryName);
auto countrySpecifier = CountrySpecifierBuilder::GetInstance().GetCountrySpecifier(countryName);
auto countryTrees = BuildCountryRegionTrees(outers, *countrySpecifier);
PlacePointsIntegrator pointsIntegrator{m_placePointsMap, *countrySpecifier};

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class AfghanistanSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Afghanistan"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/afghanistan.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class AfghanistanSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Afghanistan"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(AfghanistanSpecifier);
PlaceLevel AfghanistanSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class AlbaniaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Albania"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/albania.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class AlbaniaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Albania"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(AlbaniaSpecifier);
PlaceLevel AlbaniaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class AlgeriaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Algeria"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/algeria.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class AlgeriaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Algeria"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(AlgeriaSpecifier);
PlaceLevel AlgeriaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class AndorraSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Andorra"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/andorra.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class AndorraSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Andorra"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(AndorraSpecifier);
PlaceLevel AndorraSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class AngolaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Angola"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/angola.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class AngolaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Angola"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(AngolaSpecifier);
PlaceLevel AngolaSpecifier::GetSpecificCountryLevel(Region const & region) const
@ -18,7 +35,6 @@ PlaceLevel AngolaSpecifier::GetSpecificCountryLevel(Region const & region) const
case AdminLevel::Four: return PlaceLevel::Region; // Províncias
case AdminLevel::Six: return PlaceLevel::Subregion; // Municípios (Municipalities)
case AdminLevel::Seven:
return PlaceLevel::Locality; // Comunas (Urban districts or Communes) includes towns
default: break;
}

View file

@ -1,26 +0,0 @@
#include "generator/regions/specs/antigua_and_barbuda.hpp"
#include "generator/regions/country_specifier_builder.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
REGISTER_COUNTRY_SPECIFIER(AntiguaAndBarbudaSpecifier);
PlaceLevel AntiguaAndBarbudaSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Four: return PlaceLevel::Region; // Parishes and dependencies borders
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,7 +1,12 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
@ -9,6 +14,7 @@ namespace regions
{
namespace specs
{
class AntiguaAndBarbudaSpecifier final : public CountrySpecifier
{
public:
@ -18,6 +24,20 @@ private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(AntiguaAndBarbudaSpecifier);
PlaceLevel AntiguaAndBarbudaSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Four: return PlaceLevel::Region; // Parishes and dependencies borders
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class ArgentinaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Argentina"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/argentina.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class ArgentinaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Argentina"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(ArgentinaSpecifier);
PlaceLevel ArgentinaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,26 +0,0 @@
#include "generator/regions/specs/aruba.hpp"
#include "generator/regions/country_specifier_builder.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
REGISTER_COUNTRY_SPECIFIER(ArubaSpecifier);
PlaceLevel ArubaSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Eight:
return PlaceLevel::Region; // Districts (Municipalities) known as GAC regions
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,7 +1,12 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
@ -9,6 +14,7 @@ namespace regions
{
namespace specs
{
class ArubaSpecifier final : public CountrySpecifier
{
public:
@ -18,6 +24,20 @@ private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(ArubaSpecifier);
PlaceLevel ArubaSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Eight:
return PlaceLevel::Region; // Districts (Municipalities) known as GAC regions
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class AustraliaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Australia"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/australia.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class AustraliaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Australia"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(AustraliaSpecifier);
PlaceLevel AustraliaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class AustriaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Austria"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/austria.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class AustriaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Austria"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(AustriaSpecifier);
PlaceLevel AustriaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class AzerbaijanSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Azerbaijan"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/azerbaijan.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class AzerbaijanSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Azerbaijan"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(AzerbaijanSpecifier);
PlaceLevel AzerbaijanSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BahamasSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bahamas"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/bahamas.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BahamasSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bahamas"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BahamasSpecifier);
PlaceLevel BahamasSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BahrainSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bahrain"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/bahrain.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BahrainSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bahrain"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BahrainSpecifier);
PlaceLevel BahrainSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BangladeshSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bangladesh"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/bangladesh.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BangladeshSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bangladesh"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BangladeshSpecifier);
PlaceLevel BangladeshSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BarbadosSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Barbados"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/barbados.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BarbadosSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Barbados"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BarbadosSpecifier);
PlaceLevel BarbadosSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BelarusSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Belarus"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/belarus.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BelarusSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Belarus"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BelarusSpecifier);
PlaceLevel BelarusSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BelgiumSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Belgium"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/belgium.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BelgiumSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Belgium"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BelgiumSpecifier);
PlaceLevel BelgiumSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BelizeSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Belize"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/belize.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BelizeSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Belize"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BelizeSpecifier);
PlaceLevel BelizeSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BeninSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Benin"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/benin.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BeninSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Benin"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BeninSpecifier);
PlaceLevel BeninSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BhutanSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bhutan"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/bhutan.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BhutanSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bhutan"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BhutanSpecifier);
PlaceLevel BhutanSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BoliviaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bolivia"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/bolivia.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BoliviaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bolivia"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BoliviaSpecifier);
PlaceLevel BoliviaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BosniaAndHerzegovinaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bosnia And Herzegovina"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/bosnia_and_herzegovina.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BosniaAndHerzegovinaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bosnia And Herzegovina"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BosniaAndHerzegovinaSpecifier);
PlaceLevel BosniaAndHerzegovinaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BrazilSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Brazil"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/brazil.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BrazilSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Brazil"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BrazilSpecifier);
PlaceLevel BrazilSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BruneiSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Brunei"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/brunei.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BruneiSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Brunei"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BruneiSpecifier);
PlaceLevel BruneiSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BulgariaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bulgaria"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/bulgaria.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BulgariaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Bulgaria"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BulgariaSpecifier);
PlaceLevel BulgariaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BurkinaFasoSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Burkina Faso"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/burkina_faso.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BurkinaFasoSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Burkina Faso"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BurkinaFasoSpecifier);
PlaceLevel BurkinaFasoSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class BurundiSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Burundi"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/burundi.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class BurundiSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Burundi"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(BurundiSpecifier);
PlaceLevel BurundiSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class CameroonSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Cameroon"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/cameroon.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class CameroonSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Cameroon"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(CameroonSpecifier);
PlaceLevel CameroonSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class CanadaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Canada"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/canada.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class CanadaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Canada"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(CanadaSpecifier);
PlaceLevel CanadaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class ChadSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Chad"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/chad.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class ChadSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Chad"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(ChadSpecifier);
PlaceLevel ChadSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class ChileSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Chile"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/chile.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class ChileSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Chile"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(ChileSpecifier);
PlaceLevel ChileSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class ChinaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"China"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/china.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class ChinaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"China"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(ChinaSpecifier);
PlaceLevel ChinaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class ColombiaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Colombia"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/colombia.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class ColombiaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Colombia"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(ColombiaSpecifier);
PlaceLevel ColombiaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class CostaRicaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"CostaRica"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/costa_rica.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class CostaRicaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"CostaRica"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(CostaRicaSpecifier);
PlaceLevel CostaRicaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class CoteDivoireSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {u8"Côte d'Ivoire"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/cote_divoire.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class CoteDivoireSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {u8"Côte d'Ivoire"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(CoteDivoireSpecifier);
PlaceLevel CoteDivoireSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,26 +0,0 @@
#include "generator/regions/specs/croatia.hpp"
#include "generator/regions/country_specifier_builder.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
REGISTER_COUNTRY_SPECIFIER(CroatiaSpecifier);
PlaceLevel CroatiaSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Six: return PlaceLevel::Region; // County (hr: županije)
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,7 +1,12 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
@ -9,6 +14,7 @@ namespace regions
{
namespace specs
{
class CroatiaSpecifier final : public CountrySpecifier
{
public:
@ -18,6 +24,20 @@ private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(CroatiaSpecifier);
PlaceLevel CroatiaSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Six: return PlaceLevel::Region; // County (hr: županije)
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class CubaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Cuba"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/cuba.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class CubaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Cuba"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(CubaSpecifier);
PlaceLevel CubaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,26 +0,0 @@
#include "generator/regions/specs/cyprus.hpp"
#include "generator/regions/country_specifier_builder.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
REGISTER_COUNTRY_SPECIFIER(CyprusSpecifier);
PlaceLevel CyprusSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Six: return PlaceLevel::Region; // The 6 districts
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,7 +1,12 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
@ -9,6 +14,7 @@ namespace regions
{
namespace specs
{
class CyprusSpecifier final : public CountrySpecifier
{
public:
@ -18,6 +24,20 @@ private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(CyprusSpecifier);
PlaceLevel CyprusSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Six: return PlaceLevel::Region; // The 6 districts
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class CzechRepublicSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"CzechRepublic"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/czech_republic.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class CzechRepublicSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"CzechRepublic"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(CzechRepublicSpecifier);
PlaceLevel CzechRepublicSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class DenmarkSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Denmark"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/denmark.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class DenmarkSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Denmark"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(DenmarkSpecifier);
PlaceLevel DenmarkSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class DominicanRepublicSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"DominicanRepublic"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/dominican_republic.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class DominicanRepublicSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"DominicanRepublic"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(DominicanRepublicSpecifier);
PlaceLevel DominicanRepublicSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,26 +0,0 @@
#include "generator/regions/specs/egypt.hpp"
#include "generator/regions/country_specifier_builder.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
REGISTER_COUNTRY_SPECIFIER(EgyptSpecifier);
PlaceLevel EgyptSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Three: return PlaceLevel::Region; // Governorate (Mouhafazah محافظة)
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,7 +1,12 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
@ -9,6 +14,7 @@ namespace regions
{
namespace specs
{
class EgyptSpecifier final : public CountrySpecifier
{
public:
@ -18,6 +24,20 @@ private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(EgyptSpecifier);
PlaceLevel EgyptSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Three: return PlaceLevel::Region; // Governorate (Mouhafazah محافظة)
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,26 +0,0 @@
#include "generator/regions/specs/estonia.hpp"
#include "generator/regions/country_specifier_builder.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
REGISTER_COUNTRY_SPECIFIER(EstoniaSpecifier);
PlaceLevel EstoniaSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Six: return PlaceLevel::Region; // Countys
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,7 +1,12 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
@ -9,6 +14,7 @@ namespace regions
{
namespace specs
{
class EstoniaSpecifier final : public CountrySpecifier
{
public:
@ -18,6 +24,20 @@ private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(EstoniaSpecifier);
PlaceLevel EstoniaSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Six: return PlaceLevel::Region; // Countys
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class EthiopiaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Ethiopia"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/ethiopia.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class EthiopiaSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Ethiopia"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(EthiopiaSpecifier);
PlaceLevel EthiopiaSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class FinlandSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Finland"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/finland.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class FinlandSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Finland"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(FinlandSpecifier);
PlaceLevel FinlandSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class FranceSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"France"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,13 +1,30 @@
#include "generator/regions/specs/france.hpp"
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
namespace regions
{
namespace specs
{
class FranceSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"France"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(FranceSpecifier);
PlaceLevel FranceSpecifier::GetSpecificCountryLevel(Region const & region) const

View file

@ -1,27 +0,0 @@
#include "generator/regions/specs/french_polynesia.hpp"
#include "generator/regions/country_specifier_builder.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
REGISTER_COUNTRY_SPECIFIER(FrenchPolynesiaSpecifier);
PlaceLevel FrenchPolynesiaSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Six:
return PlaceLevel::Region; // Administratrive divisions (archipelagos or sub-archipelagos)
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,7 +1,12 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
#include "generator/regions/country_specifier_builder.hpp"
#include <vector>
#include <string>
namespace generator
{
@ -9,6 +14,7 @@ namespace regions
{
namespace specs
{
class FrenchPolynesiaSpecifier final : public CountrySpecifier
{
public:
@ -18,6 +24,21 @@ private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
REGISTER_COUNTRY_SPECIFIER(FrenchPolynesiaSpecifier);
PlaceLevel FrenchPolynesiaSpecifier::GetSpecificCountryLevel(Region const & region) const
{
AdminLevel adminLevel = region.GetAdminLevel();
switch (adminLevel)
{
case AdminLevel::Six:
return PlaceLevel::Region; // Administratrive divisions (archipelagos or sub-archipelagos)
default: break;
}
return PlaceLevel::Unknown;
}
} // namespace specs
} // namespace regions
} // namespace generator

View file

@ -1,23 +0,0 @@
#include "generator/place_node.hpp"
#include "generator/regions/collector_region_info.hpp"
#include "generator/regions/country_specifier.hpp"
#include "generator/regions/region.hpp"
namespace generator
{
namespace regions
{
namespace specs
{
class GabonSpecifier final : public CountrySpecifier
{
public:
static std::vector<std::string> GetCountryNames() { return {"Gabon"}; }
private:
// CountrySpecifier overrides:
PlaceLevel GetSpecificCountryLevel(Region const & region) const override;
};
} // namespace specs
} // namespace regions
} // namespace generator

Some files were not shown because too many files have changed in this diff Show more