forked from organicmaps/organicmaps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcountry_file.cpp
45 lines (34 loc) · 914 Bytes
/
country_file.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#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