Audacity 3.2.0
Classes | Macros | Functions | Variables
ProjectFileIO.cpp File Reference
#include "ProjectFileIO.h"
#include <atomic>
#include <sqlite3.h>
#include <optional>
#include <cstring>
#include <wx/crt.h>
#include <wx/log.h>
#include <wx/sstream.h>
#include <wx/utils.h>
#include "ActiveProjects.h"
#include "CodeConversions.h"
#include "DBConnection.h"
#include "FileNames.h"
#include "Project.h"
#include "ProjectHistory.h"
#include "ProjectSerializer.h"
#include "SampleBlock.h"
#include "TempDirectory.h"
#include "TransactionScope.h"
#include "WaveTrack.h"
#include "BasicUI.h"
#include "wxFileNameWrapper.h"
#include "XMLFileReader.h"
#include "SentryHelper.h"
#include "MemoryX.h"
#include "ProjectFormatExtensionsRegistry.h"
#include "BufferedStreamReader.h"
#include "FromChars.h"
Include dependency graph for ProjectFileIO.cpp:

Go to the source code of this file.


class  SQLiteIniter
class  SQLiteBlobStream
class  BufferedProjectBlobStream


#define PACK(b1, b2, b3, b4)   ((b1 << 24) | (b2 << 16) | (b3 << 8) | b4)


static int ExecCallback (void *data, int cols, char **vals, char **names)


static const int ProjectFileID = PACK('A', 'U', 'D', 'Y')
static const char * ProjectFileSchema
static const AudacityProject::AttachedObjects::RegisteredFactory sFileIOKey
static ProjectHistory::AutoSave::Scope scope
 Install the callback from undo manager. More...

Macro Definition Documentation



Definition at line 48 of file ProjectFileIO.cpp.


#define PACK (   b1,
)    ((b1 << 24) | (b2 << 16) | (b3 << 8) | b4)

Definition at line 60 of file ProjectFileIO.cpp.

Function Documentation

◆ ExecCallback()

static int ExecCallback ( void *  data,
int  cols,
char **  vals,
char **  names 

Definition at line 678 of file ProjectFileIO.cpp.

680 auto &cb = *static_cast<const ProjectFileIO::ExecCB *>(data);
681 // Be careful not to throw anything across sqlite3's stack frames.
682 return GuardedCall<int>(
683 [&]{ return cb(cols, vals, names); },
684 MakeSimpleGuard( 1 )
685 );
SimpleGuard< R > MakeSimpleGuard(R value) noexcept(noexcept(SimpleGuard< R >{ value }))
Convert a value to a handler function returning that value, suitable for GuardedCall<R>
static TranslatableStrings names
Definition: TagsEditor.cpp:153
std::function< int(int cols, char **vals, char **names)> ExecCB

References MakeSimpleGuard(), and names.

Referenced by ProjectFileIO::Exec().

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

Variable Documentation

◆ ProjectFileID

const int ProjectFileID = PACK('A', 'U', 'D', 'Y')

Definition at line 65 of file ProjectFileIO.cpp.

Referenced by ProjectFileIO::CheckVersion(), and ProjectFileIO::InstallSchema().

◆ ProjectFileSchema

const char* ProjectFileSchema

Definition at line 91 of file ProjectFileIO.cpp.

Referenced by ProjectFileIO::InstallSchema().

◆ scope

Initial value:
auto &projectFileIO = ProjectFileIO::Get(project);
if ( !projectFileIO.AutoSave() )
XO("Automatic database backup failed."),
} }
@ Internal
Indicates internal failure from Audacity.
const auto project
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
static ProjectFileIO & Get(AudacityProject &project)
A MessageBoxException that shows a given, unvarying string.

Install the callback from undo manager.

Definition at line 2671 of file ProjectFileIO.cpp.

◆ sFileIOKey

Initial value:
[]( AudacityProject &parent ){
auto result = std::make_shared< ProjectFileIO >( parent );
return result;

Definition at line 426 of file ProjectFileIO.cpp.

Referenced by ProjectFileIO::Get().