mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 22:53:43 +00:00
committed by
Konstantin Pastbin
parent
c9cbb64f12
commit
76ffc99abd
18
libs/storage/country_parent_getter.cpp
Normal file
18
libs/storage/country_parent_getter.cpp
Normal file
@@ -0,0 +1,18 @@
|
||||
#include "storage/country_parent_getter.hpp"
|
||||
|
||||
namespace storage
|
||||
{
|
||||
CountryParentGetter::CountryParentGetter(std::string const & countriesFile,
|
||||
std::string const & countriesDir)
|
||||
{
|
||||
if (countriesFile.empty())
|
||||
m_storage = std::make_shared<Storage>();
|
||||
else
|
||||
m_storage = std::make_shared<Storage>(countriesFile, countriesDir);
|
||||
}
|
||||
|
||||
std::string CountryParentGetter::operator()(std::string const & id) const
|
||||
{
|
||||
return m_storage->GetParentIdFor(id);
|
||||
}
|
||||
} // namespace storage
|
||||
Reference in New Issue
Block a user