![]() |
Audacity 3.2.0
|
Generates overrides of channel-related functions. More...
#include <Track.h>
Public Member Functions | |
size_t | NChannels () const override |
Report the number of channels. More... | |
std::shared_ptr< Channel > | DoGetChannel (size_t iChannel) override |
Retrieve a channel. More... | |
![]() | |
TrackId | GetId () const |
template<typename Subclass = Track> | |
std::shared_ptr< Subclass > | SharedPointer () |
template<typename Subclass = const Track> | |
auto | SharedPointer () const -> std::enable_if_t< std::is_const_v< Subclass >, std::shared_ptr< Subclass > > |
std::shared_ptr< Track > | SubstitutePendingChangedTrack () |
std::shared_ptr< const Track > | SubstitutePendingChangedTrack () const |
std::shared_ptr< const Track > | SubstituteOriginalTrack () const |
virtual const TypeInfo & | GetTypeInfo () const =0 |
virtual const TypeNames & | GetTypeNames () const |
virtual bool | SupportsBasicEditing () const |
Whether this track type implements cut-copy-paste; by default, true. More... | |
virtual Holder | PasteInto (AudacityProject &project, TrackList &list) const =0 |
virtual bool | LinkConsistencyFix (bool doFix=true) |
Check consistency of channel groups, and maybe fix it. More... | |
bool | LinkConsistencyCheck () |
Do the non-mutating part of consistency fix only and return status. More... | |
bool | HasOwner () const |
std::shared_ptr< TrackList > | GetOwner () const |
TrackList * | GetHolder () const |
LinkType | GetLinkType () const noexcept |
ChannelGroupData & | GetGroupData () |
const ChannelGroupData & | GetGroupData () const |
May make group data on demand, but consider that logically const. More... | |
Track () | |
Track (const Track &orig, ProtectedCreationArg &&) | |
Track & | operator= (const Track &orig)=delete |
virtual | ~Track () |
void | Init (const Track &orig) |
virtual TrackListHolder | Duplicate () const |
public nonvirtual duplication function that invokes Clone() More... | |
const wxString & | GetName () const |
Name is always the same for all channels of a group. More... | |
void | SetName (const wxString &n) |
bool | GetSelected () const |
Selectedness is always the same for all channels of a group. More... | |
virtual void | SetSelected (bool s) |
void | OnProjectTempoChange (double newTempo) |
method to set project tempo on track More... | |
virtual TrackListHolder | Cut (double t0, double t1)=0 |
Create tracks and modify this track. More... | |
virtual TrackListHolder | Copy (double t0, double t1, bool forClipboard=true) const =0 |
Create new tracks and don't modify this track. More... | |
virtual void | Clear (double t0, double t1)=0 |
virtual void | Paste (double t, const Track &src)=0 |
Weak precondition allows overrides to replicate one channel into many. More... | |
void | Paste (double t, const TrackList &src) |
virtual void | SyncLockAdjust (double oldT1, double newT1) |
virtual void | Silence (double t0, double t1, ProgressReporter reportProgress={})=0 |
virtual void | InsertSilence (double t, double len)=0 |
bool | SameKindAs (const Track &track) const |
template<typename R = void, typename ... Functions> | |
R | TypeSwitch (const Functions &...functions) |
template<typename R = void, typename ... Functions> | |
R | TypeSwitch (const Functions &...functions) const |
virtual void | WriteXML (XMLWriter &xmlFile) const =0 |
virtual std::optional< TranslatableString > | GetErrorOpening () const |
void | Notify (bool allChannels, int code=-1) |
bool | Any () const |
bool | IsSelected () const |
bool | IsLeader () const override |
bool | IsSelectedLeader () const |
void | AdjustPositions () |
void | WriteCommonXMLAttributes (XMLWriter &xmlFile, bool includeNameAndSelected=true) const |
bool | HandleCommonXMLAttribute (const std::string_view &attr, const XMLAttributeValueView &valueView) |
const std::optional< double > & | GetProjectTempo () const |
![]() | |
XMLTagHandler () | |
virtual | ~XMLTagHandler () |
virtual bool | HandleXMLTag (const std::string_view &tag, const AttributesList &attrs)=0 |
virtual void | HandleXMLEndTag (const std::string_view &WXUNUSED(tag)) |
virtual void | HandleXMLContent (const std::string_view &WXUNUSED(content)) |
virtual XMLTagHandler * | HandleXMLChild (const std::string_view &tag)=0 |
void | ReadXMLEndTag (const char *tag) |
void | ReadXMLContent (const char *s, int len) |
XMLTagHandler * | ReadXMLChild (const char *tag) |
![]() | |
~Site () | |
Site () | |
Site (const Site &other) | |
Site & | operator= (const Site &other) |
Site (Site &&other) | |
Site & | operator= (Site &&other) |
size_t | size () const |
How many attachment pointers are in the Site. More... | |
template<typename Subclass = ClientData> | |
Subclass & | Get (const RegisteredFactory &key) |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
template<typename Subclass = const ClientData> | |
auto | Get (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass & > |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
template<typename Subclass = ClientData> | |
Subclass * | Find (const RegisteredFactory &key) |
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
template<typename Subclass = const ClientData> | |
auto | Find (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass * > |
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
template<typename ReplacementPointer > | |
void | Assign (const RegisteredFactory &key, ReplacementPointer &&replacement) |
Reassign Site's pointer to ClientData. More... | |
![]() | |
virtual | ~ChannelGroup () |
double | GetStartTime () const |
Get the minimum of Start() values of intervals, or 0 when none. More... | |
double | GetEndTime () const |
Get the maximum of End() values of intervals, or 0 when none. More... | |
void | ShiftBy (double t) |
Change start time by given duration. More... | |
virtual void | MoveTo (double o)=0 |
Change start time to given time point. More... | |
virtual bool | IsLeader () const =0 |
ChannelGroupData & | GetGroupData () |
Make attachment site on demand as needed. More... | |
const ChannelGroupData & | GetGroupData () const |
ChannelGroupData * | FindGroupData () |
Do not make attachment site on demand if absent. More... | |
const ChannelGroupData * | FindGroupData () const |
Do not make attachment site on demand if absent. More... | |
void | Init (const ChannelGroup &other) |
Copy, including cloning of attached objects. More... | |
void | DestroyGroupData () |
Leave all attachments null. More... | |
std::unique_ptr< ChannelGroupData > | DetachGroupData () |
Move attachments out. More... | |
void | AssignGroupData (std::unique_ptr< ChannelGroupData > pGroupData) |
Replace any previous attachments. More... | |
template<typename ChannelType = Channel> | |
std::shared_ptr< ChannelType > | GetChannel (size_t iChannel) |
Retrieve a channel, cast to the given type. More... | |
template<typename ChannelType = const Channel> | |
auto | GetChannel (size_t iChannel) const -> std::enable_if_t< std::is_const_v< ChannelType >, std::shared_ptr< ChannelType > > |
template<typename ChannelType = Channel> | |
IteratorRange< ChannelIterator< ChannelType > > | Channels () |
Get range of channels with mutative access. More... | |
template<typename ChannelType = const Channel> | |
auto | Channels () const -> std::enable_if_t< std::is_const_v< ChannelType >, IteratorRange< ChannelIterator< ChannelType > > > |
Get range of channels with read-only access. More... | |
virtual size_t | NIntervals () const =0 |
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... | |
![]() | |
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 |
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... | |
Protected Member Functions | |
ChannelGroup & | DoGetChannelGroup () const override |
Subclass must override. More... | |
![]() | |
void | SetLinkType (LinkType linkType, bool completeList=true) |
virtual void | DoOnProjectTempoChange (const std::optional< double > &oldTempo, double newTempo)=0 |
![]() | |
template<typename Function > | |
void | ForEach (const Function &function) |
Invoke function on each ClientData object that has been created in this . More... | |
template<typename Function > | |
void | ForEach (const Function &function) const |
Invoke function on each ClientData object that has been created in this . More... | |
template<typename Function > | |
ClientData * | FindIf (const Function &function) |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
template<typename Function > | |
const ClientData * | FindIf (const Function &function) const |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
void | BuildAll () |
For each RegisteredFactory, if the corresponding attachment is absent in this , build and store it. More... | |
![]() | |
virtual std::shared_ptr< Channel > | DoGetChannel (size_t iChannel)=0 |
Retrieve a channel. More... | |
virtual std::shared_ptr< Interval > | DoGetInterval (size_t iInterval)=0 |
Retrieve an interval. More... | |
![]() | |
virtual ChannelGroup & | DoGetChannelGroup () const =0 |
Subclass must override. More... | |
virtual ChannelGroup & | ReallyDoGetChannelGroup () const |
This is temporary! It defaults to call the above. More... | |
Additional Inherited Members | |
![]() | |
using | AttachedObjects = ::AttachedTrackObjects |
Alias for my base type. More... | |
using | Holder = std::shared_ptr< Track > |
![]() | |
using | DataType = ClientData |
using | DataPointer = Pointer< ClientData > |
using | DataFactory = std::function< DataPointer(Host &) > |
Type of function from which RegisteredFactory is constructed; it builds attachments. More... | |
![]() | |
enum class | LinkType : int { None = 0 , Group = 2 , Aligned } |
For two tracks describes the type of the linkage. More... | |
using | Attachments = ClientData::Site< ChannelGroupData, ClientData::Cloneable<>, ClientData::DeepCopying > |
using | Interval = WideChannelGroupInterval |
![]() | |
using | Interval = ChannelInterval |
![]() | |
template<typename Subclass = Track> | |
static std::shared_ptr< Subclass > | SharedPointer (Track *pTrack) |
template<typename Subclass = const Track> | |
static std::shared_ptr< Subclass > | SharedPointer (const Track *pTrack) |
static const TypeInfo & | ClassTypeInfo () |
![]() | |
static size_t | numFactories () |
How many static factories have been registered with this specialization of Site. More... | |
![]() | |
std::weak_ptr< TrackList > | mList |
TrackNodePointer | mNode {} |
Holds iterator to self, so that TrackList::Find can be constant-time. More... | |
int | mIndex |
0-based position of this track in its TrackList More... | |
Generates overrides of channel-related functions.
|
inlineoverridevirtual |
Retrieve a channel.
!(iChannel < NChannels()) || result
Implements ChannelGroup.
Definition at line 494 of file Track.h.
References anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.
|
inlineoverrideprotectedvirtual |
Subclass must override.
ii
less than result.NChannels()
, this == result.GetChannel(ii).get()
Implements Channel.
Definition at line 504 of file Track.h.
|
inlineoverridevirtual |
Report the number of channels.
result >= 1
Implements ChannelGroup.
Definition at line 493 of file Track.h.