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

183 {} )
184 : start{ start }, end{ end }, pExtra{ std::move( pExtra ) }
185 {
186 wxASSERT( start <= end );
187 }
double start
Definition: Track.h:197
std::unique_ptr< TrackIntervalData > pExtra
Definition: Track.h:200

◆ ConstTrackInterval() [2/2]

ConstTrackInterval::ConstTrackInterval ( ConstTrackInterval &&  )
default

Member Function Documentation

◆ End()

double ConstTrackInterval::End ( ) const
inline

Definition at line 193 of file Track.h.

193{ 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 194 of file Track.h.

194{ return pExtra.get(); }

References pExtra.

◆ operator=()

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

◆ Start()

double ConstTrackInterval::Start ( ) const
inline

Definition at line 192 of file Track.h.

192{ 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 197 of file Track.h.

Referenced by End().

◆ pExtra

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

Definition at line 200 of file Track.h.

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

◆ start

double ConstTrackInterval::start
private

Definition at line 197 of file Track.h.

Referenced by Start().


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