Audacity 3.2.0
Public Member Functions | Private Attributes | List of all members
ProjectFileIO::TentativeConnection Struct Reference

#include <ProjectFileIO.h>

Collaboration diagram for ProjectFileIO::TentativeConnection:
[legend]

Public Member Functions

 TentativeConnection (ProjectFileIO &projectFileIO)
 
 TentativeConnection (const TentativeConnection &other)=delete
 
 TentativeConnection (TentativeConnection &&other)
 
 ~TentativeConnection ()
 
void SetFileName (const FilePath &fileName)
 
void Commit ()
 

Private Attributes

ProjectFileIOmProjectFileIO
 
FilePath mFileName
 
bool mCommitted { false }
 

Detailed Description

Represents a change in the association between in-memory project and project file, which may be committed or abandoned

Definition at line 70 of file ProjectFileIO.h.

Constructor & Destructor Documentation

◆ TentativeConnection() [1/3]

ProjectFileIO::TentativeConnection::TentativeConnection ( ProjectFileIO projectFileIO)

Definition at line 1991 of file ProjectFileIO.cpp.

1993 : mProjectFileIO{ projectFileIO }
1994{
1996}

References mProjectFileIO, and ProjectFileIO::SaveConnection().

Here is the call graph for this function:

◆ TentativeConnection() [2/3]

ProjectFileIO::TentativeConnection::TentativeConnection ( const TentativeConnection other)
delete

◆ TentativeConnection() [3/3]

ProjectFileIO::TentativeConnection::TentativeConnection ( TentativeConnection &&  other)

Definition at line 1998 of file ProjectFileIO.cpp.

2000 : mProjectFileIO{ other.mProjectFileIO }
2001 , mFileName{ other.mFileName }
2002 , mCommitted{ other.mCommitted }
2003{
2004 other.mCommitted = true;
2005}

◆ ~TentativeConnection()

ProjectFileIO::TentativeConnection::~TentativeConnection ( )

Definition at line 2007 of file ProjectFileIO.cpp.

2008{
2009 if (!mCommitted)
2011}
void RestoreConnection()

Member Function Documentation

◆ Commit()

void ProjectFileIO::TentativeConnection::Commit ( )

Definition at line 2018 of file ProjectFileIO.cpp.

2019{
2020 if (!mCommitted && !mFileName.empty()) {
2023 mCommitted = true;
2024 }
2025}
void DiscardConnection()
void SetFileName(const FilePath &fileName)

References ProjectFileIO::mFileName.

◆ SetFileName()

void ProjectFileIO::TentativeConnection::SetFileName ( const FilePath fileName)

Definition at line 2013 of file ProjectFileIO.cpp.

2014{
2015 mFileName = fileName;
2016}

References ProjectFileIO::mFileName.

Member Data Documentation

◆ mCommitted

bool ProjectFileIO::TentativeConnection::mCommitted { false }
private

Definition at line 80 of file ProjectFileIO.h.

◆ mFileName

FilePath ProjectFileIO::TentativeConnection::mFileName
private

Definition at line 79 of file ProjectFileIO.h.

◆ mProjectFileIO

ProjectFileIO& ProjectFileIO::TentativeConnection::mProjectFileIO
private

Definition at line 78 of file ProjectFileIO.h.

Referenced by TentativeConnection().


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