58 template<
typename Key>
60 get_n(
const Key& key,
const typename std::map<Key, size_t>& counts)
const {
61 typename std::map<Key, size_t>::const_iterator i = counts.find(key);
62 return (i == counts.end()) ? 0 : i->second;
65 template<
typename Key>
67 increase_n(
const Key& key,
typename std::map<Key, size_t>& counts,
size_t delta) {
68 typename std::map<Key, size_t>::iterator i = counts.find(key);
69 if (i != counts.end()) {
72 counts.insert(std::make_pair(key, delta));
78 std::map<Evoral::Parameter, size_t>
_lines;
void increase_n(const Key &key, typename std::map< Key, size_t > &counts, size_t delta)
void increase_n_notes(size_t delta=1)
size_t get_n(const Key &key, const typename std::map< Key, size_t > &counts) const
size_t n_lines(Evoral::Parameter t) const
std::map< Evoral::Parameter, size_t > _lines
size_t n_regions(ARDOUR::DataType t) const
std::map< ARDOUR::DataType, size_t > _regions
void increase_n_playlists(ARDOUR::DataType t, size_t delta=1)
void increase_n_lines(Evoral::Parameter t, size_t delta=1)
void increase_n_regions(ARDOUR::DataType t, size_t delta=1)
std::map< ARDOUR::DataType, size_t > _playlists
size_t n_playlists(ARDOUR::DataType t) const