Add a somewhat dubious constructor.
[libdcp.git] / src / dcp_time.h
index 626cdacae1ddb3b4f0ef18249998e6a3436a1643..eff69579736a8cd040301d25697d84e10374b23d 100644 (file)
@@ -47,15 +47,29 @@ public:
                , t (t_)
        {}
 
+       Time (std::string time);
+
        int h; ///< hours
        int m; ///< minutes
        int s; ///< seconds
        int t; ///< `ticks', where 1 tick is 4 milliseconds
+
+       std::string to_string () const;
+       int64_t to_ticks () const;
+
+private:
+       void set (double);
 };
 
 extern bool operator== (Time const & a, Time const & b);
+extern bool operator!= (Time const & a, Time const & b);
 extern bool operator<= (Time const & a, Time const & b);
+extern bool operator< (Time const & a, Time const & b);
+extern bool operator> (Time const & a, Time const & b);
 extern std::ostream & operator<< (std::ostream & s, Time const & t);
+extern Time operator+ (Time a, Time const & b);        
+extern Time operator- (Time a, Time const & b);
+extern float operator/ (Time a, Time const & b);
 
 }