![]() |
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 |
size_t | ReallyGetChannelIndex () const |
Protected Member Functions | |
virtual ChannelGroup & | DoGetChannelGroup () const =0 |
Subclass must override. More... | |
virtual ChannelGroup & | ReallyDoGetChannelGroup () const |
This is temporary! It defaults to call the above. More... | |
Private Member Functions | |
int | FindChannelIndex () const |
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< NoteTrackBase >, and WaveTrack.
Referenced by FindChannelIndex(), GetChannelGroup(), WaveChannel::GetTrack(), ReallyDoGetChannelGroup(), and NoteTrack::Interval::WideChannelGroupInterval().
|
private |
Definition at line 34 of file Channel.cpp.
References DoGetChannelGroup().
Referenced by GetChannelGroup(), GetChannelIndex(), and NoteTrack::Interval::WideChannelGroupInterval().
ChannelGroup & Channel::GetChannelGroup | ( | ) |
Channel object's lifetime is assumed to be nested in its Track's.
Definition at line 71 of file Channel.cpp.
Referenced by ChannelView::Find(), TrackPanelResizerCell::Get(), ChannelView::Get(), anonymous_namespace{TrackPanel.cpp}::GetTrack(), TrackPanelResizeHandle::GetTrack(), and NIntervals().
const ChannelGroup & Channel::GetChannelGroup | ( | ) | const |
Channel object's lifetime is assumed to be nested in its Track's.
Definition at line 65 of file Channel.cpp.
References DoGetChannelGroup(), and FindChannelIndex().
size_t Channel::GetChannelIndex | ( | ) | const |
ii
such that this == GetChannelGroup().GetChannel(ii).get()
Definition at line 77 of file Channel.cpp.
References FindChannelIndex().
Referenced by ChannelView::Find(), TrackPanelResizerCell::Get(), and ChannelView::Get().
std::shared_ptr< IntervalType > Channel::GetInterval | ( | size_t | iInterval | ) |
Retrieve an interval, cast to the given type.
!(iInterval < NIntervals()) || result
Definition at line 614 of file Channel.h.
References ChannelGroup::GetInterval(), ReallyDoGetChannelGroup(), and ReallyGetChannelIndex().
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 269 of file Channel.h.
Referenced by EffectRepeat::Process().
|
inline |
Get range of intervals with read-only access.
|
inline |
Report the number of intervals.
Definition at line 608 of file Channel.h.
References GetChannelGroup(), and ChannelGroup::NIntervals().
|
protectedvirtual |
This is temporary! It defaults to call the above.
Reimplemented in WaveTrack.
Definition at line 82 of file Channel.cpp.
References DoGetChannelGroup().
Referenced by GetInterval(), and ReallyGetChannelIndex().
size_t Channel::ReallyGetChannelIndex | ( | ) | const |
Definition at line 52 of file Channel.cpp.
References ReallyDoGetChannelGroup().
Referenced by GetInterval().