From b365da4229b2a9d0ceef632af6880a38ecb65325 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Fri, 30 May 2014 13:02:29 +0100 Subject: Various fixes to STL read/write. --- src/time_pair.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/time_pair.cc') 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; +} -- cgit v1.2.3