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

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

◆ ConstTrackInterval() [2/2]

ConstTrackInterval::ConstTrackInterval ( ConstTrackInterval &&  )
default

Member Function Documentation

◆ End()

double ConstTrackInterval::End ( ) const
inline

Definition at line 194 of file Track.h.

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

195{ return pExtra.get(); }

References pExtra.

◆ operator=()

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

◆ Start()

double ConstTrackInterval::Start ( ) const
inline

Definition at line 193 of file Track.h.

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

Referenced by End().

◆ pExtra

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

Definition at line 201 of file Track.h.

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

◆ start

double ConstTrackInterval::start
private

Definition at line 198 of file Track.h.

Referenced by Start().


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