Audacity  2.2.0
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 <wx/filename.h>
19 #include "MemoryX.h"
20 #include "wxFileNameWrapper.h"
21 
22 class AudacityProject;
23 
25 {
26 public:
29  wxLongLong byteCount, bool bOriginalExists)
30  : mFileName(std::move(fileName))
31  , mByteCount(byteCount)
32  , mbOriginalExists(bOriginalExists)
33  {
34  }
35  AliasedFile(const AliasedFile &that) = default;
37  {
38  if(this != &that) {
39  mFileName = std::move(that.mFileName);
40  mByteCount = that.mByteCount;
41  mbOriginalExists = that.mbOriginalExists;
42  }
43  return *this;
44  }
45 
47  wxLongLong mByteCount{}; // if stored as current default sample format
49 };
50 
51 // use list, not vector, because we need to take addresses of items in the container
52 // before it has grown to full size.
53 using AliasedFileArray = std::list<AliasedFile>;
54 
55 
56 // Checks for alias block files, modifies the project if the
57 // user requests it, and returns True if the user continues.
58 // Returns false if the user clicks Cancel, meaning that they do
59 // not want to go ahead with the Save/Save As operation.
61  bool isSaving);
62 
63 // Returns a list of aliased files associated with a project.
64 void FindDependencies(AudacityProject *project,
65  AliasedFileArray &outAliasedFiles);
66 
67 #endif
bool mbOriginalExists
Definition: Dependencies.h:48
AliasedFile()
Definition: Dependencies.h:27
Definition: wxFileNameWrapper.h:16
AudacityProject provides the main window, with tools and tracks contained within it.
Definition: Project.h:161
void FindDependencies(AudacityProject *project, AliasedFileArray &outAliasedFiles)
Definition: Dependencies.cpp:98
wxLongLong mByteCount
Definition: Dependencies.h:47
bool ShowDependencyDialogIfNeeded(AudacityProject *project, bool isSaving)
Definition: Dependencies.cpp:538
wxFileNameWrapper mFileName
Definition: Dependencies.h:46
std::list< AliasedFile > AliasedFileArray
Definition: Dependencies.h:53
AliasedFile(wxFileNameWrapper &&fileName, wxLongLong byteCount, bool bOriginalExists)
Definition: Dependencies.h:28
AliasedFile & operator=(AliasedFile &&that)
Definition: Dependencies.h:36
Definition: Dependencies.h:24