diff options
author | vng <viktor.govako@gmail.com> | 2012-10-12 00:08:04 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:45:11 +0300 |
commit | 7ce5a1282179d15f50396dd639645736a71d7f68 (patch) | |
tree | 55864943b0a2fe16cfdfb50953b6b836345a508a /map/bookmark.hpp | |
parent | de92bcb68e0bdaf631e7338fa84e1e7e838b28f3 (diff) |
Fix bookmarks saving routine.
Diffstat (limited to 'map/bookmark.hpp')
-rw-r--r-- | map/bookmark.hpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/map/bookmark.hpp b/map/bookmark.hpp index fef26b9c26..594ea20570 100644 --- a/map/bookmark.hpp +++ b/map/bookmark.hpp @@ -34,6 +34,11 @@ public: void SetScale(double scale) { m_scale = scale; } }; +namespace bookmark_impl +{ + class KMLParser; +} + class BookmarkCategory : private noncopyable { string m_name; @@ -42,6 +47,9 @@ class BookmarkCategory : private noncopyable /// Stores file name from which category was loaded string m_file; + friend class bookmark_impl::KMLParser; + void AddBookmarkImpl(Bookmark const & bm, double scale); + public: BookmarkCategory(string const & name) : m_name(name), m_visible(true) {} ~BookmarkCategory(); @@ -83,6 +91,9 @@ public: /// @return 0 in the case of error static BookmarkCategory * CreateFromKMLFile(string const & file); + /// Get valid file name from input (remove illegal symbols). + static string GetValidFileName(string const & name); + /// Get unique file name from path and valid file name. static string GenerateUniqueFileName(const string & path, string const & name); //@} }; |