Audacity  3.0.3
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ConnectionPtr Class Referencefinal

#include <DBConnection.h>

Inheritance diagram for ConnectionPtr:
[legend]
Collaboration diagram for ConnectionPtr:
[legend]

Public Member Functions

 ~ConnectionPtr () override
 
- Public Member Functions inherited from ClientData::Base
virtual ~Base ()
 

Static Public Member Functions

static ConnectionPtrGet (AudacityProject &project)
 
static const ConnectionPtrGet (const AudacityProject &project)
 

Public Attributes

Connection mpConnection
 

Detailed Description

Definition at line 159 of file DBConnection.h.

Constructor & Destructor Documentation

◆ ~ConnectionPtr()

ConnectionPtr::~ConnectionPtr ( )
override

Definition at line 674 of file DBConnection.cpp.

675 {
676  wxASSERT_MSG(!mpConnection, wxT("Project file was not closed at shutdown"));
677  if (mpConnection)
678  {
679  wxLogMessage("Project file was not closed at connection destruction");
680  }
681 }

References mpConnection.

Member Function Documentation

◆ Get() [1/2]

ConnectionPtr & ConnectionPtr::Get ( AudacityProject project)
static

Definition at line 694 of file DBConnection.cpp.

695 {
696  auto &result =
697  project.AttachedObjects::Get< ConnectionPtr >( sConnectionPtrKey );
698  return result;
699 }

References sConnectionPtrKey.

Referenced by ProjectFileIO::CurrConn(), Get(), ProjectFileIO::HasConnection(), UndoManager::RemoveStates(), and SqliteSampleBlockFactory::SqliteSampleBlockFactory().

Here is the caller graph for this function:

◆ Get() [2/2]

const ConnectionPtr & ConnectionPtr::Get ( const AudacityProject project)
static

Definition at line 701 of file DBConnection.cpp.

702 {
703  return Get( const_cast< AudacityProject & >( project ) );
704 }

References Get().

Here is the call graph for this function:

Member Data Documentation

◆ mpConnection

Connection ConnectionPtr::mpConnection

Definition at line 169 of file DBConnection.h.

Referenced by UndoManager::RemoveStates(), and ~ConnectionPtr().


The documentation for this class was generated from the following files:
sConnectionPtrKey
static const AudacityProject::AttachedObjects::RegisteredFactory sConnectionPtrKey
Definition: DBConnection.cpp:684
ConnectionPtr
Definition: DBConnection.h:162
ConnectionPtr::Get
static ConnectionPtr & Get(AudacityProject &project)
Definition: DBConnection.cpp:694
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:112
ConnectionPtr::mpConnection
Connection mpConnection
Definition: DBConnection.h:169