declares abstract base class Track, TrackList, and iterators over TrackList
More...
#include <algorithm>
#include <atomic>
#include <utility>
#include <list>
#include <optional>
#include <functional>
#include <wx/longlong.h>
#include "Channel.h"
#include "Observer.h"
#include "TrackAttachment.h"
#include "TypeEnumerator.h"
#include "TypeSwitch.h"
#include "XMLTagHandler.h"
Go to the source code of this file.
|
class | TrackId |
| An in-session identifier of track objects across undo states. It does not persist between sessions. More...
|
|
class | Track |
| Abstract base class for an object holding data associated with points on a time axis. More...
|
|
struct | Track::ProtectedCreationArg |
| Empty argument passed to some public constructors. More...
|
|
struct | Track::TypeNames |
| Names of a track type for various purposes. More...
|
|
struct | Track::TypeInfo |
|
class | UniqueChannelTrack< Base > |
| Generates overrides of channel-related functions. More...
|
|
class | ChannelAttachmentsBase |
| Holds multiple objects as a single attachment to Track. More...
|
|
class | ChannelAttachments< Attachment > |
| Holds multiple objects of the parameter type as a single attachment to Track. More...
|
|
class | TrackIter< TrackType > |
| Iterator over only members of a TrackList of the specified subtype, optionally filtered by a predicate; past-end value dereferenceable, to nullptr. More...
|
|
struct | TrackIterRange< TrackType > |
| Range between two TrackIters, usable in range-for statements, and with Visit member functions. More...
|
|
struct | TrackListEvent |
| Notification of changes in individual tracks of TrackList, or of TrackList's composition. More...
|
|
class | TrackList |
| A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list of tracks, event notifications. More...
|
|
declares abstract base class Track, TrackList, and iterators over TrackList
Audacity: A Digital Audio Editor
Dominic Mazzoni
Definition in file Track.h.
◆ ENUMERATE_TRACK_TYPE
Empty class which will have subclasses.
This macro should be called immediately after the definition of each Track subclass
It must occur at file scope, not within any other namespace
Definition at line 68 of file Track.h.
◆ AttachedTrackObjects
Template generated base class for Track lets it host opaque UI related objects.
Definition at line 113 of file Track.h.
◆ ListOfTracks
◆ ProgressReporter
◆ TrackArray
◆ TrackListHolder
◆ TrackNodePointer
Pairs a std::list iterator and a pointer to a list, for comparison purposes.
Compare owning lists first, and only if same, then the iterators; else MSVC debug runtime complains.
Definition at line 51 of file Track.h.
◆ ENUMERATE_TRACK_TYPE()
ENUMERATE_TRACK_TYPE |
( |
Track |
| ) |
|
◆ operator!=()
◆ operator==()
Definition at line 56 of file Track.h.
57{ return a.second == b.second && a.first == b.first; }
◆ track_cast() [1/2]
template<typename T >
std::enable_if_t< std::is_pointer_v< T > &&std::is_const_v< std::remove_pointer_t< T > >, T > track_cast |
( |
const Track * |
track | ) |
|
|
inline |
Encapsulate the checked down-casting of track pointers.
Eliminates possibility of error – and not quietly casting away const
Typical usage:
if (auto wt = track_cast<const WaveTrack*>(track)) { ... }
This overload for const pointers can cast only to other const pointer types.
Definition at line 631 of file Track.h.
632{
633 using BareType = std::remove_pointer_t< T >;
634 if (track &&
635 BareType::ClassTypeInfo().IsBaseOf(track->
GetTypeInfo() ))
636 return reinterpret_cast<T>(track);
637 else
638 return nullptr;
639}
virtual const TypeInfo & GetTypeInfo() const =0
◆ track_cast() [2/2]
template<typename T >
std::enable_if_t< std::is_pointer_v< T >, T > track_cast |
( |
Track * |
track | ) |
|
|
inline |
Encapsulate the checked down-casting of track pointers.
Eliminates possibility of error – and not quietly casting away const
Typical usage:
if (auto wt = track_cast<const WaveTrack*>(track)) { ... }
Definition at line 614 of file Track.h.
615{
616 using BareType = std::remove_pointer_t< T >;
617 if (track &&
618 BareType::ClassTypeInfo().IsBaseOf(track->
GetTypeInfo() ))
619 return reinterpret_cast<T>(track);
620 else
621 return nullptr;
622}