summaryrefslogtreecommitdiff
path: root/src/time_pair.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-05-30 13:02:29 +0100
committerCarl Hetherington <cth@carlh.net>2014-05-30 13:02:29 +0100
commitb365da4229b2a9d0ceef632af6880a38ecb65325 (patch)
treeb37f7c5d68206c6aab456ec44ac666c7f4b6bdf2 /src/time_pair.cc
parent38a5ff713757b9dc0cb67cb09613182c46dc9657 (diff)
Various fixes to STL read/write.
Diffstat (limited to 'src/time_pair.cc')
-rw-r--r--src/time_pair.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/time_pair.cc b/src/time_pair.cc
index 186d54c..3ef2429 100644
--- a/src/time_pair.cc
+++ b/src/time_pair.cc
@@ -19,6 +19,7 @@
#include "time_pair.h"
+using std::ostream;
using namespace sub;
FrameTime
@@ -54,3 +55,15 @@ TimePair::operator== (TimePair const & other) const
return false;
}
+
+ostream &
+sub::operator<< (ostream& s, TimePair const & t)
+{
+ if (t.frame ()) {
+ s << "[FRAME] " << t.frame().get();
+ } else {
+ s << "[METRIC]" << t.metric().get();
+ }
+
+ return s;
+}