diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-05-30 13:02:29 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-05-30 13:02:29 +0100 |
| commit | b365da4229b2a9d0ceef632af6880a38ecb65325 (patch) | |
| tree | b37f7c5d68206c6aab456ec44ac666c7f4b6bdf2 /src/time_pair.cc | |
| parent | 38a5ff713757b9dc0cb67cb09613182c46dc9657 (diff) | |
Various fixes to STL read/write.
Diffstat (limited to 'src/time_pair.cc')
| -rw-r--r-- | src/time_pair.cc | 13 |
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; +} |
