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:
Collaboration diagram for ConnectionPtr:

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 ( )

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)

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)

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:
static const AudacityProject::AttachedObjects::RegisteredFactory sConnectionPtrKey
Definition: DBConnection.cpp:684
Definition: DBConnection.h:162
static ConnectionPtr & Get(AudacityProject &project)
Definition: DBConnection.cpp:694
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:112
Connection mpConnection
Definition: DBConnection.h:169