71 inline uint32_t
n (
DataType t)
const {
return _counts[t]; }
106 if (_counts[*t] != other.
_counts[*t])
113 return ! (*
this == other);
118 if (_counts[*t] > other.
_counts[*t]) {
122 return (*
this != other);
126 return ( (*
this < other) || (*
this == other) );
131 if (_counts[*t] < other.
_counts[*t]) {
135 return (*
this != other);
139 return ( (*
this > other) || (*
this == other) );
145 ret.
set(*t, get(*t) + other.
get(*t));
154 if (get(*t) < other.
get(*t)) {
157 ret.
set(*t, get(*t) - other.
get(*t));
166 ret.
set(*t, get(*t) * factor );
174 if (_counts[*t] < other.
_counts[*t]) {
177 _counts[*t] -= other.
_counts[*t];
185 _counts[*t] += other.
_counts[*t];
193 ret.
set(*t, std::min(a.
get(*t), b.
get(*t)));
201 ret.
set(*t, std::max(a.
get(*t), b.
get(*t)));
std::ostream & operator<<(std::ostream &o, const ARDOUR::ChanCount &c)
ChanCount operator-(const ChanCount &other) const
ChanCount(const XMLNode &node)
uint32_t n(DataType t) const
ChanCount(DataType type, uint32_t count)
ChanCount operator*(const unsigned int factor) const
void set_midi(uint32_t m)
XMLNode * state(const std::string &name) const
bool operator>=(const ChanCount &other) const
uint32_t get(DataType t) const
ChanCount & operator+=(const ChanCount &other)
ChanCount & operator-=(const ChanCount &other)
void set_audio(uint32_t a)
uint32_t _counts[DataType::num_types]
static const ChanCount ZERO
bool operator<(const ChanCount &other) const
static ChanCount min(const ChanCount &a, const ChanCount &b)
void set(DataType t, uint32_t count)
bool operator<=(const ChanCount &other) const
static ChanCount max(const ChanCount &a, const ChanCount &b)
bool operator!=(const ChanCount &other) const
ChanCount operator+(const ChanCount &other) const
bool operator==(const ChanCount &other) const
bool operator>(const ChanCount &other) const
static const uint32_t num_types
GtkImageIconNameData name