diff --git a/libs/temporal/bbt_time.cc b/libs/temporal/bbt_time.cc index c03b9301a1..03b7bf3726 100644 --- a/libs/temporal/bbt_time.cc +++ b/libs/temporal/bbt_time.cc @@ -20,6 +20,7 @@ #include #include "temporal/bbt_time.h" +#include "temporal/bbt_argument.h" using namespace Temporal; @@ -116,3 +117,13 @@ std::operator>>(std::istream& i, Temporal::BBT_Time& bbt) return i; } + +/* define this here to avoid adding another .cc file for just this operator */ + +std::ostream& +std::operator<< (std::ostream& o, Temporal::BBT_Argument const & bbt) +{ + o << '@' << bbt.reference() << ':' << bbt.bars << '|' << bbt.beats << '|' << bbt.ticks; + return o; +} + diff --git a/libs/temporal/temporal/bbt_argument.h b/libs/temporal/temporal/bbt_argument.h index f6adeb4af9..76a1a2e65f 100644 --- a/libs/temporal/temporal/bbt_argument.h +++ b/libs/temporal/temporal/bbt_argument.h @@ -45,4 +45,10 @@ struct LIBTEMPORAL_API BBT_Argument : public BBT_Time } // end namespace +namespace std { + +LIBTEMPORAL_API std::ostream& operator<< (std::ostream& o, Temporal::BBT_Argument const & bbt); + +} + #endif /* __libtemporal_bbt_argument_h__ */