Audacity 3.2.0
|
#include <Channel.h>
Classes | |
class | IntervalIterator |
Public Member Functions | |
virtual | ~Channel () |
ChannelGroup & | GetChannelGroup () |
Channel object's lifetime is assumed to be nested in its Track's. More... | |
const ChannelGroup & | GetChannelGroup () const |
Channel object's lifetime is assumed to be nested in its Track's. More... | |
size_t | GetChannelIndex () const |
Protected Member Functions | |
virtual ChannelGroup & | DoGetChannelGroup () const =0 |
Subclass must override. More... | |
Acesss to intervals | |
using | Interval = ChannelInterval |
size_t | NIntervals () const |
Report the number of intervals. More... | |
template<typename IntervalType = Interval> | |
std::shared_ptr< IntervalType > | GetInterval (size_t iInterval) |
Retrieve an interval, cast to the given type. More... | |
template<typename IntervalType = const Interval> | |
auto | GetInterval (size_t iInterval) const -> std::enable_if_t< std::is_const_v< IntervalType >, std::shared_ptr< IntervalType > > |
template<typename IntervalType = Interval> | |
IteratorRange< IntervalIterator< IntervalType > > | Intervals () |
Get range of intervals with mutative access. More... | |
template<typename IntervalType = const Interval> | |
auto | Intervals () const -> std::enable_if_t< std::is_const_v< IntervalType >, IteratorRange< IntervalIterator< IntervalType > > > |
Get range of intervals with read-only access. More... | |
using Channel::Interval = ChannelInterval |
|
virtualdefault |
|
protectedpure virtual |
Subclass must override.
ii
less than result.NChannels()
, this == result.GetChannel(ii).get()
Implemented in UniqueChannelTrack< Base >, UniqueChannelTrack< PlayableTrack >, and WaveChannel.
Referenced by GetChannelGroup(), GetChannelIndex(), and GetInterval().
ChannelGroup & Channel::GetChannelGroup | ( | ) |
Channel object's lifetime is assumed to be nested in its Track's.
Definition at line 43 of file Channel.cpp.
References DoGetChannelGroup().
Referenced by WaveformView::DoDraw(), TrackArt::DrawBackgroundWithSelection(), CommonTrackInfo::DrawCloseButton(), ChannelView::Find(), SelectHandle::FindTrack(), TrackPanelResizerCell::Get(), ChannelView::Get(), anonymous_namespace{TrackPanel.cpp}::GetTrack(), TrackPanelResizeHandle::GetTrack(), NIntervals(), PendingTracks::SubstituteOriginalChannel(), and PendingTracks::SubstitutePendingChangedChannel().
const ChannelGroup & Channel::GetChannelGroup | ( | ) | const |
Channel object's lifetime is assumed to be nested in its Track's.
Definition at line 38 of file Channel.cpp.
References DoGetChannelGroup().
size_t Channel::GetChannelIndex | ( | ) | const |
ii
such that this == GetChannelGroup().GetChannel(ii).get()
Definition at line 25 of file Channel.cpp.
References DoGetChannelGroup().
Referenced by WaveChannel::Append(), WaveChannel::AppendBuffer(), WaveChannel::DoGet(), ChannelView::Find(), TrackPanelResizerCell::Get(), ChannelView::Get(), WaveChannel::GetChannelType(), GetInterval(), CommonChannelView::GetMinimizedHeight(), PendingTracks::SubstituteOriginalChannel(), and PendingTracks::SubstitutePendingChangedChannel().
std::shared_ptr< IntervalType > Channel::GetInterval | ( | size_t | iInterval | ) |
Retrieve an interval, cast to the given type.
!(iInterval < NIntervals()) || result
Definition at line 546 of file Channel.h.
References DoGetChannelGroup(), GetChannelIndex(), and ChannelGroup::GetInterval().
auto Channel::GetInterval | ( | size_t | iInterval | ) | const -> std::enable_if_t<std::is_const_v<IntervalType>, std::shared_ptr<IntervalType>> |
!(iInterval < NIntervals()) || result
|
inline |
Get range of intervals with mutative access.
Definition at line 248 of file Channel.h.
Referenced by RepeatBase::Process().
|
inline |
Get range of intervals with read-only access.
|
inline |
Report the number of intervals.
Definition at line 540 of file Channel.h.
References GetChannelGroup(), and ChannelGroup::NIntervals().