* Operators are defined so this may safely be used as if it were a simple
* (single-typed) integer count of channels.
*/
-class ChanCount {
+class LIBARDOUR_API ChanCount {
public:
ChanCount(const XMLNode& node);
ChanCount() { reset(); }
return ret;
}
+ ChanCount operator*(const unsigned int factor) const {
+ ChanCount ret;
+ for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
+ ret.set(*t, get(*t) * factor );
+ }
+ return ret;
+ }
+
ChanCount& operator+=(const ChanCount& other) {
for (DataType::iterator t = DataType::begin(); t != DataType::end(); ++t) {
_counts[*t] += other._counts[*t];
} // namespace ARDOUR
-std::ostream& operator<<(std::ostream& o, const ARDOUR::ChanCount& c);
+LIBARDOUR_API std::ostream& operator<<(std::ostream& o, const ARDOUR::ChanCount& c);
#endif // __ardour_chan_count_h__