Audacity  2.2.2
Public Member Functions | Public Attributes | List of all members
BlockFile::GetFileNameResult Struct Reference

#include <BlockFile.h>

Public Member Functions

 GetFileNameResult (const wxFileName &name_, ODLocker &&locker=ODLocker{})
 GetFileNameResult (const GetFileNameResult &) PROHIBITED
GetFileNameResultoperator= (const GetFileNameResult &) PROHIBITED
 GetFileNameResult (GetFileNameResult &&that)

Public Attributes

const wxFileName & name
ODLocker mLocker

Detailed Description

Gets the filename of the disk file associated with this BlockFile (can be empty – some BlockFiles, like SilentBlockFile, correspond to no file on disk) Avoids copying wxFileName by returning a reference, but for some subclasses of BlockFile, you must exclude other threads from changing the name so long as you have only a reference. Thus, this wrapper object that guarantees release of any lock when it goes out of scope. Call mLocker.reset() to unlock it sooner.

Definition at line 98 of file BlockFile.h.

Constructor & Destructor Documentation

BlockFile::GetFileNameResult::GetFileNameResult ( const wxFileName &  name_,
ODLocker &&  locker = ODLocker{} 

Definition at line 102 of file BlockFile.h.

102  {})
103  : name{ name_ }, mLocker{ std::move(locker) } {}
const wxFileName & name
Definition: BlockFile.h:99
BlockFile::GetFileNameResult::GetFileNameResult ( const GetFileNameResult )
BlockFile::GetFileNameResult::GetFileNameResult ( GetFileNameResult &&  that)

Definition at line 108 of file BlockFile.h.

109  : name{ }, mLocker{ std::move(that.mLocker) } {}
const wxFileName & name
Definition: BlockFile.h:99

Member Function Documentation

GetFileNameResult& BlockFile::GetFileNameResult::operator= ( const GetFileNameResult )

Member Data Documentation

ODLocker BlockFile::GetFileNameResult::mLocker

Definition at line 100 of file BlockFile.h.

const wxFileName& BlockFile::GetFileNameResult::name

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