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 673 of file DBConnection.cpp.

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

References mpConnection.

Member Function Documentation

◆ Get() [1/2]

ConnectionPtr & ConnectionPtr::Get ( AudacityProject project)

Definition at line 693 of file DBConnection.cpp.

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

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 700 of file DBConnection.cpp.

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

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