diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-05-22 17:36:11 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-05-22 17:36:11 +0100 |
| commit | 596441a4e8cf03a88113646ca6da2f90e721a38b (patch) | |
| tree | bf364e57aecc1f019d69b8faf32b8818eaa9d98b /src/lib/content.h | |
| parent | 11c70b0e3051517e7bb96a7d6fa53053dab6e978 (diff) | |
Various hacks.
Diffstat (limited to 'src/lib/content.h')
| -rw-r--r-- | src/lib/content.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/lib/content.h b/src/lib/content.h index b8062b280..db1e56bc4 100644 --- a/src/lib/content.h +++ b/src/lib/content.h @@ -39,6 +39,7 @@ class Film; class Content : public boost::enable_shared_from_this<Content> { public: + Content (Time); Content (boost::filesystem::path); Content (boost::shared_ptr<const cxml::Node>); Content (Content const &); @@ -49,7 +50,7 @@ public: virtual void as_xml (xmlpp::Node *) const; virtual boost::shared_ptr<Content> clone () const = 0; virtual Time length (boost::shared_ptr<const Film>) const = 0; - + boost::filesystem::path file () const { boost::mutex::scoped_lock lm (_mutex); return _file; @@ -60,9 +61,13 @@ public: return _digest; } - Time time () const { + Time start () const { boost::mutex::scoped_lock lm (_mutex); - return _time; + return _start; + } + + Time end (boost::shared_ptr<const Film> f) const { + return start() + length(f); } boost::signals2::signal<void (boost::weak_ptr<Content>, int)> Changed; @@ -75,7 +80,7 @@ protected: private: boost::filesystem::path _file; std::string _digest; - Time _time; + Time _start; }; #endif |
