Audacity  3.0.3
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 163 of file Track.h.

Constructor & Destructor Documentation

◆ TrackId() [1/2]

TrackId::TrackId ( )
inline

Definition at line 166 of file Track.h.

166 : mValue(-1) {}

◆ TrackId() [2/2]

TrackId::TrackId ( long  value)
inlineexplicit

Definition at line 167 of file Track.h.

167 : mValue(value) {}

Member Function Documentation

◆ operator!=()

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

Definition at line 172 of file Track.h.

173  { return mValue != other.mValue; }

References mValue.

◆ operator<()

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

Definition at line 177 of file Track.h.

178  { return mValue < other.mValue; }

References mValue.

◆ operator==()

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

Definition at line 169 of file Track.h.

170  { return mValue == other.mValue; }

References mValue.

Member Data Documentation

◆ mValue

long TrackId::mValue
private

Definition at line 181 of file Track.h.

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


The documentation for this class was generated from the following file:
TrackId::mValue
long mValue
Definition: Track.h:181