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

196  {} )
197  : start{ start }, end{ end }, pExtra{ std::move( pExtra ) }
198  {
199  wxASSERT( start <= end );
200  }

◆ ConstTrackInterval() [2/2]

ConstTrackInterval::ConstTrackInterval ( ConstTrackInterval &&  )
default

Member Function Documentation

◆ End()

double ConstTrackInterval::End ( ) const
inline

Definition at line 206 of file Track.h.

206 { 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 207 of file Track.h.

207 { return pExtra.get(); }

References pExtra.

◆ operator=()

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

◆ Start()

double ConstTrackInterval::Start ( ) const
inline

Definition at line 205 of file Track.h.

205 { return start; }

References start.

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

Here is the caller graph for this function:

Member Data Documentation

◆ end

double ConstTrackInterval::end
private

Definition at line 210 of file Track.h.

Referenced by End().

◆ pExtra

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

Definition at line 213 of file Track.h.

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

◆ start

double ConstTrackInterval::start
private

Definition at line 210 of file Track.h.

Referenced by Start().


The documentation for this class was generated from the following file:
ConstTrackInterval::end
double end
Definition: Track.h:210
ConstTrackInterval::pExtra
std::unique_ptr< TrackIntervalData > pExtra
Definition: Track.h:213
ConstTrackInterval::start
double start
Definition: Track.h:210