Audacity  3.0.3
Dependencies.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4  Audacity(R) is copyright (c) 1999-2008 Audacity Team.
5  License: GPL v2. See License.txt.
6 
7  Dependencies.h
8 
9  Dominic Mazzoni
10  Vaughan Johnson
11 
12 **********************************************************************/
13 
14 #ifndef __AUDACITY_DEPENDENCIES__
15 #define __AUDACITY_DEPENDENCIES__
16 
17 #include <list>
18 #include "MemoryX.h"
19 #include "wxFileNameWrapper.h" // member variable
20 
21 class AudacityProject;
22 
24 {
25 public:
28  wxLongLong byteCount, bool bOriginalExists)
29  : mFileName(std::move(fileName))
30  , mByteCount(byteCount)
31  , mbOriginalExists(bOriginalExists)
32  {
33  }
34  AliasedFile(const AliasedFile &that) = default;
36  {
37  if(this != &that) {
38  mFileName = std::move(that.mFileName);
39  mByteCount = that.mByteCount;
40  mbOriginalExists = that.mbOriginalExists;
41  }
42  return *this;
43  }
44 
46  wxLongLong mByteCount{}; // if stored as current default sample format
48 };
49 
50 // use list, not vector, because we need to take addresses of items in the container
51 // before it has grown to full size.
52 using AliasedFileArray = std::list<AliasedFile>;
53 
54 
55 // Checks for alias block files, modifies the project if the
56 // user requests it, and returns True if the user continues.
57 // Returns false if the user clicks Cancel, meaning that they do
58 // not want to go ahead with the Save/Save As operation.
60  bool isSaving);
61 
62 // Returns a list of aliased files associated with a project.
63 void FindDependencies(AudacityProject *project,
64  AliasedFileArray &outAliasedFiles);
65 
66 #endif
wxFileNameWrapper.h
wxFileNameWrapper
Definition: wxFileNameWrapper.h:21
AliasedFile::operator=
AliasedFile & operator=(AliasedFile &&that)
Definition: Dependencies.h:35
AliasedFile::mbOriginalExists
bool mbOriginalExists
Definition: Dependencies.h:47
AliasedFile::AliasedFile
AliasedFile(wxFileNameWrapper &&fileName, wxLongLong byteCount, bool bOriginalExists)
Definition: Dependencies.h:27
AliasedFile::AliasedFile
AliasedFile()
Definition: Dependencies.h:26
FindDependencies
void FindDependencies(AudacityProject *project, AliasedFileArray &outAliasedFiles)
Definition: Dependencies.cpp:109
ShowDependencyDialogIfNeeded
bool ShowDependencyDialogIfNeeded(AudacityProject *project, bool isSaving)
Definition: Dependencies.cpp:602
AliasedFile::mFileName
wxFileNameWrapper mFileName
Definition: Dependencies.h:45
AliasedFileArray
std::list< AliasedFile > AliasedFileArray
Definition: Dependencies.h:52
AliasedFile
An audio file that is referenced (pointed into) directly from an Audacity .aup file rather than Audac...
Definition: Dependencies.h:24
AliasedFile::mByteCount
wxLongLong mByteCount
Definition: Dependencies.h:46
MemoryX.h
AliasedFile::AliasedFile
AliasedFile(const AliasedFile &that)=default
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92