temporal: add operator<<(ostream&) for BBT_Argument
This commit is contained in:
@@ -20,6 +20,7 @@
|
||||
#include <cassert>
|
||||
|
||||
#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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user