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

A start and an end time, and non-mutative access to optional extra information. More...

#include <Track.h>

Inheritance diagram for ConstTrackInterval:
[legend]
Collaboration diagram for ConstTrackInterval:
[legend]

Public Member Functions

 ConstTrackInterval (double start, double end, std::unique_ptr< TrackIntervalData > pExtra={})
 
 ConstTrackInterval (ConstTrackInterval &&)=default
 
ConstTrackIntervaloperator= (ConstTrackInterval &&)=default
 
double Start () const
 
double End () const
 
const TrackIntervalDataExtra () const
 

Protected Attributes

std::unique_ptr< TrackIntervalDatapExtra
 

Private Attributes

double start
 
double end
 

Detailed Description

A start and an end time, and non-mutative access to optional extra information.

Invariant
Start() <= End()

Definition at line 117 of file Track.h.

Constructor & Destructor Documentation

◆ ConstTrackInterval() [1/2]

ConstTrackInterval::ConstTrackInterval ( double  start,
double  end,
std::unique_ptr< TrackIntervalData pExtra = {} 
)
inline
Precondition
start <= end

Definition at line 121 of file Track.h.

122 {} )
123 : start{ start }, end{ end }, pExtra{ std::move( pExtra ) }
124 {
125 wxASSERT( start <= end );
126 }
double start
Definition: Track.h:136
std::unique_ptr< TrackIntervalData > pExtra
Definition: Track.h:139

◆ ConstTrackInterval() [2/2]

ConstTrackInterval::ConstTrackInterval ( ConstTrackInterval &&  )
default

Member Function Documentation

◆ End()

double ConstTrackInterval::End ( ) const
inline

Definition at line 132 of file Track.h.

132{ return end; }

References end.

Referenced by TrackShifter::CommonSelectInterval(), and WaveTrackShifter::SelectInterval().

Here is the caller graph for this function:

◆ Extra()

const TrackIntervalData * ConstTrackInterval::Extra ( ) const
inline

Definition at line 133 of file Track.h.

133{ return pExtra.get(); }

References pExtra.

◆ operator=()

ConstTrackInterval & ConstTrackInterval::operator= ( ConstTrackInterval &&  )
default

◆ Start()

double ConstTrackInterval::Start ( ) const
inline

Definition at line 131 of file Track.h.

131{ return start; }

References start.

Referenced by anonymous_namespace{TimeShiftHandle.cpp}::AdjustToSnap(), TrackShifter::CommonSelectInterval(), LabelTrackShifter::Detach(), and WaveTrackShifter::SelectInterval().

Here is the caller graph for this function:

Member Data Documentation

◆ end

double ConstTrackInterval::end
private

Definition at line 136 of file Track.h.

Referenced by End().

◆ pExtra

std::unique_ptr< TrackIntervalData > ConstTrackInterval::pExtra
protected

Definition at line 139 of file Track.h.

Referenced by Extra(), and TrackInterval::Extra().

◆ start

double ConstTrackInterval::start
private

Definition at line 136 of file Track.h.

Referenced by Start().


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