Audacity 3.2.0
Public Member Functions | Public Attributes | List of all members
LabelTrack::Interval Struct Referencefinal

#include <LabelTrack.h>

Inheritance diagram for LabelTrack::Interval:
Collaboration diagram for LabelTrack::Interval:

Public Member Functions

 Interval (const ChannelGroup &group, double start, double end, size_t index)
 ~Interval () override
std::shared_ptr< ChannelIntervalDoGetChannel (size_t iChannel) override
 Retrieve a channel. More...
- Public Member Functions inherited from WideChannelGroupInterval
 WideChannelGroupInterval (const ChannelGroup &group, double start, double end)
 ~WideChannelGroupInterval () override
size_t NChannels () const
 Report the number of channels. More...
template<typename IntervalType = ChannelInterval>
std::shared_ptr< IntervalType > GetChannel (size_t iChannel)
 Retrieve a channel, cast to the given type. More...
template<typename IntervalType = const ChannelInterval>
auto GetChannel (size_t iChannel) const -> std::enable_if_t< std::is_const_v< IntervalType >, std::shared_ptr< IntervalType > >
template<typename IntervalType = ChannelInterval>
IteratorRange< ChannelIterator< IntervalType > > Channels ()
 Get range of ChannelInterval objects with mutative access. More...
template<typename IntervalType = const ChannelInterval>
auto Channels () const -> std::enable_if_t< std::is_const_v< IntervalType >, IteratorRange< ChannelIterator< IntervalType > > >
 Get range of channels with read-only access. More...
- Public Member Functions inherited from ChannelGroupInterval
 ChannelGroupInterval (double start, double end)
virtual ~ChannelGroupInterval ()
double Start () const
double End () const

Public Attributes

size_t index

Additional Inherited Members

virtual std::shared_ptr< ChannelIntervalDoGetChannel (size_t iChannel)=0
 Retrieve a channel. More...

Detailed Description

Definition at line 180 of file LabelTrack.h.

Constructor & Destructor Documentation

◆ Interval()

LabelTrack::Interval::Interval ( const ChannelGroup group,
double  start,
double  end,
size_t  index 

Definition at line 181 of file LabelTrack.h.

183 : WideChannelGroupInterval{ group, start, end }
184 , index{ index }
185 {}
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159

◆ ~Interval()

LabelTrack::Interval::~Interval ( )

Member Function Documentation

◆ DoGetChannel()

std::shared_ptr< ChannelInterval > LabelTrack::Interval::DoGetChannel ( size_t  iChannel)

Retrieve a channel.

result: !(iChannel < NChannels()) || result

Implements WideChannelGroupInterval.

Definition at line 51 of file LabelTrack.cpp.

53 if (iChannel == 0)
54 return std::make_shared<ChannelInterval>();
55 return {};

References anonymous_namespace{StretchingSequenceIntegrationTest.cpp}::iChannel.

Member Data Documentation

◆ index

size_t LabelTrack::Interval::index

Definition at line 190 of file LabelTrack.h.

The documentation for this struct was generated from the following files: