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 164 of file Track.h.

Constructor & Destructor Documentation

◆ TrackId() [1/2]

TrackId::TrackId ( )
inline

Definition at line 167 of file Track.h.

167 : mValue(-1) {}

◆ TrackId() [2/2]

TrackId::TrackId ( long  value)
inlineexplicit

Definition at line 168 of file Track.h.

168 : mValue(value) {}

Member Function Documentation

◆ operator!=()

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

Definition at line 173 of file Track.h.

174  { return mValue != other.mValue; }

References mValue.

◆ operator<()

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

Definition at line 178 of file Track.h.

179  { return mValue < other.mValue; }

References mValue.

◆ operator==()

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

Definition at line 170 of file Track.h.

171  { return mValue == other.mValue; }

References mValue.

Member Data Documentation

◆ mValue

long TrackId::mValue
private

Definition at line 182 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:182