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 1994 of file ProjectFileIO.cpp.

1996 : mProjectFileIO{ projectFileIO }
1997{
1999}

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 2001 of file ProjectFileIO.cpp.

2003 : mProjectFileIO{ other.mProjectFileIO }
2004 , mFileName{ other.mFileName }
2005 , mCommitted{ other.mCommitted }
2006{
2007 other.mCommitted = true;
2008}

◆ ~TentativeConnection()

ProjectFileIO::TentativeConnection::~TentativeConnection ( )

Definition at line 2010 of file ProjectFileIO.cpp.

2011{
2012 if (!mCommitted)
2014}
void RestoreConnection()

Member Function Documentation

◆ Commit()

void ProjectFileIO::TentativeConnection::Commit ( )

Definition at line 2021 of file ProjectFileIO.cpp.

2022{
2023 if (!mCommitted && !mFileName.empty()) {
2026 mCommitted = true;
2027 }
2028}
void DiscardConnection()
void SetFileName(const FilePath &fileName)

References ProjectFileIO::mFileName.

◆ SetFileName()

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

Definition at line 2016 of file ProjectFileIO.cpp.

2017{
2018 mFileName = fileName;
2019}

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: