Ardour  9.0-pre0-582-g084a23a80d
ItemCounts Class Reference

#include <item_counts.h>

Public Member Functions

 ItemCounts ()
 
size_t n_playlists (ARDOUR::DataType t) const
 
size_t n_regions (ARDOUR::DataType t) const
 
size_t n_lines (Evoral::Parameter t) const
 
size_t n_notes () const
 
void increase_n_playlists (ARDOUR::DataType t, size_t delta=1)
 
void increase_n_regions (ARDOUR::DataType t, size_t delta=1)
 
void increase_n_lines (Evoral::Parameter t, size_t delta=1)
 
void increase_n_notes (size_t delta=1)
 

Private Member Functions

template<typename Key >
size_t get_n (const Key &key, const typename std::map< Key, size_t > &counts) const
 
template<typename Key >
void increase_n (const Key &key, typename std::map< Key, size_t > &counts, size_t delta)
 

Private Attributes

std::map< ARDOUR::DataType, size_t > _playlists
 
std::map< ARDOUR::DataType, size_t > _regions
 
std::map< Evoral::Parameter, size_t > _lines
 
size_t _notes
 

Detailed Description

A count of various GUI items.

This is used to keep track of 'consumption' of a selection when pasting, but may be useful elsewhere.

Definition at line 33 of file item_counts.h.

Constructor & Destructor Documentation

◆ ItemCounts()

ItemCounts::ItemCounts ( )
inline

Definition at line 36 of file item_counts.h.

Member Function Documentation

◆ get_n()

template<typename Key >
size_t ItemCounts::get_n ( const Key &  key,
const typename std::map< Key, size_t > &  counts 
) const
inlineprivate

Definition at line 60 of file item_counts.h.

◆ increase_n()

template<typename Key >
void ItemCounts::increase_n ( const Key &  key,
typename std::map< Key, size_t > &  counts,
size_t  delta 
)
inlineprivate

Definition at line 67 of file item_counts.h.

◆ increase_n_lines()

void ItemCounts::increase_n_lines ( Evoral::Parameter  t,
size_t  delta = 1 
)
inline

Definition at line 51 of file item_counts.h.

◆ increase_n_notes()

void ItemCounts::increase_n_notes ( size_t  delta = 1)
inline

Definition at line 55 of file item_counts.h.

◆ increase_n_playlists()

void ItemCounts::increase_n_playlists ( ARDOUR::DataType  t,
size_t  delta = 1 
)
inline

Definition at line 43 of file item_counts.h.

◆ increase_n_regions()

void ItemCounts::increase_n_regions ( ARDOUR::DataType  t,
size_t  delta = 1 
)
inline

Definition at line 47 of file item_counts.h.

◆ n_lines()

size_t ItemCounts::n_lines ( Evoral::Parameter  t) const
inline

Definition at line 40 of file item_counts.h.

◆ n_notes()

size_t ItemCounts::n_notes ( ) const
inline

Definition at line 41 of file item_counts.h.

◆ n_playlists()

size_t ItemCounts::n_playlists ( ARDOUR::DataType  t) const
inline

Definition at line 38 of file item_counts.h.

◆ n_regions()

size_t ItemCounts::n_regions ( ARDOUR::DataType  t) const
inline

Definition at line 39 of file item_counts.h.

Member Data Documentation

◆ _lines

std::map<Evoral::Parameter, size_t> ItemCounts::_lines
private

Definition at line 78 of file item_counts.h.

◆ _notes

size_t ItemCounts::_notes
private

Definition at line 79 of file item_counts.h.

◆ _playlists

std::map<ARDOUR::DataType, size_t> ItemCounts::_playlists
private

Definition at line 76 of file item_counts.h.

◆ _regions

std::map<ARDOUR::DataType, size_t> ItemCounts::_regions
private

Definition at line 77 of file item_counts.h.


The documentation for this class was generated from the following file: