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

46 lines
914 B
C++

#include "platform/country_file.hpp"
#include "base/assert.hpp"
#include <sstream>
#include "defines.hpp"
namespace platform
{
using namespace std;
string GetFileName(string const & countryName, MapFileType type)
{
ASSERT(!countryName.empty(), ());
switch (type)
{
case MapFileType::Map: return countryName + DATA_FILE_EXTENSION;
case MapFileType::Diff: return countryName + DIFF_FILE_EXTENSION;
case MapFileType::Count: break;
}
UNREACHABLE();
}
CountryFile::CountryFile() : m_mapSize(0) {}
CountryFile::CountryFile(std::string name)
: m_name(std::move(name)), m_mapSize(0)
{
}
CountryFile::CountryFile(std::string name, MwmSize size, std::string sha1)
: m_name(std::move(name)), m_mapSize(size), m_sha1(std::move(sha1))
{
}
string DebugPrint(CountryFile const & file)
{
ostringstream os;
os << "CountryFile [" << file.m_name << "]";
return os.str();
}
} // namespace platform