Add operator<< for bundles.
git-svn-id: svn://localhost/ardour2/branches/3.0@8606 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
ce03319dd1
commit
a052488c00
@ -144,8 +144,6 @@ class Bundle : public PBD::ScopedConnectionList
|
|||||||
Change _pending_change;
|
Change _pending_change;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
struct BundleChannel
|
struct BundleChannel
|
||||||
{
|
{
|
||||||
BundleChannel () : channel (-1) {}
|
BundleChannel () : channel (-1) {}
|
||||||
@ -167,4 +165,6 @@ struct BundleChannel
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::ostream & operator<< (std::ostream & o, ARDOUR::Bundle const &);
|
||||||
|
|
||||||
#endif /* __ardour_bundle_h__ */
|
#endif /* __ardour_bundle_h__ */
|
||||||
|
@ -496,3 +496,18 @@ Bundle::channel_type (uint32_t c) const
|
|||||||
return _channel[c].type;
|
return _channel[c].type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ostream &
|
||||||
|
operator<< (ostream& os, Bundle const & b)
|
||||||
|
{
|
||||||
|
os << "BUNDLE " << b.nchannels() << " channels: ";
|
||||||
|
for (uint32_t i = 0; i < b.nchannels().n_total(); ++i) {
|
||||||
|
os << "( ";
|
||||||
|
Bundle::PortList const & pl = b.channel_ports (i);
|
||||||
|
for (Bundle::PortList::const_iterator j = pl.begin(); j != pl.end(); ++j) {
|
||||||
|
os << *j << " ";
|
||||||
|
}
|
||||||
|
os << ") ";
|
||||||
|
}
|
||||||
|
|
||||||
|
return os;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user