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
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2012-12-04 09:52:15 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:47:24 +0300
commit9cde05c2c52db4e7123f804933a45d8d7127ddbc (patch)
tree4bc4f8b1b87ce3c3b84a02846c267cf218a30752 /map/bookmark.hpp
parent7b488353b0006e058f290945c841826b3138a834 (diff)
[bookmarks] Added TimeStamp serialisation and parsing
Diffstat (limited to 'map/bookmark.hpp')
-rw-r--r--map/bookmark.hpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/map/bookmark.hpp b/map/bookmark.hpp
index 932c3d2922..9eb4194102 100644
--- a/map/bookmark.hpp
+++ b/map/bookmark.hpp
@@ -18,12 +18,14 @@ class Bookmark
string m_description;
string m_type; ///< Now it stores bookmark color (category style).
double m_scale; ///< Viewport scale. -1.0 - is a default value (no scale set).
+ time_t m_timeStamp;
public:
- Bookmark() {}
+ Bookmark() : m_scale(-1.0), m_timeStamp(INVALID_TIME_STAMP) {}
Bookmark(m2::PointD const & org, string const & name, string const & type,
- string const & description = string())
- : m_org(org), m_name(name), m_description(description), m_type(type), m_scale(-1.0)
+ string const & description = string(), time_t timeStamp = INVALID_TIME_STAMP)
+ : m_org(org), m_name(name), m_description(description), m_type(type), m_scale(-1.0),
+ m_timeStamp(timeStamp)
{
}
@@ -36,6 +38,9 @@ public:
static time_t const INVALID_TIME_STAMP;
+ /// @return INVALID_TIME_STAMP if bookmark has no timestamp
+ time_t GetTimeStamp() const { return m_timeStamp; }
+
double GetScale() const { return m_scale; }
void SetScale(double scale) { m_scale = scale; }
};