mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 07:45:00 +01:00
temporal: add operator<<(ostream&) for BBT_Argument
This commit is contained in:
parent
fafc891ca6
commit
7c07a9964a
2 changed files with 17 additions and 0 deletions
|
|
@ -20,6 +20,7 @@
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "temporal/bbt_time.h"
|
#include "temporal/bbt_time.h"
|
||||||
|
#include "temporal/bbt_argument.h"
|
||||||
|
|
||||||
using namespace Temporal;
|
using namespace Temporal;
|
||||||
|
|
||||||
|
|
@ -116,3 +117,13 @@ std::operator>>(std::istream& i, Temporal::BBT_Time& bbt)
|
||||||
|
|
||||||
return i;
|
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
|
} // end namespace
|
||||||
|
|
||||||
|
namespace std {
|
||||||
|
|
||||||
|
LIBTEMPORAL_API std::ostream& operator<< (std::ostream& o, Temporal::BBT_Argument const & bbt);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
#endif /* __libtemporal_bbt_argument_h__ */
|
#endif /* __libtemporal_bbt_argument_h__ */
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue