Audacity 3.2.0
Classes | Static Public Member Functions | List of all members
ProjectFileIOExtensionRegistry Struct Referencefinal

Extension registry for project file I/O extensions. More...

#include <ProjectFileIOExtension.h>

Classes

struct  Extension
 

Static Public Member Functions

static OnOpenAction OnOpen (AudacityProject &project, const std::string &path)
 
static void OnLoad (AudacityProject &project)
 
static OnSaveAction OnSave (AudacityProject &project, const ProjectSaveCallback &projectSaveCallback)
 
static OnCloseAction OnClose (AudacityProject &project)
 
static void OnUpdateSaved (AudacityProject &project, const ProjectSerializer &serializer)
 
static bool IsBlockLocked (const AudacityProject &project, int64_t blockId)
 

Detailed Description

Extension registry for project file I/O extensions.

Definition at line 78 of file ProjectFileIOExtension.h.

Member Function Documentation

◆ IsBlockLocked()

bool ProjectFileIOExtensionRegistry::IsBlockLocked ( const AudacityProject project,
int64_t  blockId 
)
static

Definition at line 79 of file ProjectFileIOExtension.cpp.

81{
82 for (auto& extension : GetExtensions())
83 {
84 if (extension->IsBlockLocked(project, blockId))
85 return true;
86 }
87
88 return false;
89}
const auto project
std::vector< ProjectFileIOExtension * > & GetExtensions()

References anonymous_namespace{CloudProjectFileIOExtensions.cpp}::extension, anonymous_namespace{ProjectFileIOExtension.cpp}::GetExtensions(), and project.

Referenced by ProjectFileIO::InSet().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnClose()

OnCloseAction ProjectFileIOExtensionRegistry::OnClose ( AudacityProject project)
static

Definition at line 61 of file ProjectFileIOExtension.cpp.

62{
63 for (auto& extension : GetExtensions())
64 {
65 if (extension->OnClose(project) == OnCloseAction::Veto)
67 }
68
70}
@ Veto
Extension vetoed the close.
@ Continue
Extension did not veto the close.

References Continue, anonymous_namespace{CloudProjectFileIOExtensions.cpp}::extension, anonymous_namespace{ProjectFileIOExtension.cpp}::GetExtensions(), project, and Veto.

Referenced by ProjectManager::OnCloseWindow(), and ProjectFileManager::SaveAs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnLoad()

void ProjectFileIOExtensionRegistry::OnLoad ( AudacityProject project)
static

Definition at line 42 of file ProjectFileIOExtension.cpp.

43{
44 for (auto& extension : GetExtensions())
45 extension->OnLoad(project);
46}

References anonymous_namespace{CloudProjectFileIOExtensions.cpp}::extension, anonymous_namespace{ProjectFileIOExtension.cpp}::GetExtensions(), and project.

Referenced by ProjectFileManager::ReadProjectFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnOpen()

OnOpenAction ProjectFileIOExtensionRegistry::OnOpen ( AudacityProject project,
const std::string &  path 
)
static

Definition at line 32 of file ProjectFileIOExtension.cpp.

34{
35 for (auto& extension : GetExtensions())
36 if (extension->OnOpen(project, path) == OnOpenAction::Cancel)
38
40}
@ Continue
ProjectManager should continue with the open.
@ Cancel
Open was cancelled by the extension.

References Cancel, Continue, anonymous_namespace{CloudProjectFileIOExtensions.cpp}::extension, anonymous_namespace{ProjectFileIOExtension.cpp}::GetExtensions(), and project.

Referenced by ProjectFileManager::OpenProjectFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnSave()

OnSaveAction ProjectFileIOExtensionRegistry::OnSave ( AudacityProject project,
const ProjectSaveCallback projectSaveCallback 
)
static

Definition at line 48 of file ProjectFileIOExtension.cpp.

50{
51 for (auto& extension : GetExtensions())
52 {
53 if (auto action = extension->OnSave(project, projectSaveCallback);
54 action != OnSaveAction::Continue)
55 return action;
56 }
57
59}
@ Continue
Save was not handled by the extension.

References Continue, anonymous_namespace{CloudProjectFileIOExtensions.cpp}::extension, anonymous_namespace{ProjectFileIOExtension.cpp}::GetExtensions(), and project.

Referenced by ProjectFileManager::Save().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnUpdateSaved()

void ProjectFileIOExtensionRegistry::OnUpdateSaved ( AudacityProject project,
const ProjectSerializer serializer 
)
static

Definition at line 72 of file ProjectFileIOExtension.cpp.

74{
75 for (auto& extension : GetExtensions())
76 extension->OnUpdateSaved(project, serializer);
77}

References anonymous_namespace{CloudProjectFileIOExtensions.cpp}::extension, anonymous_namespace{ProjectFileIOExtension.cpp}::GetExtensions(), and project.

Referenced by ProjectFileIO::UpdateSaved().

Here is the call graph for this function:
Here is the caller graph for this function:

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