Audacity  2.2.2
Public Member Functions | Protected Member Functions | List of all members
TrackListCondIterator Class Referenceabstract

#include <Track.h>

Inheritance diagram for TrackListCondIterator:
TrackListIterator TrackListOfKindIterator VisibleTrackIterator SelectedTrackListOfKindIterator

Public Member Functions

 TrackListCondIterator (TrackList *val=NULL)
 
virtual ~TrackListCondIterator ()
 
TrackFirst (TrackList *val=NULL) override
 
TrackStartWith (Track *val) override
 
TrackNext (bool skiplinked=false) override
 
TrackPrev (bool skiplinked=false) override
 
TrackLast (bool skiplinked=false) override
 
- Public Member Functions inherited from TrackListIterator
 TrackListIterator ()
 
 TrackListIterator (TrackList *val)
 
 TrackListIterator (TrackList *val, TrackNodePointer p)
 
 TrackListIterator (const TrackListIterator &)=default
 
TrackListIteratoroperator= (const TrackListIterator &)=default
 
virtual ~TrackListIterator ()
 
TrackRemoveCurrent ()
 
Trackoperator* () const
 
TrackListIteratoroperator++ ()
 
TrackListIterator operator++ (int)
 
bool operator== (const TrackListIterator &other) const
 
bool operator!= (const TrackListIterator &other) const
 

Protected Member Functions

virtual bool Condition (Track *t)=0
 

Additional Inherited Members

- Protected Attributes inherited from TrackListIterator
friend TrackList
 
TrackListl {}
 
TrackNodePointer cur {}
 

Detailed Description

Definition at line 497 of file Track.h.

Constructor & Destructor Documentation

TrackListCondIterator::TrackListCondIterator ( TrackList val = NULL)
inline

Definition at line 500 of file Track.h.

501  : TrackListIterator(val) {}
virtual TrackListCondIterator::~TrackListCondIterator ( )
inlinevirtual

Definition at line 502 of file Track.h.

502 {}

Member Function Documentation

virtual bool TrackListCondIterator::Condition ( Track t)
protectedpure virtual
Track * TrackListCondIterator::First ( TrackList val = NULL)
overridevirtual
Track * TrackListCondIterator::Last ( bool  skiplinked = false)
overridevirtual

Reimplemented from TrackListIterator.

Definition at line 592 of file Track.cpp.

References Condition(), TrackListIterator::Last(), and TrackListIterator::Prev().

Referenced by EffectTruncSilence::ProcessAll().

593 {
594  Track *t = TrackListIterator::Last(skiplinked);
595 
596  while (t && !this->Condition(t)) {
597  t = TrackListIterator::Prev(skiplinked);
598  }
599 
600  return t;
601 }
virtual Track * Prev(bool skiplinked=false)
Definition: Track.cpp:490
virtual bool Condition(Track *t)=0
Fundamental data object of Audacity, placed in the TrackPanel. Classes derived form it include the Wa...
Definition: Track.h:102
virtual Track * Last(bool skiplinked=false)
Definition: Track.cpp:437
Track * TrackListCondIterator::Next ( bool  skiplinked = false)
overridevirtual
Track * TrackListCondIterator::Prev ( bool  skiplinked = false)
overridevirtual

Reimplemented from TrackListIterator.

Definition at line 580 of file Track.cpp.

References Condition(), and TrackListIterator::Prev().

581 {
582  while (Track *t = TrackListIterator::Prev(skiplinked))
583  {
584  if (this->Condition(t)) {
585  return t;
586  }
587  }
588 
589  return NULL;
590 }
virtual Track * Prev(bool skiplinked=false)
Definition: Track.cpp:490
virtual bool Condition(Track *t)=0
Fundamental data object of Audacity, placed in the TrackPanel. Classes derived form it include the Wa...
Definition: Track.h:102
Track * TrackListCondIterator::StartWith ( Track val)
overridevirtual

Reimplemented from TrackListIterator.

Definition at line 548 of file Track.cpp.

References Condition(), and TrackListIterator::StartWith().

Referenced by EffectTruncSilence::FindSilences().

549 {
551 
552  if (t && !this->Condition(t))
553  return nullptr;
554 
555  return t;
556 }
virtual bool Condition(Track *t)=0
Fundamental data object of Audacity, placed in the TrackPanel. Classes derived form it include the Wa...
Definition: Track.h:102
virtual Track * StartWith(Track *val)
Definition: Track.cpp:401

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