diff --git a/generator/CMakeLists.txt b/generator/CMakeLists.txt index 52722d9312..9d099249fe 100644 --- a/generator/CMakeLists.txt +++ b/generator/CMakeLists.txt @@ -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 diff --git a/generator/generator_tests/CMakeLists.txt b/generator/generator_tests/CMakeLists.txt index 251a6759db..17c0a37496 100644 --- a/generator/generator_tests/CMakeLists.txt +++ b/generator/generator_tests/CMakeLists.txt @@ -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}) diff --git a/generator/regions/country_specifier_builder.cpp b/generator/regions/country_specifier_builder.cpp index 81fe225ed6..a5edd58e46 100644 --- a/generator/regions/country_specifier_builder.cpp +++ b/generator/regions/country_specifier_builder.cpp @@ -4,8 +4,144 @@ namespace generator { namespace regions { -// static -std::unordered_map(void)>> - CountrySpecifierBuilder::m_specifiers; +std::unique_ptr 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(); + } + + 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" diff --git a/generator/regions/country_specifier_builder.hpp b/generator/regions/country_specifier_builder.hpp index 0a5b4cef06..ee1aefaf50 100644 --- a/generator/regions/country_specifier_builder.hpp +++ b/generator/regions/country_specifier_builder.hpp @@ -14,39 +14,40 @@ namespace regions class CountrySpecifierBuilder { public: + static CountrySpecifierBuilder & GetInstance() + { + static CountrySpecifierBuilder instance; + return instance; + } + std::unique_ptr GetCountrySpecifier(std::string const & country) const; template - void static Register() + void Register() { for (std::string name : T::GetCountryNames()) m_specifiers.emplace(std::make_pair(std::move(name), []() { return std::make_unique(); })); } - static std::unique_ptr 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(); - } - - return it->second(); - } - private: - static std::unordered_map(void)>> + CountrySpecifierBuilder() = default; + CountrySpecifierBuilder(const CountrySpecifierBuilder&) = delete; + CountrySpecifierBuilder& operator=(const CountrySpecifierBuilder&) = delete; + CountrySpecifierBuilder(CountrySpecifierBuilder&&) = delete; + CountrySpecifierBuilder& operator=(CountrySpecifierBuilder&&) = delete; + + std::unordered_map(void)>> m_specifiers; - static std::set kCountriesWithoutSpecifier; - static std::set 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(); } \ + COUNTRY_SPECIFIER_##Specifier() \ + { \ + CountrySpecifierBuilder::GetInstance().Register(); \ + } \ }; \ - static REGISTER_COUNTRY_SPECIFIER##Specifier a; + static COUNTRY_SPECIFIER_##Specifier STATIC_VAR_COUNTRY_SPECIFIER_##Specifier; + } // namespace regions } // namespace generator diff --git a/generator/regions/regions_builder.cpp b/generator/regions/regions_builder.cpp index c5b610ae12..3a5c250d04 100644 --- a/generator/regions/regions_builder.cpp +++ b/generator/regions/regions_builder.cpp @@ -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}; diff --git a/generator/regions/specs/afghanistan.hpp b/generator/regions/specs/afghanistan.hpp deleted file mode 100644 index a190be1ddc..0000000000 --- a/generator/regions/specs/afghanistan.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Afghanistan"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/afghanistan.cpp b/generator/regions/specs/afghanistan.inl similarity index 54% rename from generator/regions/specs/afghanistan.cpp rename to generator/regions/specs/afghanistan.inl index aafaee074a..77938bb970 100644 --- a/generator/regions/specs/afghanistan.cpp +++ b/generator/regions/specs/afghanistan.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class AfghanistanSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Afghanistan"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(AfghanistanSpecifier); PlaceLevel AfghanistanSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/albania.hpp b/generator/regions/specs/albania.hpp deleted file mode 100644 index c29204bade..0000000000 --- a/generator/regions/specs/albania.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Albania"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/albania.cpp b/generator/regions/specs/albania.inl similarity index 58% rename from generator/regions/specs/albania.cpp rename to generator/regions/specs/albania.inl index e8341eeb48..48ac148184 100644 --- a/generator/regions/specs/albania.cpp +++ b/generator/regions/specs/albania.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class AlbaniaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Albania"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(AlbaniaSpecifier); PlaceLevel AlbaniaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/algeria.hpp b/generator/regions/specs/algeria.hpp deleted file mode 100644 index 06d1ace073..0000000000 --- a/generator/regions/specs/algeria.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Algeria"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/algeria.cpp b/generator/regions/specs/algeria.inl similarity index 59% rename from generator/regions/specs/algeria.cpp rename to generator/regions/specs/algeria.inl index a2205e4c9f..288245dba9 100644 --- a/generator/regions/specs/algeria.cpp +++ b/generator/regions/specs/algeria.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class AlgeriaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Algeria"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(AlgeriaSpecifier); PlaceLevel AlgeriaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/andorra.hpp b/generator/regions/specs/andorra.hpp deleted file mode 100644 index 50abbbdf09..0000000000 --- a/generator/regions/specs/andorra.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Andorra"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/andorra.cpp b/generator/regions/specs/andorra.inl similarity index 59% rename from generator/regions/specs/andorra.cpp rename to generator/regions/specs/andorra.inl index 058adfa84c..c24af1e369 100644 --- a/generator/regions/specs/andorra.cpp +++ b/generator/regions/specs/andorra.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class AndorraSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Andorra"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(AndorraSpecifier); PlaceLevel AndorraSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/angola.hpp b/generator/regions/specs/angola.hpp deleted file mode 100644 index 98bd249fe7..0000000000 --- a/generator/regions/specs/angola.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Angola"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/angola.cpp b/generator/regions/specs/angola.inl similarity index 56% rename from generator/regions/specs/angola.cpp rename to generator/regions/specs/angola.inl index 783728774f..0c3140f228 100644 --- a/generator/regions/specs/angola.cpp +++ b/generator/regions/specs/angola.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class AngolaSpecifier final : public CountrySpecifier +{ +public: + static std::vector 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; } diff --git a/generator/regions/specs/antigua_and_barbuda.cpp b/generator/regions/specs/antigua_and_barbuda.cpp deleted file mode 100644 index 23da5c05bd..0000000000 --- a/generator/regions/specs/antigua_and_barbuda.cpp +++ /dev/null @@ -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 diff --git a/generator/regions/specs/antigua_and_barbuda.hpp b/generator/regions/specs/antigua_and_barbuda.inl similarity index 55% rename from generator/regions/specs/antigua_and_barbuda.hpp rename to generator/regions/specs/antigua_and_barbuda.inl index f4c99bbde2..ebc00d5fbc 100644 --- a/generator/regions/specs/antigua_and_barbuda.hpp +++ b/generator/regions/specs/antigua_and_barbuda.inl @@ -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 +#include 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 diff --git a/generator/regions/specs/argentina.hpp b/generator/regions/specs/argentina.hpp deleted file mode 100644 index 4bd8247f24..0000000000 --- a/generator/regions/specs/argentina.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Argentina"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/argentina.cpp b/generator/regions/specs/argentina.inl similarity index 61% rename from generator/regions/specs/argentina.cpp rename to generator/regions/specs/argentina.inl index efc1f0d49b..5a2f43d75a 100644 --- a/generator/regions/specs/argentina.cpp +++ b/generator/regions/specs/argentina.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class ArgentinaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Argentina"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(ArgentinaSpecifier); PlaceLevel ArgentinaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/aruba.cpp b/generator/regions/specs/aruba.cpp deleted file mode 100644 index 008999520f..0000000000 --- a/generator/regions/specs/aruba.cpp +++ /dev/null @@ -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 diff --git a/generator/regions/specs/aruba.hpp b/generator/regions/specs/aruba.inl similarity index 55% rename from generator/regions/specs/aruba.hpp rename to generator/regions/specs/aruba.inl index 222a597034..e68561bdf6 100644 --- a/generator/regions/specs/aruba.hpp +++ b/generator/regions/specs/aruba.inl @@ -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 +#include 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 diff --git a/generator/regions/specs/australia.hpp b/generator/regions/specs/australia.hpp deleted file mode 100644 index eb14a8d388..0000000000 --- a/generator/regions/specs/australia.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Australia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/australia.cpp b/generator/regions/specs/australia.inl similarity index 66% rename from generator/regions/specs/australia.cpp rename to generator/regions/specs/australia.inl index 9cbe928255..db90d27c50 100644 --- a/generator/regions/specs/australia.cpp +++ b/generator/regions/specs/australia.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class AustraliaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Australia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(AustraliaSpecifier); PlaceLevel AustraliaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/austria.hpp b/generator/regions/specs/austria.hpp deleted file mode 100644 index 0b2966a99d..0000000000 --- a/generator/regions/specs/austria.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Austria"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/austria.cpp b/generator/regions/specs/austria.inl similarity index 59% rename from generator/regions/specs/austria.cpp rename to generator/regions/specs/austria.inl index 30e25cd626..df4f67b1f1 100644 --- a/generator/regions/specs/austria.cpp +++ b/generator/regions/specs/austria.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class AustriaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Austria"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(AustriaSpecifier); PlaceLevel AustriaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/azerbaijan.hpp b/generator/regions/specs/azerbaijan.hpp deleted file mode 100644 index c60e7a1858..0000000000 --- a/generator/regions/specs/azerbaijan.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Azerbaijan"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/azerbaijan.cpp b/generator/regions/specs/azerbaijan.inl similarity index 57% rename from generator/regions/specs/azerbaijan.cpp rename to generator/regions/specs/azerbaijan.inl index 27a23f7da1..cf538fa5ea 100644 --- a/generator/regions/specs/azerbaijan.cpp +++ b/generator/regions/specs/azerbaijan.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class AzerbaijanSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Azerbaijan"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(AzerbaijanSpecifier); PlaceLevel AzerbaijanSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/bahamas.hpp b/generator/regions/specs/bahamas.hpp deleted file mode 100644 index 1dfa4d3d67..0000000000 --- a/generator/regions/specs/bahamas.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Bahamas"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/bahamas.cpp b/generator/regions/specs/bahamas.inl similarity index 59% rename from generator/regions/specs/bahamas.cpp rename to generator/regions/specs/bahamas.inl index d82e882ae6..69de90877c 100644 --- a/generator/regions/specs/bahamas.cpp +++ b/generator/regions/specs/bahamas.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BahamasSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Bahamas"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BahamasSpecifier); PlaceLevel BahamasSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/bahrain.hpp b/generator/regions/specs/bahrain.hpp deleted file mode 100644 index 7214d8500c..0000000000 --- a/generator/regions/specs/bahrain.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Bahrain"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/bahrain.cpp b/generator/regions/specs/bahrain.inl similarity index 59% rename from generator/regions/specs/bahrain.cpp rename to generator/regions/specs/bahrain.inl index 3eb457a42e..651fd26a41 100644 --- a/generator/regions/specs/bahrain.cpp +++ b/generator/regions/specs/bahrain.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BahrainSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Bahrain"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BahrainSpecifier); PlaceLevel BahrainSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/bangladesh.hpp b/generator/regions/specs/bangladesh.hpp deleted file mode 100644 index aac3fdd921..0000000000 --- a/generator/regions/specs/bangladesh.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Bangladesh"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/bangladesh.cpp b/generator/regions/specs/bangladesh.inl similarity index 57% rename from generator/regions/specs/bangladesh.cpp rename to generator/regions/specs/bangladesh.inl index 8d35f39b1f..05a453c1ec 100644 --- a/generator/regions/specs/bangladesh.cpp +++ b/generator/regions/specs/bangladesh.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BangladeshSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Bangladesh"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BangladeshSpecifier); PlaceLevel BangladeshSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/barbados.hpp b/generator/regions/specs/barbados.hpp deleted file mode 100644 index 39a8b6f7e6..0000000000 --- a/generator/regions/specs/barbados.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Barbados"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/barbados.cpp b/generator/regions/specs/barbados.inl similarity index 59% rename from generator/regions/specs/barbados.cpp rename to generator/regions/specs/barbados.inl index 130e2e723a..1dd629459d 100644 --- a/generator/regions/specs/barbados.cpp +++ b/generator/regions/specs/barbados.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BarbadosSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Barbados"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BarbadosSpecifier); PlaceLevel BarbadosSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/belarus.hpp b/generator/regions/specs/belarus.hpp deleted file mode 100644 index da25a5daf3..0000000000 --- a/generator/regions/specs/belarus.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Belarus"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/belarus.cpp b/generator/regions/specs/belarus.inl similarity index 68% rename from generator/regions/specs/belarus.cpp rename to generator/regions/specs/belarus.inl index 17dfee6b4f..d198c552f4 100644 --- a/generator/regions/specs/belarus.cpp +++ b/generator/regions/specs/belarus.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BelarusSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Belarus"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BelarusSpecifier); PlaceLevel BelarusSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/belgium.hpp b/generator/regions/specs/belgium.hpp deleted file mode 100644 index 67b8cdb50e..0000000000 --- a/generator/regions/specs/belgium.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Belgium"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/belgium.cpp b/generator/regions/specs/belgium.inl similarity index 59% rename from generator/regions/specs/belgium.cpp rename to generator/regions/specs/belgium.inl index b52ccba7f5..df7cf7952a 100644 --- a/generator/regions/specs/belgium.cpp +++ b/generator/regions/specs/belgium.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BelgiumSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Belgium"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BelgiumSpecifier); PlaceLevel BelgiumSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/belize.hpp b/generator/regions/specs/belize.hpp deleted file mode 100644 index ce96d50722..0000000000 --- a/generator/regions/specs/belize.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Belize"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/belize.cpp b/generator/regions/specs/belize.inl similarity index 55% rename from generator/regions/specs/belize.cpp rename to generator/regions/specs/belize.inl index 65d276842b..08983e3fd0 100644 --- a/generator/regions/specs/belize.cpp +++ b/generator/regions/specs/belize.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BelizeSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Belize"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BelizeSpecifier); PlaceLevel BelizeSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/benin.hpp b/generator/regions/specs/benin.hpp deleted file mode 100644 index 629deb7a49..0000000000 --- a/generator/regions/specs/benin.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Benin"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/benin.cpp b/generator/regions/specs/benin.inl similarity index 59% rename from generator/regions/specs/benin.cpp rename to generator/regions/specs/benin.inl index d501408415..d03b614f2b 100644 --- a/generator/regions/specs/benin.cpp +++ b/generator/regions/specs/benin.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BeninSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Benin"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BeninSpecifier); PlaceLevel BeninSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/bhutan.hpp b/generator/regions/specs/bhutan.hpp deleted file mode 100644 index 8927719a89..0000000000 --- a/generator/regions/specs/bhutan.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Bhutan"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/bhutan.cpp b/generator/regions/specs/bhutan.inl similarity index 59% rename from generator/regions/specs/bhutan.cpp rename to generator/regions/specs/bhutan.inl index 9718af3d73..5b708b3ace 100644 --- a/generator/regions/specs/bhutan.cpp +++ b/generator/regions/specs/bhutan.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BhutanSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Bhutan"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BhutanSpecifier); PlaceLevel BhutanSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/bolivia.hpp b/generator/regions/specs/bolivia.hpp deleted file mode 100644 index 118d4d56b6..0000000000 --- a/generator/regions/specs/bolivia.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Bolivia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/bolivia.cpp b/generator/regions/specs/bolivia.inl similarity index 55% rename from generator/regions/specs/bolivia.cpp rename to generator/regions/specs/bolivia.inl index a326677c53..6700cfb7ad 100644 --- a/generator/regions/specs/bolivia.cpp +++ b/generator/regions/specs/bolivia.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BoliviaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Bolivia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BoliviaSpecifier); PlaceLevel BoliviaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/bosnia_and_herzegovina.hpp b/generator/regions/specs/bosnia_and_herzegovina.hpp deleted file mode 100644 index 5549e63cfc..0000000000 --- a/generator/regions/specs/bosnia_and_herzegovina.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Bosnia And Herzegovina"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/bosnia_and_herzegovina.cpp b/generator/regions/specs/bosnia_and_herzegovina.inl similarity index 61% rename from generator/regions/specs/bosnia_and_herzegovina.cpp rename to generator/regions/specs/bosnia_and_herzegovina.inl index 89f5f4bec4..b69593b487 100644 --- a/generator/regions/specs/bosnia_and_herzegovina.cpp +++ b/generator/regions/specs/bosnia_and_herzegovina.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BosniaAndHerzegovinaSpecifier final : public CountrySpecifier +{ +public: + static std::vector 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 diff --git a/generator/regions/specs/brazil.hpp b/generator/regions/specs/brazil.hpp deleted file mode 100644 index 362a316b41..0000000000 --- a/generator/regions/specs/brazil.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Brazil"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/brazil.cpp b/generator/regions/specs/brazil.inl similarity index 59% rename from generator/regions/specs/brazil.cpp rename to generator/regions/specs/brazil.inl index 44013d1627..d54a8e4f81 100644 --- a/generator/regions/specs/brazil.cpp +++ b/generator/regions/specs/brazil.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BrazilSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Brazil"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BrazilSpecifier); PlaceLevel BrazilSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/brunei.hpp b/generator/regions/specs/brunei.hpp deleted file mode 100644 index d367401152..0000000000 --- a/generator/regions/specs/brunei.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Brunei"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/brunei.cpp b/generator/regions/specs/brunei.inl similarity index 61% rename from generator/regions/specs/brunei.cpp rename to generator/regions/specs/brunei.inl index c7ae9fd60c..db1b360046 100644 --- a/generator/regions/specs/brunei.cpp +++ b/generator/regions/specs/brunei.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BruneiSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Brunei"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BruneiSpecifier); PlaceLevel BruneiSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/bulgaria.hpp b/generator/regions/specs/bulgaria.hpp deleted file mode 100644 index 6c9afeb911..0000000000 --- a/generator/regions/specs/bulgaria.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Bulgaria"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/bulgaria.cpp b/generator/regions/specs/bulgaria.inl similarity index 62% rename from generator/regions/specs/bulgaria.cpp rename to generator/regions/specs/bulgaria.inl index b4db043046..cf5b2b7217 100644 --- a/generator/regions/specs/bulgaria.cpp +++ b/generator/regions/specs/bulgaria.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BulgariaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Bulgaria"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BulgariaSpecifier); PlaceLevel BulgariaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/burkina_faso.hpp b/generator/regions/specs/burkina_faso.hpp deleted file mode 100644 index 5b5a022c29..0000000000 --- a/generator/regions/specs/burkina_faso.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Burkina Faso"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/burkina_faso.cpp b/generator/regions/specs/burkina_faso.inl similarity index 64% rename from generator/regions/specs/burkina_faso.cpp rename to generator/regions/specs/burkina_faso.inl index e6c387a20a..e8fa678687 100644 --- a/generator/regions/specs/burkina_faso.cpp +++ b/generator/regions/specs/burkina_faso.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BurkinaFasoSpecifier final : public CountrySpecifier +{ +public: + static std::vector 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 diff --git a/generator/regions/specs/burundi.hpp b/generator/regions/specs/burundi.hpp deleted file mode 100644 index b4c61805b5..0000000000 --- a/generator/regions/specs/burundi.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Burundi"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/burundi.cpp b/generator/regions/specs/burundi.inl similarity index 60% rename from generator/regions/specs/burundi.cpp rename to generator/regions/specs/burundi.inl index 2af7616458..8153350389 100644 --- a/generator/regions/specs/burundi.cpp +++ b/generator/regions/specs/burundi.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class BurundiSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Burundi"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(BurundiSpecifier); PlaceLevel BurundiSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/cameroon.hpp b/generator/regions/specs/cameroon.hpp deleted file mode 100644 index 554342f021..0000000000 --- a/generator/regions/specs/cameroon.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Cameroon"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/cameroon.cpp b/generator/regions/specs/cameroon.inl similarity index 56% rename from generator/regions/specs/cameroon.cpp rename to generator/regions/specs/cameroon.inl index f0cea75007..63ee071507 100644 --- a/generator/regions/specs/cameroon.cpp +++ b/generator/regions/specs/cameroon.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class CameroonSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Cameroon"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(CameroonSpecifier); PlaceLevel CameroonSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/canada.hpp b/generator/regions/specs/canada.hpp deleted file mode 100644 index 04285ebef1..0000000000 --- a/generator/regions/specs/canada.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Canada"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/canada.cpp b/generator/regions/specs/canada.inl similarity index 59% rename from generator/regions/specs/canada.cpp rename to generator/regions/specs/canada.inl index 1b8b4ace76..3b5b7045c6 100644 --- a/generator/regions/specs/canada.cpp +++ b/generator/regions/specs/canada.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class CanadaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Canada"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(CanadaSpecifier); PlaceLevel CanadaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/chad.hpp b/generator/regions/specs/chad.hpp deleted file mode 100644 index 3e2e4dc26c..0000000000 --- a/generator/regions/specs/chad.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Chad"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/chad.cpp b/generator/regions/specs/chad.inl similarity index 58% rename from generator/regions/specs/chad.cpp rename to generator/regions/specs/chad.inl index f94a2824b1..93458216fb 100644 --- a/generator/regions/specs/chad.cpp +++ b/generator/regions/specs/chad.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class ChadSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Chad"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(ChadSpecifier); PlaceLevel ChadSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/chile.hpp b/generator/regions/specs/chile.hpp deleted file mode 100644 index 4684652c88..0000000000 --- a/generator/regions/specs/chile.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Chile"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/chile.cpp b/generator/regions/specs/chile.inl similarity index 55% rename from generator/regions/specs/chile.cpp rename to generator/regions/specs/chile.inl index 35ed89e516..45fb14a31d 100644 --- a/generator/regions/specs/chile.cpp +++ b/generator/regions/specs/chile.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class ChileSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Chile"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(ChileSpecifier); PlaceLevel ChileSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/china.hpp b/generator/regions/specs/china.hpp deleted file mode 100644 index 479b2e3ce9..0000000000 --- a/generator/regions/specs/china.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"China"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/china.cpp b/generator/regions/specs/china.inl similarity index 63% rename from generator/regions/specs/china.cpp rename to generator/regions/specs/china.inl index 789983fa9f..6810082c59 100644 --- a/generator/regions/specs/china.cpp +++ b/generator/regions/specs/china.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class ChinaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"China"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(ChinaSpecifier); PlaceLevel ChinaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/colombia.hpp b/generator/regions/specs/colombia.hpp deleted file mode 100644 index 673ec8e16f..0000000000 --- a/generator/regions/specs/colombia.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Colombia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/colombia.cpp b/generator/regions/specs/colombia.inl similarity index 55% rename from generator/regions/specs/colombia.cpp rename to generator/regions/specs/colombia.inl index 9891a556de..02b4f3476c 100644 --- a/generator/regions/specs/colombia.cpp +++ b/generator/regions/specs/colombia.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class ColombiaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Colombia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(ColombiaSpecifier); PlaceLevel ColombiaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/costa_rica.hpp b/generator/regions/specs/costa_rica.hpp deleted file mode 100644 index 36099427a3..0000000000 --- a/generator/regions/specs/costa_rica.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"CostaRica"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/costa_rica.cpp b/generator/regions/specs/costa_rica.inl similarity index 57% rename from generator/regions/specs/costa_rica.cpp rename to generator/regions/specs/costa_rica.inl index 3d0960affa..8d8862f209 100644 --- a/generator/regions/specs/costa_rica.cpp +++ b/generator/regions/specs/costa_rica.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class CostaRicaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"CostaRica"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(CostaRicaSpecifier); PlaceLevel CostaRicaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/cote_divoire.hpp b/generator/regions/specs/cote_divoire.hpp deleted file mode 100644 index 497fe2bdc0..0000000000 --- a/generator/regions/specs/cote_divoire.hpp +++ /dev/null @@ -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 GetCountryNames() { return {u8"Côte d'Ivoire"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/cote_divoire.cpp b/generator/regions/specs/cote_divoire.inl similarity index 64% rename from generator/regions/specs/cote_divoire.cpp rename to generator/regions/specs/cote_divoire.inl index e30daf210b..c1e26bf051 100644 --- a/generator/regions/specs/cote_divoire.cpp +++ b/generator/regions/specs/cote_divoire.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class CoteDivoireSpecifier final : public CountrySpecifier +{ +public: + static std::vector 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 diff --git a/generator/regions/specs/croatia.cpp b/generator/regions/specs/croatia.cpp deleted file mode 100644 index d76d13538d..0000000000 --- a/generator/regions/specs/croatia.cpp +++ /dev/null @@ -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 diff --git a/generator/regions/specs/croatia.hpp b/generator/regions/specs/croatia.inl similarity index 56% rename from generator/regions/specs/croatia.hpp rename to generator/regions/specs/croatia.inl index dd7f8395e0..77aa81be9d 100644 --- a/generator/regions/specs/croatia.hpp +++ b/generator/regions/specs/croatia.inl @@ -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 +#include 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 diff --git a/generator/regions/specs/cuba.hpp b/generator/regions/specs/cuba.hpp deleted file mode 100644 index a96cbab5c6..0000000000 --- a/generator/regions/specs/cuba.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Cuba"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/cuba.cpp b/generator/regions/specs/cuba.inl similarity index 55% rename from generator/regions/specs/cuba.cpp rename to generator/regions/specs/cuba.inl index 5a2eb3f7f2..47237d03cc 100644 --- a/generator/regions/specs/cuba.cpp +++ b/generator/regions/specs/cuba.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class CubaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Cuba"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(CubaSpecifier); PlaceLevel CubaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/cyprus.cpp b/generator/regions/specs/cyprus.cpp deleted file mode 100644 index 8a6b273d48..0000000000 --- a/generator/regions/specs/cyprus.cpp +++ /dev/null @@ -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 diff --git a/generator/regions/specs/cyprus.hpp b/generator/regions/specs/cyprus.inl similarity index 57% rename from generator/regions/specs/cyprus.hpp rename to generator/regions/specs/cyprus.inl index 5ced2923ef..76fd5245d2 100644 --- a/generator/regions/specs/cyprus.hpp +++ b/generator/regions/specs/cyprus.inl @@ -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 +#include 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 diff --git a/generator/regions/specs/czech_republic.hpp b/generator/regions/specs/czech_republic.hpp deleted file mode 100644 index f39e54408e..0000000000 --- a/generator/regions/specs/czech_republic.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"CzechRepublic"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/czech_republic.cpp b/generator/regions/specs/czech_republic.inl similarity index 57% rename from generator/regions/specs/czech_republic.cpp rename to generator/regions/specs/czech_republic.inl index 06d7618ab1..55bbe13a52 100644 --- a/generator/regions/specs/czech_republic.cpp +++ b/generator/regions/specs/czech_republic.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class CzechRepublicSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"CzechRepublic"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(CzechRepublicSpecifier); PlaceLevel CzechRepublicSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/denmark.hpp b/generator/regions/specs/denmark.hpp deleted file mode 100644 index 5a0580e548..0000000000 --- a/generator/regions/specs/denmark.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Denmark"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/denmark.cpp b/generator/regions/specs/denmark.inl similarity index 56% rename from generator/regions/specs/denmark.cpp rename to generator/regions/specs/denmark.inl index 9db6a41bca..d5bb5431df 100644 --- a/generator/regions/specs/denmark.cpp +++ b/generator/regions/specs/denmark.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class DenmarkSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Denmark"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(DenmarkSpecifier); PlaceLevel DenmarkSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/dominican_republic.hpp b/generator/regions/specs/dominican_republic.hpp deleted file mode 100644 index f1bae96caa..0000000000 --- a/generator/regions/specs/dominican_republic.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"DominicanRepublic"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/dominican_republic.cpp b/generator/regions/specs/dominican_republic.inl similarity index 55% rename from generator/regions/specs/dominican_republic.cpp rename to generator/regions/specs/dominican_republic.inl index 0eb0317f6c..7620a7466d 100644 --- a/generator/regions/specs/dominican_republic.cpp +++ b/generator/regions/specs/dominican_republic.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class DominicanRepublicSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"DominicanRepublic"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(DominicanRepublicSpecifier); PlaceLevel DominicanRepublicSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/egypt.cpp b/generator/regions/specs/egypt.cpp deleted file mode 100644 index 6cf715787f..0000000000 --- a/generator/regions/specs/egypt.cpp +++ /dev/null @@ -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 diff --git a/generator/regions/specs/egypt.hpp b/generator/regions/specs/egypt.inl similarity index 55% rename from generator/regions/specs/egypt.hpp rename to generator/regions/specs/egypt.inl index 39b6c32d48..a7c2bc62e9 100644 --- a/generator/regions/specs/egypt.hpp +++ b/generator/regions/specs/egypt.inl @@ -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 +#include 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 diff --git a/generator/regions/specs/estonia.cpp b/generator/regions/specs/estonia.cpp deleted file mode 100644 index 0b676626c1..0000000000 --- a/generator/regions/specs/estonia.cpp +++ /dev/null @@ -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 diff --git a/generator/regions/specs/estonia.hpp b/generator/regions/specs/estonia.inl similarity index 57% rename from generator/regions/specs/estonia.hpp rename to generator/regions/specs/estonia.inl index ad952a8605..c9826d5252 100644 --- a/generator/regions/specs/estonia.hpp +++ b/generator/regions/specs/estonia.inl @@ -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 +#include 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 diff --git a/generator/regions/specs/ethiopia.hpp b/generator/regions/specs/ethiopia.hpp deleted file mode 100644 index 8d54ca9762..0000000000 --- a/generator/regions/specs/ethiopia.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Ethiopia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/ethiopia.cpp b/generator/regions/specs/ethiopia.inl similarity index 55% rename from generator/regions/specs/ethiopia.cpp rename to generator/regions/specs/ethiopia.inl index fc7bc4b85a..446bc57d9d 100644 --- a/generator/regions/specs/ethiopia.cpp +++ b/generator/regions/specs/ethiopia.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class EthiopiaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Ethiopia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(EthiopiaSpecifier); PlaceLevel EthiopiaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/finland.hpp b/generator/regions/specs/finland.hpp deleted file mode 100644 index 88699c5ab6..0000000000 --- a/generator/regions/specs/finland.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Finland"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/finland.cpp b/generator/regions/specs/finland.inl similarity index 54% rename from generator/regions/specs/finland.cpp rename to generator/regions/specs/finland.inl index 4c40565c6c..beb8f6757f 100644 --- a/generator/regions/specs/finland.cpp +++ b/generator/regions/specs/finland.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class FinlandSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Finland"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(FinlandSpecifier); PlaceLevel FinlandSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/france.hpp b/generator/regions/specs/france.hpp deleted file mode 100644 index 1f86d89850..0000000000 --- a/generator/regions/specs/france.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"France"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/france.cpp b/generator/regions/specs/france.inl similarity index 55% rename from generator/regions/specs/france.cpp rename to generator/regions/specs/france.inl index 92058cdc8f..6be5d2dc78 100644 --- a/generator/regions/specs/france.cpp +++ b/generator/regions/specs/france.inl @@ -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 +#include + namespace generator { namespace regions { namespace specs { + +class FranceSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"France"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(FranceSpecifier); PlaceLevel FranceSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/french_polynesia.cpp b/generator/regions/specs/french_polynesia.cpp deleted file mode 100644 index ec2f4445b3..0000000000 --- a/generator/regions/specs/french_polynesia.cpp +++ /dev/null @@ -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 diff --git a/generator/regions/specs/french_polynesia.hpp b/generator/regions/specs/french_polynesia.inl similarity index 54% rename from generator/regions/specs/french_polynesia.hpp rename to generator/regions/specs/french_polynesia.inl index cb88d938d2..efdb7c1643 100644 --- a/generator/regions/specs/french_polynesia.hpp +++ b/generator/regions/specs/french_polynesia.inl @@ -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 +#include 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 diff --git a/generator/regions/specs/gabon.hpp b/generator/regions/specs/gabon.hpp deleted file mode 100644 index 112c7f1790..0000000000 --- a/generator/regions/specs/gabon.hpp +++ /dev/null @@ -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 GetCountryNames() { return {"Gabon"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/gabon.cpp b/generator/regions/specs/gabon.inl similarity index 55% rename from generator/regions/specs/gabon.cpp rename to generator/regions/specs/gabon.inl index 74d9a25323..117394bad0 100644 --- a/generator/regions/specs/gabon.cpp +++ b/generator/regions/specs/gabon.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/gabon.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 +#include + namespace generator { namespace regions { namespace specs { + +class GabonSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Gabon"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(GabonSpecifier); PlaceLevel GabonSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/gambia.hpp b/generator/regions/specs/gambia.hpp deleted file mode 100644 index 098298e268..0000000000 --- a/generator/regions/specs/gambia.hpp +++ /dev/null @@ -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 GambiaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Gambia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/gambia.cpp b/generator/regions/specs/gambia.inl similarity index 55% rename from generator/regions/specs/gambia.cpp rename to generator/regions/specs/gambia.inl index 144a6d2cd5..0c588c7b90 100644 --- a/generator/regions/specs/gambia.cpp +++ b/generator/regions/specs/gambia.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/gambia.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 +#include + namespace generator { namespace regions { namespace specs { + +class GambiaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Gambia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(GambiaSpecifier); PlaceLevel GambiaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/georgia.hpp b/generator/regions/specs/georgia.hpp deleted file mode 100644 index ae121b1175..0000000000 --- a/generator/regions/specs/georgia.hpp +++ /dev/null @@ -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 GeorgiaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Georgia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/georgia.cpp b/generator/regions/specs/georgia.inl similarity index 58% rename from generator/regions/specs/georgia.cpp rename to generator/regions/specs/georgia.inl index bc940c078e..2e329abaa1 100644 --- a/generator/regions/specs/georgia.cpp +++ b/generator/regions/specs/georgia.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/georgia.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 +#include + namespace generator { namespace regions { namespace specs { + +class GeorgiaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Georgia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(GeorgiaSpecifier); PlaceLevel GeorgiaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/germany.hpp b/generator/regions/specs/germany.hpp deleted file mode 100644 index b70047fe50..0000000000 --- a/generator/regions/specs/germany.hpp +++ /dev/null @@ -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 GermanySpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Germany"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/germany.cpp b/generator/regions/specs/germany.inl similarity index 59% rename from generator/regions/specs/germany.cpp rename to generator/regions/specs/germany.inl index b77a036c57..1ef47a9a03 100644 --- a/generator/regions/specs/germany.cpp +++ b/generator/regions/specs/germany.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/germany.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 +#include + namespace generator { namespace regions { namespace specs { + +class GermanySpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Germany"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(GermanySpecifier); PlaceLevel GermanySpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/ghana.hpp b/generator/regions/specs/ghana.hpp deleted file mode 100644 index c3735c11b8..0000000000 --- a/generator/regions/specs/ghana.hpp +++ /dev/null @@ -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 GhanaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Ghana"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/ghana.cpp b/generator/regions/specs/ghana.inl similarity index 54% rename from generator/regions/specs/ghana.cpp rename to generator/regions/specs/ghana.inl index 5c16514c54..064f7c3b5e 100644 --- a/generator/regions/specs/ghana.cpp +++ b/generator/regions/specs/ghana.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/ghana.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 +#include + namespace generator { namespace regions { namespace specs { + +class GhanaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Ghana"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(GhanaSpecifier); PlaceLevel GhanaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/greece.hpp b/generator/regions/specs/greece.hpp deleted file mode 100644 index 121790b276..0000000000 --- a/generator/regions/specs/greece.hpp +++ /dev/null @@ -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 GreeceSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Greece"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/greece.cpp b/generator/regions/specs/greece.inl similarity index 58% rename from generator/regions/specs/greece.cpp rename to generator/regions/specs/greece.inl index b4b069301b..f305985d0b 100644 --- a/generator/regions/specs/greece.cpp +++ b/generator/regions/specs/greece.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/greece.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 +#include + namespace generator { namespace regions { namespace specs { + +class GreeceSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Greece"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(GreeceSpecifier); PlaceLevel GreeceSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/guinea.hpp b/generator/regions/specs/guinea.hpp deleted file mode 100644 index 53be0e5c42..0000000000 --- a/generator/regions/specs/guinea.hpp +++ /dev/null @@ -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 GuineaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Guinea"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/guinea.cpp b/generator/regions/specs/guinea.inl similarity index 57% rename from generator/regions/specs/guinea.cpp rename to generator/regions/specs/guinea.inl index be30f92680..6b55b0f335 100644 --- a/generator/regions/specs/guinea.cpp +++ b/generator/regions/specs/guinea.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/guinea.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 +#include + namespace generator { namespace regions { namespace specs { + +class GuineaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Guinea"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(GuineaSpecifier); PlaceLevel GuineaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/haiti.hpp b/generator/regions/specs/haiti.hpp deleted file mode 100644 index e9a1975a1f..0000000000 --- a/generator/regions/specs/haiti.hpp +++ /dev/null @@ -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 HaitiSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Haiti"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/haiti.cpp b/generator/regions/specs/haiti.inl similarity index 59% rename from generator/regions/specs/haiti.cpp rename to generator/regions/specs/haiti.inl index 10f6976cad..40b000c884 100644 --- a/generator/regions/specs/haiti.cpp +++ b/generator/regions/specs/haiti.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/haiti.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 +#include + namespace generator { namespace regions { namespace specs { + +class HaitiSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Haiti"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(HaitiSpecifier); PlaceLevel HaitiSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/hong_kong.cpp b/generator/regions/specs/hong_kong.cpp deleted file mode 100644 index 5c70a0fdb6..0000000000 --- a/generator/regions/specs/hong_kong.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "generator/regions/specs/hong_kong.hpp" - -#include "generator/regions/country_specifier_builder.hpp" - -namespace generator -{ -namespace regions -{ -namespace specs -{ -REGISTER_COUNTRY_SPECIFIER(HongKongSpecifier); - -PlaceLevel HongKongSpecifier::GetSpecificCountryLevel(Region const & region) const -{ - AdminLevel adminLevel = region.GetAdminLevel(); - switch (adminLevel) - { - case AdminLevel::Six: return PlaceLevel::Region; // Districts - default: break; - } - - return PlaceLevel::Unknown; -} -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/hong_kong.hpp b/generator/regions/specs/hong_kong.inl similarity index 57% rename from generator/regions/specs/hong_kong.hpp rename to generator/regions/specs/hong_kong.inl index 367465e38c..da4549a1e4 100644 --- a/generator/regions/specs/hong_kong.hpp +++ b/generator/regions/specs/hong_kong.inl @@ -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 +#include namespace generator { @@ -9,6 +14,7 @@ namespace regions { namespace specs { + class HongKongSpecifier final : public CountrySpecifier { public: @@ -18,6 +24,20 @@ private: // CountrySpecifier overrides: PlaceLevel GetSpecificCountryLevel(Region const & region) const override; }; + +REGISTER_COUNTRY_SPECIFIER(HongKongSpecifier); + +PlaceLevel HongKongSpecifier::GetSpecificCountryLevel(Region const & region) const +{ + AdminLevel adminLevel = region.GetAdminLevel(); + switch (adminLevel) + { + case AdminLevel::Six: return PlaceLevel::Region; // Districts + default: break; + } + + return PlaceLevel::Unknown; +} } // namespace specs } // namespace regions } // namespace generator diff --git a/generator/regions/specs/hungary.hpp b/generator/regions/specs/hungary.hpp deleted file mode 100644 index 27fcce3e0c..0000000000 --- a/generator/regions/specs/hungary.hpp +++ /dev/null @@ -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 HungarySpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Hungary"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/hungary.cpp b/generator/regions/specs/hungary.inl similarity index 64% rename from generator/regions/specs/hungary.cpp rename to generator/regions/specs/hungary.inl index 96f373f07e..5c092d6218 100644 --- a/generator/regions/specs/hungary.cpp +++ b/generator/regions/specs/hungary.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/hungary.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 +#include + namespace generator { namespace regions { namespace specs { + +class HungarySpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Hungary"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(HungarySpecifier); PlaceLevel HungarySpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/iceland.cpp b/generator/regions/specs/iceland.cpp deleted file mode 100644 index 2b58a5729b..0000000000 --- a/generator/regions/specs/iceland.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "generator/regions/specs/iceland.hpp" - -#include "generator/regions/country_specifier_builder.hpp" - -namespace generator -{ -namespace regions -{ -namespace specs -{ -REGISTER_COUNTRY_SPECIFIER(IcelandSpecifier); - -PlaceLevel IcelandSpecifier::GetSpecificCountryLevel(Region const & region) const -{ - AdminLevel adminLevel = region.GetAdminLevel(); - switch (adminLevel) - { - case AdminLevel::Five: return PlaceLevel::Region; // Departamentos (State Border) - default: break; - } - - return PlaceLevel::Unknown; -} -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/iceland.hpp b/generator/regions/specs/iceland.inl similarity index 56% rename from generator/regions/specs/iceland.hpp rename to generator/regions/specs/iceland.inl index 2d9d2af8ef..c8e5c590d8 100644 --- a/generator/regions/specs/iceland.hpp +++ b/generator/regions/specs/iceland.inl @@ -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 +#include namespace generator { @@ -9,6 +14,7 @@ namespace regions { namespace specs { + class IcelandSpecifier final : public CountrySpecifier { public: @@ -18,6 +24,20 @@ private: // CountrySpecifier overrides: PlaceLevel GetSpecificCountryLevel(Region const & region) const override; }; + +REGISTER_COUNTRY_SPECIFIER(IcelandSpecifier); + +PlaceLevel IcelandSpecifier::GetSpecificCountryLevel(Region const & region) const +{ + AdminLevel adminLevel = region.GetAdminLevel(); + switch (adminLevel) + { + case AdminLevel::Five: return PlaceLevel::Region; // Departamentos (State Border) + default: break; + } + + return PlaceLevel::Unknown; +} } // namespace specs } // namespace regions } // namespace generator diff --git a/generator/regions/specs/india.hpp b/generator/regions/specs/india.hpp deleted file mode 100644 index c9d7817935..0000000000 --- a/generator/regions/specs/india.hpp +++ /dev/null @@ -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 IndiaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"India"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/india.cpp b/generator/regions/specs/india.inl similarity index 54% rename from generator/regions/specs/india.cpp rename to generator/regions/specs/india.inl index c823b56d27..7a923b1eab 100644 --- a/generator/regions/specs/india.cpp +++ b/generator/regions/specs/india.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/india.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 +#include + namespace generator { namespace regions { namespace specs { + +class IndiaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"India"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(IndiaSpecifier); PlaceLevel IndiaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/indonesia.cpp b/generator/regions/specs/indonesia.cpp deleted file mode 100644 index 89a5cea94f..0000000000 --- a/generator/regions/specs/indonesia.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "generator/regions/specs/indonesia.hpp" - -#include "generator/regions/country_specifier_builder.hpp" - -namespace generator -{ -namespace regions -{ -namespace specs -{ -REGISTER_COUNTRY_SPECIFIER(IndonesiaSpecifier); - -PlaceLevel IndonesiaSpecifier::GetSpecificCountryLevel(Region const & region) const -{ - AdminLevel adminLevel = region.GetAdminLevel(); - switch (adminLevel) - { - case AdminLevel::Four: return PlaceLevel::Region; // Province - default: break; - } - - return PlaceLevel::Unknown; -} -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/indonesia.hpp b/generator/regions/specs/indonesia.inl similarity index 57% rename from generator/regions/specs/indonesia.hpp rename to generator/regions/specs/indonesia.inl index b8ed8685ba..dd3dc20b06 100644 --- a/generator/regions/specs/indonesia.hpp +++ b/generator/regions/specs/indonesia.inl @@ -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 +#include namespace generator { @@ -9,6 +14,7 @@ namespace regions { namespace specs { + class IndonesiaSpecifier final : public CountrySpecifier { public: @@ -18,6 +24,20 @@ private: // CountrySpecifier overrides: PlaceLevel GetSpecificCountryLevel(Region const & region) const override; }; + +REGISTER_COUNTRY_SPECIFIER(IndonesiaSpecifier); + +PlaceLevel IndonesiaSpecifier::GetSpecificCountryLevel(Region const & region) const +{ + AdminLevel adminLevel = region.GetAdminLevel(); + switch (adminLevel) + { + case AdminLevel::Four: return PlaceLevel::Region; // Province + default: break; + } + + return PlaceLevel::Unknown; +} } // namespace specs } // namespace regions } // namespace generator diff --git a/generator/regions/specs/iran.hpp b/generator/regions/specs/iran.hpp deleted file mode 100644 index def0f62b22..0000000000 --- a/generator/regions/specs/iran.hpp +++ /dev/null @@ -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 IranSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Iran"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/iran.cpp b/generator/regions/specs/iran.inl similarity index 54% rename from generator/regions/specs/iran.cpp rename to generator/regions/specs/iran.inl index 904362544a..547301d365 100644 --- a/generator/regions/specs/iran.cpp +++ b/generator/regions/specs/iran.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/iran.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 +#include + namespace generator { namespace regions { namespace specs { + +class IranSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Iran"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(IranSpecifier); PlaceLevel IranSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/iraq.hpp b/generator/regions/specs/iraq.hpp deleted file mode 100644 index f997ad4a46..0000000000 --- a/generator/regions/specs/iraq.hpp +++ /dev/null @@ -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 IraqSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Iraq"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/iraq.cpp b/generator/regions/specs/iraq.inl similarity index 55% rename from generator/regions/specs/iraq.cpp rename to generator/regions/specs/iraq.inl index 2c37a18484..aec19a02ed 100644 --- a/generator/regions/specs/iraq.cpp +++ b/generator/regions/specs/iraq.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/iraq.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 +#include + namespace generator { namespace regions { namespace specs { + +class IraqSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Iraq"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(IraqSpecifier); PlaceLevel IraqSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/ireland.hpp b/generator/regions/specs/ireland.hpp deleted file mode 100644 index 0610849340..0000000000 --- a/generator/regions/specs/ireland.hpp +++ /dev/null @@ -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 IrelandSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Ireland"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/ireland.cpp b/generator/regions/specs/ireland.inl similarity index 54% rename from generator/regions/specs/ireland.cpp rename to generator/regions/specs/ireland.inl index 70a2b76cc1..9802bcca02 100644 --- a/generator/regions/specs/ireland.cpp +++ b/generator/regions/specs/ireland.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/ireland.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 +#include + namespace generator { namespace regions { namespace specs { + +class IrelandSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Ireland"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(IrelandSpecifier); PlaceLevel IrelandSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/isle_of_man.hpp b/generator/regions/specs/isle_of_man.hpp deleted file mode 100644 index a49560a9aa..0000000000 --- a/generator/regions/specs/isle_of_man.hpp +++ /dev/null @@ -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 IsleOfManSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"IsleOfMan"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/isle_of_man.cpp b/generator/regions/specs/isle_of_man.inl similarity index 55% rename from generator/regions/specs/isle_of_man.cpp rename to generator/regions/specs/isle_of_man.inl index ec37280829..1cf5a8bef9 100644 --- a/generator/regions/specs/isle_of_man.cpp +++ b/generator/regions/specs/isle_of_man.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/isle_of_man.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 +#include + namespace generator { namespace regions { namespace specs { + +class IsleOfManSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"IsleOfMan"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(IsleOfManSpecifier); PlaceLevel IsleOfManSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/israel.hpp b/generator/regions/specs/israel.hpp deleted file mode 100644 index 4c2f526df2..0000000000 --- a/generator/regions/specs/israel.hpp +++ /dev/null @@ -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 IsraelSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Israel"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/israel.cpp b/generator/regions/specs/israel.inl similarity index 55% rename from generator/regions/specs/israel.cpp rename to generator/regions/specs/israel.inl index 6001f11152..c9c031b56d 100644 --- a/generator/regions/specs/israel.cpp +++ b/generator/regions/specs/israel.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/israel.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 +#include + namespace generator { namespace regions { namespace specs { + +class IsraelSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Israel"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(IsraelSpecifier); PlaceLevel IsraelSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/italy.hpp b/generator/regions/specs/italy.hpp deleted file mode 100644 index 86d5d3858a..0000000000 --- a/generator/regions/specs/italy.hpp +++ /dev/null @@ -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 ItalySpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Italy"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/italy.cpp b/generator/regions/specs/italy.inl similarity index 58% rename from generator/regions/specs/italy.cpp rename to generator/regions/specs/italy.inl index 02cf0e8716..7eeedd1321 100644 --- a/generator/regions/specs/italy.cpp +++ b/generator/regions/specs/italy.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/italy.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 +#include + namespace generator { namespace regions { namespace specs { + +class ItalySpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Italy"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(ItalySpecifier); PlaceLevel ItalySpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/japan.hpp b/generator/regions/specs/japan.hpp deleted file mode 100644 index bb56d8d36a..0000000000 --- a/generator/regions/specs/japan.hpp +++ /dev/null @@ -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 JapanSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Japan"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/japan.cpp b/generator/regions/specs/japan.inl similarity index 62% rename from generator/regions/specs/japan.cpp rename to generator/regions/specs/japan.inl index 44023b5f61..980c2a8993 100644 --- a/generator/regions/specs/japan.cpp +++ b/generator/regions/specs/japan.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/japan.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 +#include + namespace generator { namespace regions { namespace specs { + +class JapanSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Japan"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(JapanSpecifier); PlaceLevel JapanSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/jordan.cpp b/generator/regions/specs/jordan.cpp deleted file mode 100644 index 4cc64b556a..0000000000 --- a/generator/regions/specs/jordan.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "generator/regions/specs/jordan.hpp" - -#include "generator/regions/country_specifier_builder.hpp" - -namespace generator -{ -namespace regions -{ -namespace specs -{ -REGISTER_COUNTRY_SPECIFIER(JordanSpecifier); - -PlaceLevel JordanSpecifier::GetSpecificCountryLevel(Region const & region) const -{ - AdminLevel adminLevel = region.GetAdminLevel(); - switch (adminLevel) - { - case AdminLevel::Four: return PlaceLevel::Region; // governorate - default: break; - } - - return PlaceLevel::Unknown; -} -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/jordan.hpp b/generator/regions/specs/jordan.inl similarity index 57% rename from generator/regions/specs/jordan.hpp rename to generator/regions/specs/jordan.inl index 87aee64c59..882f86be0f 100644 --- a/generator/regions/specs/jordan.hpp +++ b/generator/regions/specs/jordan.inl @@ -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 +#include namespace generator { @@ -9,6 +14,7 @@ namespace regions { namespace specs { + class JordanSpecifier final : public CountrySpecifier { public: @@ -18,6 +24,20 @@ private: // CountrySpecifier overrides: PlaceLevel GetSpecificCountryLevel(Region const & region) const override; }; + +REGISTER_COUNTRY_SPECIFIER(JordanSpecifier); + +PlaceLevel JordanSpecifier::GetSpecificCountryLevel(Region const & region) const +{ + AdminLevel adminLevel = region.GetAdminLevel(); + switch (adminLevel) + { + case AdminLevel::Four: return PlaceLevel::Region; // governorate + default: break; + } + + return PlaceLevel::Unknown; +} } // namespace specs } // namespace regions } // namespace generator diff --git a/generator/regions/specs/kosovo.cpp b/generator/regions/specs/kosovo.cpp deleted file mode 100644 index eb42c8bb5e..0000000000 --- a/generator/regions/specs/kosovo.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "generator/regions/specs/kosovo.hpp" - -#include "generator/regions/country_specifier_builder.hpp" - -namespace generator -{ -namespace regions -{ -namespace specs -{ -REGISTER_COUNTRY_SPECIFIER(KosovoSpecifier); - -PlaceLevel KosovoSpecifier::GetSpecificCountryLevel(Region const & region) const -{ - AdminLevel adminLevel = region.GetAdminLevel(); - switch (adminLevel) - { - case AdminLevel::Four: return PlaceLevel::Region; // Komunat e Kosovës - default: break; - } - - return PlaceLevel::Unknown; -} -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/kosovo.hpp b/generator/regions/specs/kosovo.inl similarity index 57% rename from generator/regions/specs/kosovo.hpp rename to generator/regions/specs/kosovo.inl index d60e014be1..6ffd2b7cfc 100644 --- a/generator/regions/specs/kosovo.hpp +++ b/generator/regions/specs/kosovo.inl @@ -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 +#include namespace generator { @@ -9,6 +14,7 @@ namespace regions { namespace specs { + class KosovoSpecifier final : public CountrySpecifier { public: @@ -18,6 +24,20 @@ private: // CountrySpecifier overrides: PlaceLevel GetSpecificCountryLevel(Region const & region) const override; }; + +REGISTER_COUNTRY_SPECIFIER(KosovoSpecifier); + +PlaceLevel KosovoSpecifier::GetSpecificCountryLevel(Region const & region) const +{ + AdminLevel adminLevel = region.GetAdminLevel(); + switch (adminLevel) + { + case AdminLevel::Four: return PlaceLevel::Region; // Komunat e Kosovës + default: break; + } + + return PlaceLevel::Unknown; +} } // namespace specs } // namespace regions } // namespace generator diff --git a/generator/regions/specs/laos.hpp b/generator/regions/specs/laos.hpp deleted file mode 100644 index 4831976b92..0000000000 --- a/generator/regions/specs/laos.hpp +++ /dev/null @@ -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 LaosSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Laos"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/laos.cpp b/generator/regions/specs/laos.inl similarity index 62% rename from generator/regions/specs/laos.cpp rename to generator/regions/specs/laos.inl index 6d33094e6f..924d892bb6 100644 --- a/generator/regions/specs/laos.cpp +++ b/generator/regions/specs/laos.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/laos.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 +#include + namespace generator { namespace regions { namespace specs { + +class LaosSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Laos"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(LaosSpecifier); PlaceLevel LaosSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/latvia.hpp b/generator/regions/specs/latvia.hpp deleted file mode 100644 index fd66bcb7a5..0000000000 --- a/generator/regions/specs/latvia.hpp +++ /dev/null @@ -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 LatviaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Latvia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/latvia.cpp b/generator/regions/specs/latvia.inl similarity index 57% rename from generator/regions/specs/latvia.cpp rename to generator/regions/specs/latvia.inl index 5487dd2c1a..1b9f7b9e08 100644 --- a/generator/regions/specs/latvia.cpp +++ b/generator/regions/specs/latvia.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/latvia.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 +#include + namespace generator { namespace regions { namespace specs { + +class LatviaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Latvia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(LatviaSpecifier); PlaceLevel LatviaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/lebanon.hpp b/generator/regions/specs/lebanon.hpp deleted file mode 100644 index d8ed5455d0..0000000000 --- a/generator/regions/specs/lebanon.hpp +++ /dev/null @@ -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 LebanonSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Lebanon"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/lebanon.cpp b/generator/regions/specs/lebanon.inl similarity index 57% rename from generator/regions/specs/lebanon.cpp rename to generator/regions/specs/lebanon.inl index b5ce93f5b0..b371b93aaa 100644 --- a/generator/regions/specs/lebanon.cpp +++ b/generator/regions/specs/lebanon.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/lebanon.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 +#include + namespace generator { namespace regions { namespace specs { + +class LebanonSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Lebanon"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(LebanonSpecifier); PlaceLevel LebanonSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/lesotho.hpp b/generator/regions/specs/lesotho.hpp deleted file mode 100644 index c01fa05d30..0000000000 --- a/generator/regions/specs/lesotho.hpp +++ /dev/null @@ -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 LesothoSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Lesotho"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/lesotho.cpp b/generator/regions/specs/lesotho.inl similarity index 55% rename from generator/regions/specs/lesotho.cpp rename to generator/regions/specs/lesotho.inl index 07ba7f6742..1253e66cfd 100644 --- a/generator/regions/specs/lesotho.cpp +++ b/generator/regions/specs/lesotho.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/lesotho.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 +#include + namespace generator { namespace regions { namespace specs { + +class LesothoSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Lesotho"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(LesothoSpecifier); PlaceLevel LesothoSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/liberia.hpp b/generator/regions/specs/liberia.hpp deleted file mode 100644 index cb726593c5..0000000000 --- a/generator/regions/specs/liberia.hpp +++ /dev/null @@ -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 LiberiaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Liberia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/liberia.cpp b/generator/regions/specs/liberia.inl similarity index 55% rename from generator/regions/specs/liberia.cpp rename to generator/regions/specs/liberia.inl index 5e17b3c40c..6f4fa5c29b 100644 --- a/generator/regions/specs/liberia.cpp +++ b/generator/regions/specs/liberia.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/liberia.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 +#include + namespace generator { namespace regions { namespace specs { + +class LiberiaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Liberia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(LiberiaSpecifier); PlaceLevel LiberiaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/libya.cpp b/generator/regions/specs/libya.cpp deleted file mode 100644 index be61d408f4..0000000000 --- a/generator/regions/specs/libya.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "generator/regions/specs/libya.hpp" - -#include "generator/regions/country_specifier_builder.hpp" - -namespace generator -{ -namespace regions -{ -namespace specs -{ -REGISTER_COUNTRY_SPECIFIER(LibyaSpecifier); - -PlaceLevel LibyaSpecifier::GetSpecificCountryLevel(Region const & region) const -{ - AdminLevel adminLevel = region.GetAdminLevel(); - switch (adminLevel) - { - case AdminLevel::Four: return PlaceLevel::Region; // district (Shabiya) - default: break; - } - - return PlaceLevel::Unknown; -} -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/libya.hpp b/generator/regions/specs/libya.inl similarity index 57% rename from generator/regions/specs/libya.hpp rename to generator/regions/specs/libya.inl index 04f6c836c8..48e61f528c 100644 --- a/generator/regions/specs/libya.hpp +++ b/generator/regions/specs/libya.inl @@ -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 +#include namespace generator { @@ -9,6 +14,7 @@ namespace regions { namespace specs { + class LibyaSpecifier final : public CountrySpecifier { public: @@ -18,6 +24,20 @@ private: // CountrySpecifier overrides: PlaceLevel GetSpecificCountryLevel(Region const & region) const override; }; + +REGISTER_COUNTRY_SPECIFIER(LibyaSpecifier); + +PlaceLevel LibyaSpecifier::GetSpecificCountryLevel(Region const & region) const +{ + AdminLevel adminLevel = region.GetAdminLevel(); + switch (adminLevel) + { + case AdminLevel::Four: return PlaceLevel::Region; // district (Shabiya) + default: break; + } + + return PlaceLevel::Unknown; +} } // namespace specs } // namespace regions } // namespace generator diff --git a/generator/regions/specs/lithuania.hpp b/generator/regions/specs/lithuania.hpp deleted file mode 100644 index 4963c54cf5..0000000000 --- a/generator/regions/specs/lithuania.hpp +++ /dev/null @@ -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 LithuaniaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Lithuania"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/lithuania.cpp b/generator/regions/specs/lithuania.inl similarity index 56% rename from generator/regions/specs/lithuania.cpp rename to generator/regions/specs/lithuania.inl index c61c55ffc8..a315bb9ffc 100644 --- a/generator/regions/specs/lithuania.cpp +++ b/generator/regions/specs/lithuania.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/lithuania.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 +#include + namespace generator { namespace regions { namespace specs { + +class LithuaniaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Lithuania"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(LithuaniaSpecifier); PlaceLevel LithuaniaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/luxembourg.hpp b/generator/regions/specs/luxembourg.hpp deleted file mode 100644 index 6abc5f8ae3..0000000000 --- a/generator/regions/specs/luxembourg.hpp +++ /dev/null @@ -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 LuxembourgSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Luxembourg"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/luxembourg.cpp b/generator/regions/specs/luxembourg.inl similarity index 55% rename from generator/regions/specs/luxembourg.cpp rename to generator/regions/specs/luxembourg.inl index 9c2b0da452..05bf62c727 100644 --- a/generator/regions/specs/luxembourg.cpp +++ b/generator/regions/specs/luxembourg.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/luxembourg.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 +#include + namespace generator { namespace regions { namespace specs { + +class LuxembourgSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Luxembourg"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(LuxembourgSpecifier); PlaceLevel LuxembourgSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/macedonia.hpp b/generator/regions/specs/macedonia.hpp deleted file mode 100644 index 13840c8e30..0000000000 --- a/generator/regions/specs/macedonia.hpp +++ /dev/null @@ -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 MacedoniaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Macedonia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/macedonia.cpp b/generator/regions/specs/macedonia.inl similarity index 61% rename from generator/regions/specs/macedonia.cpp rename to generator/regions/specs/macedonia.inl index 1cdceb1915..53bf8d9f37 100644 --- a/generator/regions/specs/macedonia.cpp +++ b/generator/regions/specs/macedonia.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/macedonia.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 +#include + namespace generator { namespace regions { namespace specs { + +class MacedoniaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Macedonia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(MacedoniaSpecifier); PlaceLevel MacedoniaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/madagascar.hpp b/generator/regions/specs/madagascar.hpp deleted file mode 100644 index ef4379d2e8..0000000000 --- a/generator/regions/specs/madagascar.hpp +++ /dev/null @@ -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 MadagascarSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Madagascar"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/madagascar.cpp b/generator/regions/specs/madagascar.inl similarity index 56% rename from generator/regions/specs/madagascar.cpp rename to generator/regions/specs/madagascar.inl index 7c5e3baf76..11a134f642 100644 --- a/generator/regions/specs/madagascar.cpp +++ b/generator/regions/specs/madagascar.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/madagascar.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 +#include + namespace generator { namespace regions { namespace specs { + +class MadagascarSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Madagascar"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(MadagascarSpecifier); PlaceLevel MadagascarSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/malawi.hpp b/generator/regions/specs/malawi.hpp deleted file mode 100644 index 9d2b9c933c..0000000000 --- a/generator/regions/specs/malawi.hpp +++ /dev/null @@ -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 MalawiSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Malawi"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/malawi.cpp b/generator/regions/specs/malawi.inl similarity index 54% rename from generator/regions/specs/malawi.cpp rename to generator/regions/specs/malawi.inl index e803d15ae1..5eb3a12008 100644 --- a/generator/regions/specs/malawi.cpp +++ b/generator/regions/specs/malawi.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/malawi.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 +#include + namespace generator { namespace regions { namespace specs { + +class MalawiSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Malawi"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(MalawiSpecifier); PlaceLevel MalawiSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/malaysia.hpp b/generator/regions/specs/malaysia.hpp deleted file mode 100644 index 24173b3867..0000000000 --- a/generator/regions/specs/malaysia.hpp +++ /dev/null @@ -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 MalaysiaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Malaysia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/malaysia.cpp b/generator/regions/specs/malaysia.inl similarity index 55% rename from generator/regions/specs/malaysia.cpp rename to generator/regions/specs/malaysia.inl index 437ffff5a8..d265c1bc9b 100644 --- a/generator/regions/specs/malaysia.cpp +++ b/generator/regions/specs/malaysia.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/malaysia.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 +#include + namespace generator { namespace regions { namespace specs { + +class MalaysiaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Malaysia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(MalaysiaSpecifier); PlaceLevel MalaysiaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/mali.hpp b/generator/regions/specs/mali.hpp deleted file mode 100644 index 9dfb45216d..0000000000 --- a/generator/regions/specs/mali.hpp +++ /dev/null @@ -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 MaliSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Mali"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/mali.cpp b/generator/regions/specs/mali.inl similarity index 54% rename from generator/regions/specs/mali.cpp rename to generator/regions/specs/mali.inl index 816b9fedcd..b10eef6450 100644 --- a/generator/regions/specs/mali.cpp +++ b/generator/regions/specs/mali.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/mali.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 +#include + namespace generator { namespace regions { namespace specs { + +class MaliSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Mali"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(MaliSpecifier); PlaceLevel MaliSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/mauritania.hpp b/generator/regions/specs/mauritania.hpp deleted file mode 100644 index 2bfb9f0d6c..0000000000 --- a/generator/regions/specs/mauritania.hpp +++ /dev/null @@ -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 MauritaniaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Mauritania"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/mauritania.cpp b/generator/regions/specs/mauritania.inl similarity index 55% rename from generator/regions/specs/mauritania.cpp rename to generator/regions/specs/mauritania.inl index cc7a61e442..0bd6b6ee28 100644 --- a/generator/regions/specs/mauritania.cpp +++ b/generator/regions/specs/mauritania.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/mauritania.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 +#include + namespace generator { namespace regions { namespace specs { + +class MauritaniaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Mauritania"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(MauritaniaSpecifier); PlaceLevel MauritaniaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/moldova.hpp b/generator/regions/specs/moldova.hpp deleted file mode 100644 index eff8fb13cd..0000000000 --- a/generator/regions/specs/moldova.hpp +++ /dev/null @@ -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 MoldovaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Moldova"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/moldova.cpp b/generator/regions/specs/moldova.inl similarity index 57% rename from generator/regions/specs/moldova.cpp rename to generator/regions/specs/moldova.inl index 36cc041b51..7a832142f9 100644 --- a/generator/regions/specs/moldova.cpp +++ b/generator/regions/specs/moldova.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/moldova.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 +#include + namespace generator { namespace regions { namespace specs { + +class MoldovaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Moldova"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(MoldovaSpecifier); PlaceLevel MoldovaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/morocco.hpp b/generator/regions/specs/morocco.hpp deleted file mode 100644 index d938b3c63f..0000000000 --- a/generator/regions/specs/morocco.hpp +++ /dev/null @@ -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 MoroccoSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Morocco"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/morocco.cpp b/generator/regions/specs/morocco.inl similarity index 55% rename from generator/regions/specs/morocco.cpp rename to generator/regions/specs/morocco.inl index e0449d637f..8ce4cc848a 100644 --- a/generator/regions/specs/morocco.cpp +++ b/generator/regions/specs/morocco.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/morocco.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 +#include + namespace generator { namespace regions { namespace specs { + +class MoroccoSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Morocco"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(MoroccoSpecifier); PlaceLevel MoroccoSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/mozambique.cpp b/generator/regions/specs/mozambique.cpp deleted file mode 100644 index 6d8b8f5381..0000000000 --- a/generator/regions/specs/mozambique.cpp +++ /dev/null @@ -1,26 +0,0 @@ -#include "generator/regions/specs/mozambique.hpp" - -#include "generator/regions/country_specifier_builder.hpp" - -namespace generator -{ -namespace regions -{ -namespace specs -{ -REGISTER_COUNTRY_SPECIFIER(MozambiqueSpecifier); - -PlaceLevel MozambiqueSpecifier::GetSpecificCountryLevel(Region const & region) const -{ - AdminLevel adminLevel = region.GetAdminLevel(); - switch (adminLevel) - { - case AdminLevel::Four: return PlaceLevel::Region; // States (Províncias) - default: break; - } - - return PlaceLevel::Unknown; -} -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/mozambique.hpp b/generator/regions/specs/mozambique.inl similarity index 56% rename from generator/regions/specs/mozambique.hpp rename to generator/regions/specs/mozambique.inl index 6c40bf3ea9..520d9183a8 100644 --- a/generator/regions/specs/mozambique.hpp +++ b/generator/regions/specs/mozambique.inl @@ -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 +#include namespace generator { @@ -9,6 +14,7 @@ namespace regions { namespace specs { + class MozambiqueSpecifier final : public CountrySpecifier { public: @@ -18,6 +24,20 @@ private: // CountrySpecifier overrides: PlaceLevel GetSpecificCountryLevel(Region const & region) const override; }; + +REGISTER_COUNTRY_SPECIFIER(MozambiqueSpecifier); + +PlaceLevel MozambiqueSpecifier::GetSpecificCountryLevel(Region const & region) const +{ + AdminLevel adminLevel = region.GetAdminLevel(); + switch (adminLevel) + { + case AdminLevel::Four: return PlaceLevel::Region; // States (Províncias) + default: break; + } + + return PlaceLevel::Unknown; +} } // namespace specs } // namespace regions } // namespace generator diff --git a/generator/regions/specs/myanmar.hpp b/generator/regions/specs/myanmar.hpp deleted file mode 100644 index 53b3a91371..0000000000 --- a/generator/regions/specs/myanmar.hpp +++ /dev/null @@ -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 MyanmarSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Myanmar"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/myanmar.cpp b/generator/regions/specs/myanmar.inl similarity index 62% rename from generator/regions/specs/myanmar.cpp rename to generator/regions/specs/myanmar.inl index 04bbaec9f0..8a896d9193 100644 --- a/generator/regions/specs/myanmar.cpp +++ b/generator/regions/specs/myanmar.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/myanmar.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 +#include + namespace generator { namespace regions { namespace specs { + +class MyanmarSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Myanmar"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(MyanmarSpecifier); PlaceLevel MyanmarSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/nepal.hpp b/generator/regions/specs/nepal.hpp deleted file mode 100644 index e6e980db07..0000000000 --- a/generator/regions/specs/nepal.hpp +++ /dev/null @@ -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 NepalSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Nepal"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/nepal.cpp b/generator/regions/specs/nepal.inl similarity index 54% rename from generator/regions/specs/nepal.cpp rename to generator/regions/specs/nepal.inl index dfb7b530c4..1d51531265 100644 --- a/generator/regions/specs/nepal.cpp +++ b/generator/regions/specs/nepal.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/nepal.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 +#include + namespace generator { namespace regions { namespace specs { + +class NepalSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Nepal"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(NepalSpecifier); PlaceLevel NepalSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/netherlands.hpp b/generator/regions/specs/netherlands.hpp deleted file mode 100644 index ecaeaf2206..0000000000 --- a/generator/regions/specs/netherlands.hpp +++ /dev/null @@ -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 NetherlandsSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Netherlands"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/netherlands.cpp b/generator/regions/specs/netherlands.inl similarity index 63% rename from generator/regions/specs/netherlands.cpp rename to generator/regions/specs/netherlands.inl index 3466b44abf..1403869d3d 100644 --- a/generator/regions/specs/netherlands.cpp +++ b/generator/regions/specs/netherlands.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/netherlands.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 +#include + namespace generator { namespace regions { namespace specs { + +class NetherlandsSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Netherlands"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(NetherlandsSpecifier); PlaceLevel NetherlandsSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/new_zealand.hpp b/generator/regions/specs/new_zealand.hpp deleted file mode 100644 index 3b773ecd6b..0000000000 --- a/generator/regions/specs/new_zealand.hpp +++ /dev/null @@ -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 NewZealandSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"New Zealand"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/new_zealand.cpp b/generator/regions/specs/new_zealand.inl similarity index 62% rename from generator/regions/specs/new_zealand.cpp rename to generator/regions/specs/new_zealand.inl index a1972193a4..8a2683a5d6 100644 --- a/generator/regions/specs/new_zealand.cpp +++ b/generator/regions/specs/new_zealand.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/new_zealand.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 +#include + namespace generator { namespace regions { namespace specs { + +class NewZealandSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"New Zealand"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(NewZealandSpecifier); PlaceLevel NewZealandSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/niger.hpp b/generator/regions/specs/niger.hpp deleted file mode 100644 index 9f2789f3d2..0000000000 --- a/generator/regions/specs/niger.hpp +++ /dev/null @@ -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 NigerSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Niger"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/niger.cpp b/generator/regions/specs/niger.inl similarity index 55% rename from generator/regions/specs/niger.cpp rename to generator/regions/specs/niger.inl index 98867de7d1..c0bfa28042 100644 --- a/generator/regions/specs/niger.cpp +++ b/generator/regions/specs/niger.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/niger.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 +#include + namespace generator { namespace regions { namespace specs { + +class NigerSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Niger"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(NigerSpecifier); PlaceLevel NigerSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/nigeria.hpp b/generator/regions/specs/nigeria.hpp deleted file mode 100644 index c01766052f..0000000000 --- a/generator/regions/specs/nigeria.hpp +++ /dev/null @@ -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 NigeriaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Nigeria"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/nigeria.cpp b/generator/regions/specs/nigeria.inl similarity index 57% rename from generator/regions/specs/nigeria.cpp rename to generator/regions/specs/nigeria.inl index e37765a341..8af8bbe932 100644 --- a/generator/regions/specs/nigeria.cpp +++ b/generator/regions/specs/nigeria.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/nigeria.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 +#include + namespace generator { namespace regions { namespace specs { + +class NigeriaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Nigeria"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(NigeriaSpecifier); PlaceLevel NigeriaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/north_korea.hpp b/generator/regions/specs/north_korea.hpp deleted file mode 100644 index c956228eba..0000000000 --- a/generator/regions/specs/north_korea.hpp +++ /dev/null @@ -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 NorthKoreaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"NorthKorea"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/north_korea.cpp b/generator/regions/specs/north_korea.inl similarity index 61% rename from generator/regions/specs/north_korea.cpp rename to generator/regions/specs/north_korea.inl index f461d5170a..96ac8ea5d4 100644 --- a/generator/regions/specs/north_korea.cpp +++ b/generator/regions/specs/north_korea.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/north_korea.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 +#include + namespace generator { namespace regions { namespace specs { + +class NorthKoreaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"NorthKorea"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(NorthKoreaSpecifier); PlaceLevel NorthKoreaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/norway.hpp b/generator/regions/specs/norway.hpp deleted file mode 100644 index adce268044..0000000000 --- a/generator/regions/specs/norway.hpp +++ /dev/null @@ -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 NorwaySpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Norway"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/norway.cpp b/generator/regions/specs/norway.inl similarity index 55% rename from generator/regions/specs/norway.cpp rename to generator/regions/specs/norway.inl index 22e258a31c..fea5ea0e70 100644 --- a/generator/regions/specs/norway.cpp +++ b/generator/regions/specs/norway.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/norway.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 +#include + namespace generator { namespace regions { namespace specs { + +class NorwaySpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Norway"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(NorwaySpecifier); PlaceLevel NorwaySpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/philippines.hpp b/generator/regions/specs/philippines.hpp deleted file mode 100644 index 1d1c407d86..0000000000 --- a/generator/regions/specs/philippines.hpp +++ /dev/null @@ -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 PhilippinesSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Philippines"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/philippines.cpp b/generator/regions/specs/philippines.inl similarity index 59% rename from generator/regions/specs/philippines.cpp rename to generator/regions/specs/philippines.inl index 52184fc46b..150c8ae2b8 100644 --- a/generator/regions/specs/philippines.cpp +++ b/generator/regions/specs/philippines.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/philippines.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 +#include + namespace generator { namespace regions { namespace specs { + +class PhilippinesSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Philippines"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(PhilippinesSpecifier); PlaceLevel PhilippinesSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/poland.hpp b/generator/regions/specs/poland.hpp deleted file mode 100644 index 6aaa8c650c..0000000000 --- a/generator/regions/specs/poland.hpp +++ /dev/null @@ -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 PolandSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Poland"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/poland.cpp b/generator/regions/specs/poland.inl similarity index 60% rename from generator/regions/specs/poland.cpp rename to generator/regions/specs/poland.inl index 4f5b5c20ae..79cd4e5e56 100644 --- a/generator/regions/specs/poland.cpp +++ b/generator/regions/specs/poland.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/poland.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 +#include + namespace generator { namespace regions { namespace specs { + +class PolandSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Poland"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(PolandSpecifier); PlaceLevel PolandSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/portugal.hpp b/generator/regions/specs/portugal.hpp deleted file mode 100644 index 64c8a31eca..0000000000 --- a/generator/regions/specs/portugal.hpp +++ /dev/null @@ -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 PortugalSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Portugal"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/portugal.cpp b/generator/regions/specs/portugal.inl similarity index 57% rename from generator/regions/specs/portugal.cpp rename to generator/regions/specs/portugal.inl index 310ec414ea..6464cb89aa 100644 --- a/generator/regions/specs/portugal.cpp +++ b/generator/regions/specs/portugal.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/portugal.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 +#include + namespace generator { namespace regions { namespace specs { + +class PortugalSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Portugal"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(PortugalSpecifier); PlaceLevel PortugalSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/romania.hpp b/generator/regions/specs/romania.hpp deleted file mode 100644 index 96b0cb4890..0000000000 --- a/generator/regions/specs/romania.hpp +++ /dev/null @@ -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 RomaniaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Romania"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/romania.cpp b/generator/regions/specs/romania.inl similarity index 58% rename from generator/regions/specs/romania.cpp rename to generator/regions/specs/romania.inl index e26e4b3732..303e262269 100644 --- a/generator/regions/specs/romania.cpp +++ b/generator/regions/specs/romania.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/romania.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 +#include + namespace generator { namespace regions { namespace specs { + +class RomaniaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Romania"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(RomaniaSpecifier); PlaceLevel RomaniaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/russia.hpp b/generator/regions/specs/russia.hpp deleted file mode 100644 index 8fa9b85d68..0000000000 --- a/generator/regions/specs/russia.hpp +++ /dev/null @@ -1,43 +0,0 @@ -#pragma once - -#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 RussiaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() - { - return {"Russia", u8"Россия", u8"Российская Федерация", u8"РФ"}; - } - - // CountrySpecifier overrides: - void AdjustRegionsLevel(Node::PtrList & outers) override; - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; - - void AdjustMoscowAdministrativeDivisions(Node::PtrList & outers); - void AdjustMoscowAdministrativeDivisions(Node::Ptr const & tree); - void MarkMoscowSubregionsByAdministrativeOkrugs(Node::Ptr & node); - - void AdjustMoscowCitySuburbs(Node::Ptr const & tree); - void MarkMoscowSuburbsByAdministrativeDistricts(Node::Ptr & tree); - void MarkMoscowAdministrativeDistrict(Node::Ptr & node); - void MarkAllSuburbsToSublocalities(Node::Ptr & tree); - - bool m_moscowRegionWasProcessed{false}; - bool m_moscowCityWasProcessed{false}; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/russia.cpp b/generator/regions/specs/russia.inl similarity index 78% rename from generator/regions/specs/russia.cpp rename to generator/regions/specs/russia.inl index 251cbf87aa..21302e1a2f 100644 --- a/generator/regions/specs/russia.cpp +++ b/generator/regions/specs/russia.inl @@ -1,10 +1,9 @@ -#include "generator/regions/specs/russia.hpp" - #include "generator/regions/country_specifier_builder.hpp" #include "base/stl_helpers.hpp" -#include "generator/regions/country_specifier_builder.hpp" +#include +#include namespace generator { @@ -12,6 +11,35 @@ namespace regions { namespace specs { + +class RussiaSpecifier final : public CountrySpecifier +{ + public: + static std::vector GetCountryNames() + { + return {"Russia", u8"Россия", u8"Российская Федерация", u8"РФ"}; + } + + // CountrySpecifier overrides: + void AdjustRegionsLevel(Node::PtrList & outers) override; + + private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; + + void AdjustMoscowAdministrativeDivisions(Node::PtrList & outers); + void AdjustMoscowAdministrativeDivisions(Node::Ptr const & tree); + void MarkMoscowSubregionsByAdministrativeOkrugs(Node::Ptr & node); + + void AdjustMoscowCitySuburbs(Node::Ptr const & tree); + void MarkMoscowSuburbsByAdministrativeDistricts(Node::Ptr & tree); + void MarkMoscowAdministrativeDistrict(Node::Ptr & node); + void MarkAllSuburbsToSublocalities(Node::Ptr & tree); + + bool m_moscowRegionWasProcessed{false}; + bool m_moscowCityWasProcessed{false}; +}; + void RussiaSpecifier::AdjustRegionsLevel(Node::PtrList & outers) { AdjustMoscowAdministrativeDivisions(outers); diff --git a/generator/regions/specs/senegal.hpp b/generator/regions/specs/senegal.hpp deleted file mode 100644 index 7a528dddc2..0000000000 --- a/generator/regions/specs/senegal.hpp +++ /dev/null @@ -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 SenegalSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Senegal"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/senegal.cpp b/generator/regions/specs/senegal.inl similarity index 58% rename from generator/regions/specs/senegal.cpp rename to generator/regions/specs/senegal.inl index 5c60f32d0e..557596d5a1 100644 --- a/generator/regions/specs/senegal.cpp +++ b/generator/regions/specs/senegal.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/senegal.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 +#include + namespace generator { namespace regions { namespace specs { + +class SenegalSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Senegal"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SenegalSpecifier); PlaceLevel SenegalSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/serbia.hpp b/generator/regions/specs/serbia.hpp deleted file mode 100644 index 74d1e6ab20..0000000000 --- a/generator/regions/specs/serbia.hpp +++ /dev/null @@ -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 SerbiaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Serbia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/serbia.cpp b/generator/regions/specs/serbia.inl similarity index 59% rename from generator/regions/specs/serbia.cpp rename to generator/regions/specs/serbia.inl index 1a67b005fb..8f7568369f 100644 --- a/generator/regions/specs/serbia.cpp +++ b/generator/regions/specs/serbia.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/serbia.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 +#include + namespace generator { namespace regions { namespace specs { + +class SerbiaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Serbia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SerbiaSpecifier); PlaceLevel SerbiaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/sierra_leone.hpp b/generator/regions/specs/sierra_leone.hpp deleted file mode 100644 index c8409340ed..0000000000 --- a/generator/regions/specs/sierra_leone.hpp +++ /dev/null @@ -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 SierraLeoneSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Sierra Leone"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/sierra_leone.cpp b/generator/regions/specs/sierra_leone.inl similarity index 63% rename from generator/regions/specs/sierra_leone.cpp rename to generator/regions/specs/sierra_leone.inl index 4202db9b83..403d1a6209 100644 --- a/generator/regions/specs/sierra_leone.cpp +++ b/generator/regions/specs/sierra_leone.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/sierra_leone.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 +#include + namespace generator { namespace regions { namespace specs { + +class SierraLeoneSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Sierra Leone"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SierraLeoneSpecifier); PlaceLevel SierraLeoneSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/slovakia.hpp b/generator/regions/specs/slovakia.hpp deleted file mode 100644 index e40c63da06..0000000000 --- a/generator/regions/specs/slovakia.hpp +++ /dev/null @@ -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 SlovakiaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Slovakia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/slovakia.cpp b/generator/regions/specs/slovakia.inl similarity index 57% rename from generator/regions/specs/slovakia.cpp rename to generator/regions/specs/slovakia.inl index 9c27f65be1..0a0adfa897 100644 --- a/generator/regions/specs/slovakia.cpp +++ b/generator/regions/specs/slovakia.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/slovakia.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 +#include + namespace generator { namespace regions { namespace specs { + +class SlovakiaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Slovakia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SlovakiaSpecifier); PlaceLevel SlovakiaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/slovenia.hpp b/generator/regions/specs/slovenia.hpp deleted file mode 100644 index ee80be39fb..0000000000 --- a/generator/regions/specs/slovenia.hpp +++ /dev/null @@ -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 SloveniaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Slovenia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/slovenia.cpp b/generator/regions/specs/slovenia.inl similarity index 56% rename from generator/regions/specs/slovenia.cpp rename to generator/regions/specs/slovenia.inl index 5e4b6e37ed..3b93f48b70 100644 --- a/generator/regions/specs/slovenia.cpp +++ b/generator/regions/specs/slovenia.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/slovenia.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 +#include + namespace generator { namespace regions { namespace specs { + +class SloveniaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Slovenia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SloveniaSpecifier); PlaceLevel SloveniaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/south_africa.hpp b/generator/regions/specs/south_africa.hpp deleted file mode 100644 index 9ed9cb2e07..0000000000 --- a/generator/regions/specs/south_africa.hpp +++ /dev/null @@ -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 SouthAfricaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"South Africa"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/south_africa.cpp b/generator/regions/specs/south_africa.inl similarity index 55% rename from generator/regions/specs/south_africa.cpp rename to generator/regions/specs/south_africa.inl index 6eace79c37..0dd445c8ec 100644 --- a/generator/regions/specs/south_africa.cpp +++ b/generator/regions/specs/south_africa.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/south_africa.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 +#include + namespace generator { namespace regions { namespace specs { + +class SouthAfricaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"South Africa"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SouthAfricaSpecifier); PlaceLevel SouthAfricaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/south_korea.hpp b/generator/regions/specs/south_korea.hpp deleted file mode 100644 index 5f4a71e7a8..0000000000 --- a/generator/regions/specs/south_korea.hpp +++ /dev/null @@ -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 SouthKoreaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"South Korea"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/south_korea.cpp b/generator/regions/specs/south_korea.inl similarity index 59% rename from generator/regions/specs/south_korea.cpp rename to generator/regions/specs/south_korea.inl index a3c1e460fd..ed92c5c6cd 100644 --- a/generator/regions/specs/south_korea.cpp +++ b/generator/regions/specs/south_korea.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/south_korea.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 +#include + namespace generator { namespace regions { namespace specs { + +class SouthKoreaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"South Korea"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SouthKoreaSpecifier); PlaceLevel SouthKoreaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/south_sudan.hpp b/generator/regions/specs/south_sudan.hpp deleted file mode 100644 index 55086dcc6a..0000000000 --- a/generator/regions/specs/south_sudan.hpp +++ /dev/null @@ -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 SouthSudanSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"South Sudan"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/south_sudan.cpp b/generator/regions/specs/south_sudan.inl similarity index 57% rename from generator/regions/specs/south_sudan.cpp rename to generator/regions/specs/south_sudan.inl index a4ee9ea550..5b602c9abd 100644 --- a/generator/regions/specs/south_sudan.cpp +++ b/generator/regions/specs/south_sudan.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/south_sudan.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 +#include + namespace generator { namespace regions { namespace specs { + +class SouthSudanSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"South Sudan"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SouthSudanSpecifier); PlaceLevel SouthSudanSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/suriname.hpp b/generator/regions/specs/suriname.hpp deleted file mode 100644 index b18b4c83b5..0000000000 --- a/generator/regions/specs/suriname.hpp +++ /dev/null @@ -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 SurinameSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Suriname"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/suriname.cpp b/generator/regions/specs/suriname.inl similarity index 59% rename from generator/regions/specs/suriname.cpp rename to generator/regions/specs/suriname.inl index bd8268c617..178a637bca 100644 --- a/generator/regions/specs/suriname.cpp +++ b/generator/regions/specs/suriname.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/suriname.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 +#include + namespace generator { namespace regions { namespace specs { + +class SurinameSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Suriname"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SurinameSpecifier); PlaceLevel SurinameSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/swaziland.hpp b/generator/regions/specs/swaziland.hpp deleted file mode 100644 index ccbae49ea6..0000000000 --- a/generator/regions/specs/swaziland.hpp +++ /dev/null @@ -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 SwazilandSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Swaziland"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/swaziland.cpp b/generator/regions/specs/swaziland.inl similarity index 56% rename from generator/regions/specs/swaziland.cpp rename to generator/regions/specs/swaziland.inl index 9b0e2932a8..519e763a5e 100644 --- a/generator/regions/specs/swaziland.cpp +++ b/generator/regions/specs/swaziland.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/swaziland.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 +#include + namespace generator { namespace regions { namespace specs { + +class SwazilandSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Swaziland"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SwazilandSpecifier); PlaceLevel SwazilandSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/sweden.hpp b/generator/regions/specs/sweden.hpp deleted file mode 100644 index fb654215bb..0000000000 --- a/generator/regions/specs/sweden.hpp +++ /dev/null @@ -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 SwedenSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Sweden"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/sweden.cpp b/generator/regions/specs/sweden.inl similarity index 64% rename from generator/regions/specs/sweden.cpp rename to generator/regions/specs/sweden.inl index 18e0884b41..013e35a56f 100644 --- a/generator/regions/specs/sweden.cpp +++ b/generator/regions/specs/sweden.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/sweden.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 +#include + namespace generator { namespace regions { namespace specs { + +class SwedenSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Sweden"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SwedenSpecifier); PlaceLevel SwedenSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/switzerland.hpp b/generator/regions/specs/switzerland.hpp deleted file mode 100644 index bfdfeabdbd..0000000000 --- a/generator/regions/specs/switzerland.hpp +++ /dev/null @@ -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 SwitzerlandSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Switzerland"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/switzerland.cpp b/generator/regions/specs/switzerland.inl similarity index 61% rename from generator/regions/specs/switzerland.cpp rename to generator/regions/specs/switzerland.inl index 61dc7d2d18..518abd8110 100644 --- a/generator/regions/specs/switzerland.cpp +++ b/generator/regions/specs/switzerland.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/switzerland.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 +#include + namespace generator { namespace regions { namespace specs { + +class SwitzerlandSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Switzerland"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SwitzerlandSpecifier); PlaceLevel SwitzerlandSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/syria.hpp b/generator/regions/specs/syria.hpp deleted file mode 100644 index 90e74a2880..0000000000 --- a/generator/regions/specs/syria.hpp +++ /dev/null @@ -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 SyriaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Syria"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/syria.cpp b/generator/regions/specs/syria.inl similarity index 59% rename from generator/regions/specs/syria.cpp rename to generator/regions/specs/syria.inl index 7d0f38ca4d..b1d8316efe 100644 --- a/generator/regions/specs/syria.cpp +++ b/generator/regions/specs/syria.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/syria.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 +#include + namespace generator { namespace regions { namespace specs { + +class SyriaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Syria"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(SyriaSpecifier); PlaceLevel SyriaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/taiwan.hpp b/generator/regions/specs/taiwan.hpp deleted file mode 100644 index abce2282f1..0000000000 --- a/generator/regions/specs/taiwan.hpp +++ /dev/null @@ -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 TaiwanSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Taiwan"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/taiwan.cpp b/generator/regions/specs/taiwan.inl similarity index 55% rename from generator/regions/specs/taiwan.cpp rename to generator/regions/specs/taiwan.inl index 536b1bdf46..9cfe1660fc 100644 --- a/generator/regions/specs/taiwan.cpp +++ b/generator/regions/specs/taiwan.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/taiwan.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 +#include + namespace generator { namespace regions { namespace specs { + +class TaiwanSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Taiwan"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(TaiwanSpecifier); PlaceLevel TaiwanSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/tajikistan.hpp b/generator/regions/specs/tajikistan.hpp deleted file mode 100644 index 4ad000b17b..0000000000 --- a/generator/regions/specs/tajikistan.hpp +++ /dev/null @@ -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 TajikistanSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Tajikistan"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/tajikistan.cpp b/generator/regions/specs/tajikistan.inl similarity index 63% rename from generator/regions/specs/tajikistan.cpp rename to generator/regions/specs/tajikistan.inl index 00a4258f1d..1d04e4d0d7 100644 --- a/generator/regions/specs/tajikistan.cpp +++ b/generator/regions/specs/tajikistan.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/tajikistan.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 +#include + namespace generator { namespace regions { namespace specs { + +class TajikistanSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Tajikistan"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(TajikistanSpecifier); PlaceLevel TajikistanSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/tanzania.hpp b/generator/regions/specs/tanzania.hpp deleted file mode 100644 index 76ddc60a09..0000000000 --- a/generator/regions/specs/tanzania.hpp +++ /dev/null @@ -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 TanzaniaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Tanzania"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/tanzania.cpp b/generator/regions/specs/tanzania.inl similarity index 58% rename from generator/regions/specs/tanzania.cpp rename to generator/regions/specs/tanzania.inl index 2f516a8635..baa717a369 100644 --- a/generator/regions/specs/tanzania.cpp +++ b/generator/regions/specs/tanzania.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/tanzania.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 +#include + namespace generator { namespace regions { namespace specs { + +class TanzaniaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Tanzania"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(TanzaniaSpecifier); PlaceLevel TanzaniaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/thailand.hpp b/generator/regions/specs/thailand.hpp deleted file mode 100644 index 7e3eebf327..0000000000 --- a/generator/regions/specs/thailand.hpp +++ /dev/null @@ -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 ThailandSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Thailand"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/thailand.cpp b/generator/regions/specs/thailand.inl similarity index 58% rename from generator/regions/specs/thailand.cpp rename to generator/regions/specs/thailand.inl index 08e5cc230e..40931b1c53 100644 --- a/generator/regions/specs/thailand.cpp +++ b/generator/regions/specs/thailand.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/thailand.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 +#include + namespace generator { namespace regions { namespace specs { + +class ThailandSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Thailand"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(ThailandSpecifier); PlaceLevel ThailandSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/the_central_african_republic.hpp b/generator/regions/specs/the_central_african_republic.hpp deleted file mode 100644 index 5619e438ba..0000000000 --- a/generator/regions/specs/the_central_african_republic.hpp +++ /dev/null @@ -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 TheCentralAfricanRepublicSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"The Central African Republic"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/the_central_african_republic.cpp b/generator/regions/specs/the_central_african_republic.inl similarity index 55% rename from generator/regions/specs/the_central_african_republic.cpp rename to generator/regions/specs/the_central_african_republic.inl index 37f52ea08d..8ec276aff8 100644 --- a/generator/regions/specs/the_central_african_republic.cpp +++ b/generator/regions/specs/the_central_african_republic.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/the_central_african_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 +#include + namespace generator { namespace regions { namespace specs { + +class TheCentralAfricanRepublicSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"The Central African Republic"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(TheCentralAfricanRepublicSpecifier); PlaceLevel TheCentralAfricanRepublicSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/togo.hpp b/generator/regions/specs/togo.hpp deleted file mode 100644 index bdbb7008e6..0000000000 --- a/generator/regions/specs/togo.hpp +++ /dev/null @@ -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 TogoSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Togo"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/togo.cpp b/generator/regions/specs/togo.inl similarity index 63% rename from generator/regions/specs/togo.cpp rename to generator/regions/specs/togo.inl index a7f41f9f14..4fb7a5d26e 100644 --- a/generator/regions/specs/togo.cpp +++ b/generator/regions/specs/togo.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/togo.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 +#include + namespace generator { namespace regions { namespace specs { + +class TogoSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Togo"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(TogoSpecifier); PlaceLevel TogoSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/tunisia.hpp b/generator/regions/specs/tunisia.hpp deleted file mode 100644 index 716cdaf2f1..0000000000 --- a/generator/regions/specs/tunisia.hpp +++ /dev/null @@ -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 TunisiaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Tunisia"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/tunisia.cpp b/generator/regions/specs/tunisia.inl similarity index 56% rename from generator/regions/specs/tunisia.cpp rename to generator/regions/specs/tunisia.inl index 4f33d76012..f5c175f4f6 100644 --- a/generator/regions/specs/tunisia.cpp +++ b/generator/regions/specs/tunisia.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/tunisia.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 +#include + namespace generator { namespace regions { namespace specs { + +class TunisiaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Tunisia"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(TunisiaSpecifier); PlaceLevel TunisiaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/turkey.hpp b/generator/regions/specs/turkey.hpp deleted file mode 100644 index d17c483093..0000000000 --- a/generator/regions/specs/turkey.hpp +++ /dev/null @@ -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 TurkeySpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Turkey"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/turkey.cpp b/generator/regions/specs/turkey.inl similarity index 64% rename from generator/regions/specs/turkey.cpp rename to generator/regions/specs/turkey.inl index 045e0812e8..5647ac0163 100644 --- a/generator/regions/specs/turkey.cpp +++ b/generator/regions/specs/turkey.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/turkey.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 +#include + namespace generator { namespace regions { namespace specs { + +class TurkeySpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Turkey"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(TurkeySpecifier); PlaceLevel TurkeySpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/uganda.hpp b/generator/regions/specs/uganda.hpp deleted file mode 100644 index dee8a93de5..0000000000 --- a/generator/regions/specs/uganda.hpp +++ /dev/null @@ -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 UgandaSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Uganda"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/uganda.cpp b/generator/regions/specs/uganda.inl similarity index 57% rename from generator/regions/specs/uganda.cpp rename to generator/regions/specs/uganda.inl index 4a0d529d02..b42514e508 100644 --- a/generator/regions/specs/uganda.cpp +++ b/generator/regions/specs/uganda.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/uganda.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 +#include + namespace generator { namespace regions { namespace specs { + +class UgandaSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Uganda"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(UgandaSpecifier); PlaceLevel UgandaSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/ukraine.hpp b/generator/regions/specs/ukraine.hpp deleted file mode 100644 index a6e8ab0e48..0000000000 --- a/generator/regions/specs/ukraine.hpp +++ /dev/null @@ -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 UkraineSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Ukraine"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/ukraine.cpp b/generator/regions/specs/ukraine.inl similarity index 60% rename from generator/regions/specs/ukraine.cpp rename to generator/regions/specs/ukraine.inl index dbc6ae136a..f9190585f3 100644 --- a/generator/regions/specs/ukraine.cpp +++ b/generator/regions/specs/ukraine.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/ukraine.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 +#include + namespace generator { namespace regions { namespace specs { + +class UkraineSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Ukraine"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(UkraineSpecifier); PlaceLevel UkraineSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/united_kingdom.cpp b/generator/regions/specs/united_kingdom.cpp deleted file mode 100644 index 0c79247858..0000000000 --- a/generator/regions/specs/united_kingdom.cpp +++ /dev/null @@ -1,27 +0,0 @@ -#include "generator/regions/specs/united_kingdom.hpp" - -#include "generator/regions/country_specifier_builder.hpp" - -namespace generator -{ -namespace regions -{ -namespace specs -{ -REGISTER_COUNTRY_SPECIFIER(UnitedKingdomSpecifier); - -PlaceLevel UnitedKingdomSpecifier::GetSpecificCountryLevel(Region const & region) const -{ - AdminLevel adminLevel = region.GetAdminLevel(); - switch (adminLevel) - { - case AdminLevel::Four: - return PlaceLevel::Region; // England, Scotland, Wales and Northern Ireland - default: break; - } - - return PlaceLevel::Unknown; -} -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/united_kingdom.hpp b/generator/regions/specs/united_kingdom.inl similarity index 55% rename from generator/regions/specs/united_kingdom.hpp rename to generator/regions/specs/united_kingdom.inl index 052e786b76..c352477d84 100644 --- a/generator/regions/specs/united_kingdom.hpp +++ b/generator/regions/specs/united_kingdom.inl @@ -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 +#include namespace generator { @@ -9,6 +14,7 @@ namespace regions { namespace specs { + class UnitedKingdomSpecifier final : public CountrySpecifier { public: @@ -18,6 +24,21 @@ private: // CountrySpecifier overrides: PlaceLevel GetSpecificCountryLevel(Region const & region) const override; }; + +REGISTER_COUNTRY_SPECIFIER(UnitedKingdomSpecifier); + +PlaceLevel UnitedKingdomSpecifier::GetSpecificCountryLevel(Region const & region) const +{ + AdminLevel adminLevel = region.GetAdminLevel(); + switch (adminLevel) + { + case AdminLevel::Four: + return PlaceLevel::Region; // England, Scotland, Wales and Northern Ireland + default: break; + } + + return PlaceLevel::Unknown; +} } // namespace specs } // namespace regions } // namespace generator diff --git a/generator/regions/specs/united_states.hpp b/generator/regions/specs/united_states.hpp deleted file mode 100644 index a93779f823..0000000000 --- a/generator/regions/specs/united_states.hpp +++ /dev/null @@ -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 UnitedStatesSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"United States"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/united_states.cpp b/generator/regions/specs/united_states.inl similarity index 62% rename from generator/regions/specs/united_states.cpp rename to generator/regions/specs/united_states.inl index 249a299c6f..b7f2ba31e6 100644 --- a/generator/regions/specs/united_states.cpp +++ b/generator/regions/specs/united_states.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/united_states.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 +#include + namespace generator { namespace regions { namespace specs { + +class UnitedStatesSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"United States"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(UnitedStatesSpecifier); PlaceLevel UnitedStatesSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/vanuatu.hpp b/generator/regions/specs/vanuatu.hpp deleted file mode 100644 index 1325f6fb28..0000000000 --- a/generator/regions/specs/vanuatu.hpp +++ /dev/null @@ -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 VanuatuSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Vanuatu"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/vanuatu.cpp b/generator/regions/specs/vanuatu.inl similarity index 60% rename from generator/regions/specs/vanuatu.cpp rename to generator/regions/specs/vanuatu.inl index ea2d8438a2..48027ed620 100644 --- a/generator/regions/specs/vanuatu.cpp +++ b/generator/regions/specs/vanuatu.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/vanuatu.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 +#include + namespace generator { namespace regions { namespace specs { + +class VanuatuSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Vanuatu"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(VanuatuSpecifier); PlaceLevel VanuatuSpecifier::GetSpecificCountryLevel(Region const & region) const diff --git a/generator/regions/specs/vietnam.hpp b/generator/regions/specs/vietnam.hpp deleted file mode 100644 index e2c64dc5ea..0000000000 --- a/generator/regions/specs/vietnam.hpp +++ /dev/null @@ -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 VietnamSpecifier final : public CountrySpecifier -{ -public: - static std::vector GetCountryNames() { return {"Vietnam"}; } - -private: - // CountrySpecifier overrides: - PlaceLevel GetSpecificCountryLevel(Region const & region) const override; -}; -} // namespace specs -} // namespace regions -} // namespace generator diff --git a/generator/regions/specs/vietnam.cpp b/generator/regions/specs/vietnam.inl similarity index 59% rename from generator/regions/specs/vietnam.cpp rename to generator/regions/specs/vietnam.inl index 6756558f5e..ceb9dc8054 100644 --- a/generator/regions/specs/vietnam.cpp +++ b/generator/regions/specs/vietnam.inl @@ -1,13 +1,30 @@ -#include "generator/regions/specs/vietnam.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 +#include + namespace generator { namespace regions { namespace specs { + +class VietnamSpecifier final : public CountrySpecifier +{ +public: + static std::vector GetCountryNames() { return {"Vietnam"}; } + +private: + // CountrySpecifier overrides: + PlaceLevel GetSpecificCountryLevel(Region const & region) const override; +}; + REGISTER_COUNTRY_SPECIFIER(VietnamSpecifier); PlaceLevel VietnamSpecifier::GetSpecificCountryLevel(Region const & region) const