Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
TrackId Class Reference

An in-session identifier of track objects across undo states. It does not persist between sessions. More...

#include <Track.h>

Public Member Functions

 TrackId ()
 
 TrackId (long value)
 
bool operator== (const TrackId &other) const
 
bool operator!= (const TrackId &other) const
 
bool operator< (const TrackId &other) const
 

Private Attributes

long mValue
 

Detailed Description

An in-session identifier of track objects across undo states. It does not persist between sessions.

Default constructed value is not equal to the id of any track that has ever been added to a TrackList, or (directly or transitively) copied from such. (A track added by TrackList::RegisterPendingNewTrack() that is not yet applied is not considered added.)

TrackIds are assigned uniquely across projects.

Definition at line 150 of file Track.h.

Constructor & Destructor Documentation

◆ TrackId() [1/2]

TrackId::TrackId ( )
inline

Definition at line 153 of file Track.h.

153: mValue(-1) {}
long mValue
Definition: Track.h:168

◆ TrackId() [2/2]

TrackId::TrackId ( long  value)
inlineexplicit

Definition at line 154 of file Track.h.

154: mValue(value) {}

Member Function Documentation

◆ operator!=()

bool TrackId::operator!= ( const TrackId other) const
inline

Definition at line 159 of file Track.h.

160 { return mValue != other.mValue; }

References mValue.

◆ operator<()

bool TrackId::operator< ( const TrackId other) const
inline

Definition at line 164 of file Track.h.

165 { return mValue < other.mValue; }

References mValue.

◆ operator==()

bool TrackId::operator== ( const TrackId other) const
inline

Definition at line 156 of file Track.h.

157 { return mValue == other.mValue; }

References mValue.

Member Data Documentation

◆ mValue

long TrackId::mValue
private

Definition at line 168 of file Track.h.

Referenced by operator!=(), operator<(), and operator==().


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