Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/map
diff options
context:
space:
mode:
Diffstat (limited to 'map')
-rw-r--r--map/active_maps_layout.cpp44
-rw-r--r--map/active_maps_layout.hpp32
-rw-r--r--map/country_status_display.cpp4
-rw-r--r--map/country_status_display.hpp2
-rw-r--r--map/country_tree.cpp10
-rw-r--r--map/country_tree.hpp8
-rw-r--r--map/framework.cpp14
-rw-r--r--map/framework.hpp4
-rw-r--r--map/mwm_tests/mwm_foreach_test.cpp2
9 files changed, 60 insertions, 60 deletions
diff --git a/map/active_maps_layout.cpp b/map/active_maps_layout.cpp
index 83618bdc48..3755cc3b9d 100644
--- a/map/active_maps_layout.cpp
+++ b/map/active_maps_layout.cpp
@@ -47,7 +47,7 @@ void ActiveMapsLayout::Init(vector<platform::CountryFile> const & files)
if (!arr.empty())
{
TStatus status;
- TMapOptions options;
+ MapOptions options;
storage.CountryStatusEx(arr[0], status, options);
if (status == TStatus::EOnDisk || status == TStatus::EOnDiskOutOfDate)
m_items.push_back({ arr, status, options, options });
@@ -191,19 +191,19 @@ TStatus ActiveMapsLayout::GetCountryStatus(TIndex const & index) const
return GetStorage().CountryStatusEx(index);
}
-TMapOptions ActiveMapsLayout::GetCountryOptions(TGroup const & group, int position) const
+MapOptions ActiveMapsLayout::GetCountryOptions(TGroup const & group, int position) const
{
return GetItemInGroup(group, position).m_options;
}
-TMapOptions ActiveMapsLayout::GetCountryOptions(TIndex const & index) const
+MapOptions ActiveMapsLayout::GetCountryOptions(TIndex const & index) const
{
Item const * item = FindItem(index);
if (item)
return item->m_options;
TStatus status;
- TMapOptions options;
+ MapOptions options;
GetStorage().CountryStatusEx(index, status, options);
return options;
}
@@ -222,12 +222,12 @@ LocalAndRemoteSizeT const ActiveMapsLayout::GetDownloadableCountrySize(TIndex co
}
LocalAndRemoteSizeT const ActiveMapsLayout::GetCountrySize(TGroup const & group, int position,
- TMapOptions const & options) const
+ MapOptions const & options) const
{
return GetCountrySize(GetItemInGroup(group, position).Index(), options);
}
-LocalAndRemoteSizeT const ActiveMapsLayout::GetCountrySize(TIndex const & index, TMapOptions const & options) const
+LocalAndRemoteSizeT const ActiveMapsLayout::GetCountrySize(TIndex const & index, MapOptions const & options) const
{
return GetStorage().CountrySizeInBytes(index, options);
}
@@ -240,8 +240,8 @@ LocalAndRemoteSizeT const ActiveMapsLayout::GetRemoteCountrySizes(TGroup const &
LocalAndRemoteSizeT const ActiveMapsLayout::GetRemoteCountrySizes(TIndex const & index) const
{
platform::CountryFile const & c = GetStorage().CountryByIndex(index).GetFile();
- size_t const mapSize = c.GetRemoteSize(TMapOptions::Map);
- return { mapSize, c.GetRemoteSize(TMapOptions::CarRouting) };
+ size_t const mapSize = c.GetRemoteSize(MapOptions::Map);
+ return { mapSize, c.GetRemoteSize(MapOptions::CarRouting) };
}
int ActiveMapsLayout::AddListener(ActiveMapsListener * listener)
@@ -255,9 +255,9 @@ void ActiveMapsLayout::RemoveListener(int slotID)
m_listeners.erase(slotID);
}
-void ActiveMapsLayout::DownloadMap(TIndex const & index, TMapOptions const & options)
+void ActiveMapsLayout::DownloadMap(TIndex const & index, MapOptions const & options)
{
- TMapOptions validOptions = ValidOptionsForDownload(options);
+ MapOptions validOptions = ValidOptionsForDownload(options);
Item * item = FindItem(index);
if (item)
{
@@ -275,14 +275,14 @@ void ActiveMapsLayout::DownloadMap(TIndex const & index, TMapOptions const & opt
m_framework.DownloadCountry(index, validOptions);
}
-void ActiveMapsLayout::DownloadMap(TGroup const & group, int position, TMapOptions const & options)
+void ActiveMapsLayout::DownloadMap(TGroup const & group, int position, MapOptions const & options)
{
Item & item = GetItemInGroup(group, position);
item.m_downloadRequest = ValidOptionsForDownload(options);
m_framework.DownloadCountry(item.Index(), item.m_downloadRequest);
}
-void ActiveMapsLayout::DeleteMap(TIndex const & index, const TMapOptions & options)
+void ActiveMapsLayout::DeleteMap(TIndex const & index, const MapOptions & options)
{
TGroup group;
int position;
@@ -290,7 +290,7 @@ void ActiveMapsLayout::DeleteMap(TIndex const & index, const TMapOptions & optio
DeleteMap(group, position, options);
}
-void ActiveMapsLayout::DeleteMap(TGroup const & group, int position, TMapOptions const & options)
+void ActiveMapsLayout::DeleteMap(TGroup const & group, int position, MapOptions const & options)
{
TIndex indexCopy = GetItemInGroup(group, position).Index();
m_framework.DeleteCountry(indexCopy, ValidOptionsForDelete(options));
@@ -378,7 +378,7 @@ Storage & ActiveMapsLayout::GetStorage()
void ActiveMapsLayout::StatusChangedCallback(TIndex const & index)
{
TStatus newStatus = TStatus::EUnknown;
- TMapOptions options = TMapOptions::Map;
+ MapOptions options = MapOptions::Map;
GetStorage().CountryStatusEx(index, newStatus, options);
TGroup group = TGroup::ENewMap;
@@ -403,7 +403,7 @@ void ActiveMapsLayout::StatusChangedCallback(TIndex const & index)
// but we must notify that options changed because for "NewMaps" m_options is virtual state
if (item.m_options != options || group == TGroup::ENewMap)
{
- TMapOptions requestOptions = options;
+ MapOptions requestOptions = options;
item.m_downloadRequest = item.m_options = options;
NotifyOptionsChanged(group, position, item.m_options, requestOptions);
}
@@ -418,7 +418,7 @@ void ActiveMapsLayout::StatusChangedCallback(TIndex const & index)
// Here we handle
// "Actual map without routing" -> "Actual map with routing"
// "Actual map with routing" -> "Actual map without routing"
- TMapOptions requestOpt = item.m_downloadRequest;
+ MapOptions requestOpt = item.m_downloadRequest;
item.m_options = item.m_downloadRequest = options;
NotifyOptionsChanged(group, position, item.m_options, requestOpt);
}
@@ -654,21 +654,21 @@ void ActiveMapsLayout::NotifyStatusChanged(TGroup const & group, int position,
}
void ActiveMapsLayout::NotifyOptionsChanged(TGroup const & group, int position,
- TMapOptions const & oldOpt, TMapOptions const & newOpt)
+ MapOptions const & oldOpt, MapOptions const & newOpt)
{
for (TListenerNode listener : m_listeners)
listener.second->CountryOptionsChanged(group, position, oldOpt, newOpt);
}
-TMapOptions ActiveMapsLayout::ValidOptionsForDownload(TMapOptions const & options)
+MapOptions ActiveMapsLayout::ValidOptionsForDownload(MapOptions const & options)
{
- return SetOptions(options, TMapOptions::Map);
+ return SetOptions(options, MapOptions::Map);
}
-TMapOptions ActiveMapsLayout::ValidOptionsForDelete(TMapOptions const & options)
+MapOptions ActiveMapsLayout::ValidOptionsForDelete(MapOptions const & options)
{
- if (HasOptions(options, TMapOptions::Map))
- return SetOptions(options, TMapOptions::CarRouting);
+ if (HasOptions(options, MapOptions::Map))
+ return SetOptions(options, MapOptions::CarRouting);
return options;
}
diff --git a/map/active_maps_layout.hpp b/map/active_maps_layout.hpp
index 0002fafd02..81367527ae 100644
--- a/map/active_maps_layout.hpp
+++ b/map/active_maps_layout.hpp
@@ -42,7 +42,7 @@ public:
virtual void CountryStatusChanged(TGroup const & group, int position,
TStatus const & oldStatus, TStatus const & newStatus) = 0;
virtual void CountryOptionsChanged(TGroup const & group, int position,
- TMapOptions const & oldOpt, TMapOptions const & newOpt) = 0;
+ MapOptions const & oldOpt, MapOptions const & newOpt) = 0;
virtual void DownloadingProgressUpdate(TGroup const & group, int position,
LocalAndRemoteSizeT const & progress) = 0;
};
@@ -62,22 +62,22 @@ public:
string const & GetCountryName(storage::TIndex const & index) const;
TStatus GetCountryStatus(TGroup const & group, int position) const;
TStatus GetCountryStatus(storage::TIndex const & index) const;
- TMapOptions GetCountryOptions(TGroup const & group, int position) const;
- TMapOptions GetCountryOptions(storage::TIndex const & index) const;
+ MapOptions GetCountryOptions(TGroup const & group, int position) const;
+ MapOptions GetCountryOptions(storage::TIndex const & index) const;
LocalAndRemoteSizeT const GetDownloadableCountrySize(TGroup const & group, int position) const;
LocalAndRemoteSizeT const GetDownloadableCountrySize(TIndex const & index) const;
- LocalAndRemoteSizeT const GetCountrySize(TGroup const & group, int position, TMapOptions const & options) const;
- LocalAndRemoteSizeT const GetCountrySize(TIndex const & index, TMapOptions const & options) const;
+ LocalAndRemoteSizeT const GetCountrySize(TGroup const & group, int position, MapOptions const & options) const;
+ LocalAndRemoteSizeT const GetCountrySize(TIndex const & index, MapOptions const & options) const;
LocalAndRemoteSizeT const GetRemoteCountrySizes(TGroup const & group, int position) const;
LocalAndRemoteSizeT const GetRemoteCountrySizes(TIndex const & index) const;
int AddListener(ActiveMapsListener * listener);
void RemoveListener(int slotID);
- void DownloadMap(TIndex const & index, TMapOptions const & options);
- void DownloadMap(TGroup const & group, int position, TMapOptions const & options);
- void DeleteMap(TIndex const & index, TMapOptions const & options);
- void DeleteMap(TGroup const & group, int position, TMapOptions const & options);
+ void DownloadMap(TIndex const & index, MapOptions const & options);
+ void DownloadMap(TGroup const & group, int position, MapOptions const & options);
+ void DeleteMap(TIndex const & index, MapOptions const & options);
+ void DeleteMap(TGroup const & group, int position, MapOptions const & options);
void RetryDownloading(TGroup const & group, int position);
void RetryDownloading(TIndex const & index);
@@ -115,8 +115,8 @@ private:
public:
template <class TCont> Item(TCont const & cont,
TStatus status,
- TMapOptions options,
- TMapOptions downloadRequest)
+ MapOptions options,
+ MapOptions downloadRequest)
: m_indexes(cont.begin(), cont.end()), m_status(status),
m_options(options), m_downloadRequest(downloadRequest)
{
@@ -133,8 +133,8 @@ private:
TIndex const & Index() const { return m_indexes[0]; }
TStatus m_status;
- TMapOptions m_options;
- TMapOptions m_downloadRequest;
+ MapOptions m_options;
+ MapOptions m_downloadRequest;
};
Item const & GetItemInGroup(TGroup const & group, int position) const;
@@ -156,10 +156,10 @@ private:
void NotifyStatusChanged(TGroup const & group, int position,
TStatus const & oldStatus, TStatus const & newStatus);
void NotifyOptionsChanged(TGroup const & group, int position,
- TMapOptions const & oldOpt, TMapOptions const & newOpt);
+ MapOptions const & oldOpt, MapOptions const & newOpt);
- TMapOptions ValidOptionsForDownload(TMapOptions const & options);
- TMapOptions ValidOptionsForDelete(TMapOptions const & options);
+ MapOptions ValidOptionsForDownload(MapOptions const & options);
+ MapOptions ValidOptionsForDelete(MapOptions const & options);
private:
Framework & m_framework;
diff --git a/map/country_status_display.cpp b/map/country_status_display.cpp
index 086d4bcb95..d7357a3f93 100644
--- a/map/country_status_display.cpp
+++ b/map/country_status_display.cpp
@@ -454,9 +454,9 @@ void CountryStatusDisplay::OnButtonClicked(gui::Element const * button)
{
ASSERT(m_countryIdx.IsValid(), ());
- TMapOptions options = TMapOptions::Map;
+ MapOptions options = MapOptions::Map;
if (button == m_primaryButton.get())
- options = SetOptions(options, TMapOptions::CarRouting);
+ options = SetOptions(options, MapOptions::CarRouting);
ASSERT(m_downloadCallback, ());
int opt = static_cast<int>(options);
diff --git a/map/country_status_display.hpp b/map/country_status_display.hpp
index c9ab39e62a..4047e9cc89 100644
--- a/map/country_status_display.hpp
+++ b/map/country_status_display.hpp
@@ -70,7 +70,7 @@ private:
virtual void CountryStatusChanged(storage::ActiveMapsLayout::TGroup const & group, int position,
storage::TStatus const & oldStatus, storage::TStatus const & newStatus);
virtual void CountryOptionsChanged(storage::ActiveMapsLayout::TGroup const & group, int position,
- TMapOptions const & oldOpt, TMapOptions const & newOpt)
+ MapOptions const & oldOpt, MapOptions const & newOpt)
{
}
virtual void DownloadingProgressUpdate(storage::ActiveMapsLayout::TGroup const & group, int position,
diff --git a/map/country_tree.cpp b/map/country_tree.cpp
index 4d62070703..0af4952864 100644
--- a/map/country_tree.cpp
+++ b/map/country_tree.cpp
@@ -148,10 +148,10 @@ TStatus CountryTree::GetLeafStatus(int position) const
return GetStorage().CountryStatusEx(GetChild(position));
}
-TMapOptions CountryTree::GetLeafOptions(int position) const
+MapOptions CountryTree::GetLeafOptions(int position) const
{
TStatus status;
- TMapOptions options;
+ MapOptions options;
GetStorage().CountryStatusEx(GetChild(position), status, options);
return options;
}
@@ -161,7 +161,7 @@ LocalAndRemoteSizeT const CountryTree::GetDownloadableLeafSize(int position) con
return GetActiveMapLayout().GetDownloadableCountrySize(GetChild(position));
}
-LocalAndRemoteSizeT const CountryTree::GetLeafSize(int position, TMapOptions const & options) const
+LocalAndRemoteSizeT const CountryTree::GetLeafSize(int position, MapOptions const & options) const
{
return GetActiveMapLayout().GetCountrySize(GetChild(position), options);
}
@@ -186,13 +186,13 @@ string const & CountryTree::GetRootName() const
return GetStorage().CountryName(GetCurrentRoot());
}
-void CountryTree::DownloadCountry(int childPosition, TMapOptions const & options)
+void CountryTree::DownloadCountry(int childPosition, MapOptions const & options)
{
ASSERT(IsLeaf(childPosition), ());
GetActiveMapLayout().DownloadMap(GetChild(childPosition), options);
}
-void CountryTree::DeleteCountry(int childPosition, TMapOptions const & options)
+void CountryTree::DeleteCountry(int childPosition, MapOptions const & options)
{
ASSERT(IsLeaf(childPosition), ());
GetActiveMapLayout().DeleteMap(GetChild(childPosition), options);
diff --git a/map/country_tree.hpp b/map/country_tree.hpp
index 2a28dce7a3..54d0259486 100644
--- a/map/country_tree.hpp
+++ b/map/country_tree.hpp
@@ -59,16 +59,16 @@ public:
string const & GetChildName(int position) const;
/// call this only if child IsLeaf == true
TStatus GetLeafStatus(int position) const;
- TMapOptions GetLeafOptions(int position) const;
+ MapOptions GetLeafOptions(int position) const;
LocalAndRemoteSizeT const GetDownloadableLeafSize(int position) const;
- LocalAndRemoteSizeT const GetLeafSize(int position, TMapOptions const & options) const;
+ LocalAndRemoteSizeT const GetLeafSize(int position, MapOptions const & options) const;
LocalAndRemoteSizeT const GetRemoteLeafSizes(int position) const;
bool IsCountryRoot() const;
string const & GetRootName() const;
///@{
- void DownloadCountry(int childPosition, TMapOptions const & options);
- void DeleteCountry(int childPosition, TMapOptions const & options);
+ void DownloadCountry(int childPosition, MapOptions const & options);
+ void DeleteCountry(int childPosition, MapOptions const & options);
void RetryDownloading(int childPosition);
///@}
void CancelDownloading(int childPosition);
diff --git a/map/framework.cpp b/map/framework.cpp
index e6cb2cdd36..696155f5ad 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -355,14 +355,14 @@ double Framework::GetVisualScale() const
return m_scales.GetVisualScale();
}
-void Framework::DeleteCountry(storage::TIndex const & index, TMapOptions opt)
+void Framework::DeleteCountry(storage::TIndex const & index, MapOptions opt)
{
switch (opt)
{
- case TMapOptions::Nothing:
+ case MapOptions::Nothing:
return;
- case TMapOptions::Map: // fall through
- case TMapOptions::MapWithCarRouting:
+ case MapOptions::Map: // fall through
+ case MapOptions::MapWithCarRouting:
{
CountryFile const & countryFile = m_storage.GetCountryFile(index);
// m_model will notify us when latest map file will be deleted via
@@ -376,14 +376,14 @@ void Framework::DeleteCountry(storage::TIndex const & index, TMapOptions opt)
m_routingSession.Reset();
return;
}
- case TMapOptions::CarRouting:
+ case MapOptions::CarRouting:
m_routingSession.Reset();
m_storage.DeleteCountry(index, opt);
return;
}
}
-void Framework::DownloadCountry(TIndex const & index, TMapOptions opt)
+void Framework::DownloadCountry(TIndex const & index, MapOptions opt)
{
m_storage.DownloadCountry(index, opt);
}
@@ -426,7 +426,7 @@ void Framework::UpdateLatestCountryFile(LocalCountryFile const & localFile)
// it won' be needed to reset it after maps update.
m_routingSession.Reset();
- if (!HasOptions(localFile.GetFiles(), TMapOptions::Map))
+ if (!HasOptions(localFile.GetFiles(), MapOptions::Map))
return;
// Add downloaded map.
diff --git a/map/framework.hpp b/map/framework.hpp
index 617c4b3366..5150898850 100644
--- a/map/framework.hpp
+++ b/map/framework.hpp
@@ -205,9 +205,9 @@ public:
/// @name This functions is used by Downloader UI.
//@{
/// options - flags that signal about parts of map that must be deleted
- void DeleteCountry(storage::TIndex const & index, TMapOptions opt);
+ void DeleteCountry(storage::TIndex const & index, MapOptions opt);
/// options - flags that signal about parts of map that must be downloaded
- void DownloadCountry(storage::TIndex const & index, TMapOptions opt);
+ void DownloadCountry(storage::TIndex const & index, MapOptions opt);
storage::TStatus GetCountryStatus(storage::TIndex const & index) const;
string GetCountryName(storage::TIndex const & index) const;
diff --git a/map/mwm_tests/mwm_foreach_test.cpp b/map/mwm_tests/mwm_foreach_test.cpp
index b3ed7ab0b5..f9bf63dfa4 100644
--- a/map/mwm_tests/mwm_foreach_test.cpp
+++ b/map/mwm_tests/mwm_foreach_test.cpp
@@ -258,7 +258,7 @@ void RunTest(string const & countryFileName)
vector<m2::RectD> rects;
rects.push_back(src1.GetWorldRect());
- ModelReaderPtr reader = platform::GetCountryReader(localFile, TMapOptions::Map);
+ ModelReaderPtr reader = platform::GetCountryReader(localFile, MapOptions::Map);
while (!rects.empty())
{