No-op: whitespace.
[libdcp.git] / src / dcp_time.cc
index d34804e981ba3f4cd19e2cd7960a04041694b7fd..8101bed1e38b164983a19afa3a987bb53aa7e259 100644 (file)
@@ -38,17 +38,28 @@ Time::Time (int frame, int frames_per_second, int tcr_)
        set (double (frame) / frames_per_second, tcr_);
 }
 
+/** Construct a Time with a timecode rate of 24 and using the supplied
+ *  number of seconds.
+ *
+ *  @param seconds A number of seconds.
+ */
 Time::Time (double seconds)
 {
        set (seconds, 24);
 }
 
+/** Construct a Time with specified timecode rate and using the supplied
+ *  number of seconds.
+ *
+ *  @param seconds A number of seconds.
+ *  @param tcr_ Timecode rate to use.
+ */
 void
 Time::set (double seconds, int tcr_)
 {
        s = floor (seconds);
        tcr = tcr_;
-       
+
        e = int (round ((seconds - s) * tcr));
 
        if (s >= 60) {
@@ -66,6 +77,7 @@ Time::set (double seconds, int tcr_)
        }
 }
 
+/** @param time String of the form HH:MM:SS:EE[E] */
 Time::Time (string time, int tcr_)
        : tcr (tcr_)
 {
@@ -74,7 +86,7 @@ Time::Time (string time, int tcr_)
        if (b.size() != 4) {
                boost::throw_exception (DCPReadError ("unrecognised time specification"));
        }
-       
+
        h = raw_convert<int> (b[0]);
        m = raw_convert<int> (b[1]);
        s = raw_convert<int> (b[2]);
@@ -206,7 +218,7 @@ dcp::operator- (Time a, Time b)
        } else {
                r.tcr = a.tcr;
        }
-       
+
        r.e = a.e - b.e;
        if (r.e < 0) {
                r.e += r.tcr;
@@ -250,18 +262,26 @@ Time::as_string () const
        return str.str ();
 }
 
+/** @param tcr_ Timecode rate with which the return value should be counted.
+ *  @return the total number of editable units that this time consists of at the specified timecode rate.
+ *  For example, as_editable_units (24) returns the total time in frames at 24fps.
+ */
 int64_t
 Time::as_editable_units (int tcr_) const
 {
        return (int64_t(e) * float (tcr_ / tcr)) + int64_t(s) * tcr_ + int64_t(m) * 60 * tcr_ + int64_t(h) * 60 * 60 * tcr_;
 }
 
+/** @return the total number of seconds that this time consists of */
 double
 Time::as_seconds () const
 {
        return h * 3600 + m * 60 + s + double(e) / tcr;
 }
 
+/** @param tcr_ New timecode rate.
+ *  @return A new Time which is this time at the spcified new timecode rate.
+ */
 Time
 Time::rebase (int tcr_) const
 {