Audacity  2.2.2
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Effect::AddedAnalysisTrack Class Reference

#include <Effect.h>

Public Member Functions

 AddedAnalysisTrack ()
 
 AddedAnalysisTrack (AddedAnalysisTrack &&that)
 
LabelTrackget () const
 
void Commit ()
 
 ~AddedAnalysisTrack ()
 

Private Member Functions

 AddedAnalysisTrack (Effect *pEffect, const wxString &name)
 
 AddedAnalysisTrack (const AddedAnalysisTrack &) PROHIBITED
 

Private Attributes

friend Effect
 
EffectmpEffect {}
 
LabelTrackmpTrack {}
 

Detailed Description

Definition at line 375 of file Effect.h.

Constructor & Destructor Documentation

Effect::AddedAnalysisTrack::AddedAnalysisTrack ( Effect pEffect,
const wxString &  name 
)
private

Definition at line 2074 of file Effect.cpp.

References TrackList::Add(), Effect::mFactory, mpTrack, Effect::mTracks, TrackFactory::NewLabelTrack(), and Track::SetName().

2075  : mpEffect(pEffect)
2076 {
2077  LabelTrack::Holder pTrack{ pEffect->mFactory->NewLabelTrack() };
2078  mpTrack = pTrack.get();
2079  if (!name.empty())
2080  pTrack->SetName(name);
2081  pEffect->mTracks->Add(std::move(pTrack));
2082 }
std::unique_ptr< LabelTrack > Holder
Definition: LabelTrack.h:162
TrackList * mTracks
Definition: Effect.h:505
Track * Add(std::unique_ptr< TrackKind > &&t)
Add a Track, giving it a fresh id.
Definition: Track.cpp:906
LabelTrack * mpTrack
Definition: Effect.h:397
TrackFactory * mFactory
Definition: Effect.h:457
void SetName(const wxString &n)
Definition: Track.h:272
const wxChar * name
Definition: Distortion.cpp:94
std::unique_ptr< LabelTrack > NewLabelTrack()
Definition: LabelTrack.cpp:99
Effect::AddedAnalysisTrack::AddedAnalysisTrack ( const AddedAnalysisTrack )
private
Effect::AddedAnalysisTrack::AddedAnalysisTrack ( )
inline

Definition at line 382 of file Effect.h.

382 {}
Effect::AddedAnalysisTrack::AddedAnalysisTrack ( AddedAnalysisTrack &&  that)

Definition at line 2084 of file Effect.cpp.

2085 {
2086  mpEffect = that.mpEffect;
2087  mpTrack = that.mpTrack;
2088  that.Commit();
2089 }
LabelTrack * mpTrack
Definition: Effect.h:397
Effect::AddedAnalysisTrack::~AddedAnalysisTrack ( )

Definition at line 2096 of file Effect.cpp.

2097 {
2098  if (mpEffect) {
2099  // not committed -- DELETE the label track
2101  }
2102 }
TrackList * mTracks
Definition: Effect.h:505
LabelTrack * mpTrack
Definition: Effect.h:397
TrackNodePointer Remove(Track *t)
Definition: Track.cpp:985

Member Function Documentation

void Effect::AddedAnalysisTrack::Commit ( )

Definition at line 2091 of file Effect.cpp.

2092 {
2093  mpEffect = nullptr;
2094 }
LabelTrack* Effect::AddedAnalysisTrack::get ( ) const
inline

Definition at line 387 of file Effect.h.

387 { return mpTrack; }
LabelTrack * mpTrack
Definition: Effect.h:397

Member Data Documentation

friend Effect::AddedAnalysisTrack::Effect
private

Definition at line 376 of file Effect.h.

Effect* Effect::AddedAnalysisTrack::mpEffect {}
private

Definition at line 396 of file Effect.h.

LabelTrack* Effect::AddedAnalysisTrack::mpTrack {}
private

Definition at line 397 of file Effect.h.

Referenced by AddedAnalysisTrack().


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