diff options
author | Добрый Ээх <bukharaev@gmail.com> | 2017-01-31 13:43:50 +0300 |
---|---|---|
committer | Добрый Ээх <bukharaev@gmail.com> | 2017-02-02 16:39:35 +0300 |
commit | 70d75b3e836b996fc168b64fafb5e626144e7b93 (patch) | |
tree | e149f337bb1879aeb268454de277f7b7d222aad1 /storage | |
parent | 5f887b0d5fed4deee09cd163c4655b1a25446ed8 (diff) |
[routing] add numeric mwm id
Diffstat (limited to 'storage')
-rw-r--r-- | storage/storage.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/storage/storage.hpp b/storage/storage.hpp index 7e3b8e8438..b2e1d18db3 100644 --- a/storage/storage.hpp +++ b/storage/storage.hpp @@ -424,6 +424,8 @@ public: void ForEachInSubtree(TCountryId const & root, ToDo && toDo) const; template <class ToDo> void ForEachAncestorExceptForTheRoot(TCountryId const & childId, ToDo && toDo) const; + template <class ToDo> + void ForEachCountryFile(ToDo && toDo) const; /// \brief Sets callback which will be called in case of a click on download map button on the map. void SetCallbackForClickOnDownloadMap(TDownloadFn & downloadFn); @@ -691,4 +693,13 @@ void Storage::ForEachAncestorExceptForTheRoot(vector<TCountryTreeNode const *> c }); } } + +template <class ToDo> +void Storage::ForEachCountryFile(ToDo && toDo) const +{ + m_countries.GetRoot().ForEachInSubtree([&](TCountryTree::Node const & node) { + if (node.ChildrenCount() == 0) + toDo(node.Value().GetFile()); + }); +} } // storage |