Audacity 3.2.0
|
The top-level handle to an Audacity project. It serves as a source of events that other objects can bind to, and a container of associated sub-objects that it treats opaquely. It stores a filename and a status message and a few other things. There is very little in this class, most of the intelligence residing in the cooperating attached objects. More...
#include <Project.h>
Classes | |
struct | CreateToken |
Public Types | |
using | AttachedObjects = ::AttachedProjectObjects |
Public Types inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
using | DataType = ClientData |
using | DataPointer = Pointer< ClientData > |
using | DataFactory = std::function< DataPointer(Host &) > |
Type of function from which RegisteredFactory is constructed; it builds attachments. More... | |
Public Member Functions | |
AudacityProject (CreateToken) | |
Don't use this constructor directly. More... | |
virtual | ~AudacityProject () |
int | GetProjectNumber () |
const wxString & | GetProjectName () const |
void | SetProjectName (const wxString &name) |
FilePath | GetInitialImportPath () const |
void | SetInitialImportPath (const FilePath &path) |
Public Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
~Site () | |
Site () | |
Site (const Site &other) | |
Site & | operator= (const Site &other) |
Site (Site &&other) | |
Site & | operator= (Site &&other) |
size_t | size () const |
How many attachment pointers are in the Site. More... | |
template<typename Subclass = ClientData> | |
Subclass & | Get (const RegisteredFactory &key) |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
template<typename Subclass = const ClientData> | |
auto | Get (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass & > |
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More... | |
template<typename Subclass = ClientData> | |
Subclass * | Find (const RegisteredFactory &key) |
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
template<typename Subclass = const ClientData> | |
auto | Find (const RegisteredFactory &key) const -> std::enable_if_t< std::is_const< Subclass >::value, Subclass * > |
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More... | |
template<typename ReplacementPointer > | |
void | Assign (const RegisteredFactory &key, ReplacementPointer &&replacement) |
Reassign Site's pointer to ClientData. More... | |
Static Public Member Functions | |
static std::shared_ptr< AudacityProject > | Create () |
Use this factory function. More... | |
Static Public Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
static size_t | numFactories () |
How many static factories have been registered with this specialization of Site. More... | |
Public Attributes | |
bool | mbBusyImporting { false } |
int | mBatchMode { 0 } |
Private Attributes | |
wxString | mName |
int | mProjectNo |
FilePath | mInitialImportPath |
Static Private Attributes | |
static int | mProjectCounter =0 |
Additional Inherited Members | |
Protected Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy > | |
template<typename Function > | |
void | ForEach (const Function &function) |
Invoke function on each ClientData object that has been created in this . More... | |
template<typename Function > | |
void | ForEach (const Function &function) const |
Invoke function on each ClientData object that has been created in this . More... | |
template<typename Function > | |
void | ForCorresponding (Site &other, const Function &function, bool create=true) |
template<typename Function > | |
ClientData * | FindIf (const Function &function) |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
template<typename Function > | |
const ClientData * | FindIf (const Function &function) const |
Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More... | |
template<typename Function > | |
void | EraseIf (const Function &function) |
Erase attached objects satisfying a predicate. More... | |
void | BuildAll () |
For each RegisteredFactory, if the corresponding attachment is absent in this , build and store it. More... | |
The top-level handle to an Audacity project. It serves as a source of events that other objects can bind to, and a container of associated sub-objects that it treats opaquely. It stores a filename and a status message and a few other things. There is very little in this class, most of the intelligence residing in the cooperating attached objects.
AudacityProject::AudacityProject | ( | CreateToken | ) |
Don't use this constructor directly.
Definition at line 91 of file Project.cpp.
References mProjectCounter, and mProjectNo.
|
virtual |
Definition at line 96 of file Project.cpp.
|
static |
Use this factory function.
Definition at line 78 of file Project.cpp.
Referenced by ProjectManager::New(), and TEST_CASE().
FilePath AudacityProject::GetInitialImportPath | ( | ) | const |
const wxString & AudacityProject::GetProjectName | ( | ) | const |
Definition at line 100 of file Project.cpp.
References mName.
Referenced by audacity::cloud::audiocom::ShareAudioDialog::Populate(), and MixerBoardFrame::SetWindowTitle().
void AudacityProject::SetInitialImportPath | ( | const FilePath & | path | ) |
Definition at line 115 of file Project.cpp.
References mInitialImportPath.
void AudacityProject::SetProjectName | ( | const wxString & | name | ) |
Definition at line 105 of file Project.cpp.
bool AudacityProject::mbBusyImporting { false } |
Definition at line 130 of file Project.h.
Referenced by Importer::Import().
|
private |
Definition at line 127 of file Project.h.
Referenced by GetInitialImportPath(), and SetInitialImportPath().
|
private |
Definition at line 122 of file Project.h.
Referenced by GetProjectName(), and SetProjectName().
|
staticprivate |
Definition at line 124 of file Project.h.
Referenced by AudacityProject().
|
private |
Definition at line 125 of file Project.h.
Referenced by AudacityProject().