LibreOffice Module dbaccess (master) 1
|
#include <connectiondependent.hxx>
Classes | |
class | EntryGuard |
a class for guarding methods of a connection-dependent component More... | |
struct | GuardAccess |
helper for granting exclusive access to various other methods More... | |
Public Member Functions | |
::osl::Mutex & | getMutex (GuardAccess) const |
bool | acquireConnection (GuardAccess) |
void | releaseConnection (GuardAccess) |
Protected Member Functions | |
::osl::Mutex & | getMutex () const |
const css::uno::Reference< css::uno::XComponentContext > & | getContext () const |
ConnectionDependentComponent (css::uno::Reference< css::uno::XComponentContext > _xContext) | |
void | setWeakConnection (const css::uno::Reference< css::sdbc::XConnection > &_rxConnection) |
sets the connection we depend on. More... | |
const css::uno::Reference< css::sdbc::XConnection > & | getConnection () const |
Private Attributes | |
mutable::osl::Mutex | m_aMutex |
css::uno::WeakReference< css::sdbc::XConnection > | m_aConnection |
css::uno::Reference< css::uno::XComponentContext > | m_aContext |
css::uno::Reference< css::sdbc::XConnection > | m_xConnection |
a hard reference to the connection we're working for More... | |
Friends | |
struct | GuardAccess |
Definition at line 34 of file connectiondependent.hxx.
|
inlineexplicitprotected |
Definition at line 62 of file connectiondependent.hxx.
References _xContext.
|
inline |
Definition at line 91 of file connectiondependent.hxx.
References m_aConnection, and m_xConnection.
Referenced by sdbtools::ConnectionDependentComponent::EntryGuard::EntryGuard().
|
inlineprotected |
Definition at line 80 of file connectiondependent.hxx.
References m_xConnection.
Referenced by sdbtools::ConnectionTools::createTableName(), sdbtools::ConnectionTools::getComposer(), sdbtools::ConnectionTools::getDataSourceMetaData(), sdbtools::ConnectionTools::getFieldsByCommandDescriptor(), and sdbtools::ConnectionTools::getObjectNames().
|
inlineprotected |
Definition at line 56 of file connectiondependent.hxx.
References m_aContext.
Referenced by sdbtools::ConnectionTools::createTableName(), sdbtools::ConnectionTools::getDataSourceMetaData(), and sdbtools::ConnectionTools::getObjectNames().
|
inlineprotected |
Definition at line 53 of file connectiondependent.hxx.
References m_aMutex.
Referenced by sdbtools::ConnectionTools::initialize().
|
inline |
Definition at line 89 of file connectiondependent.hxx.
References m_aMutex.
|
inline |
Definition at line 96 of file connectiondependent.hxx.
References m_xConnection.
Referenced by sdbtools::ConnectionDependentComponent::EntryGuard::~EntryGuard().
|
inlineprotected |
sets the connection we depend on.
To be called exactly once.
_rxConnection | the connection to set |
Definition at line 74 of file connectiondependent.hxx.
References m_aConnection.
Referenced by sdbtools::ConnectionTools::initialize().
|
friend |
Definition at line 84 of file connectiondependent.hxx.
|
private |
Definition at line 39 of file connectiondependent.hxx.
Referenced by acquireConnection(), and setWeakConnection().
|
private |
Definition at line 41 of file connectiondependent.hxx.
Referenced by getContext().
|
private |
Definition at line 37 of file connectiondependent.hxx.
Referenced by getMutex().
|
private |
a hard reference to the connection we're working for
This member is only valid as long as a EntryGuard is on the stack. The guard will, in its constructor, set the member, and reset it in its destructor. This ensures that the connection is only held hard when it's needed, and weak otherwise.
Definition at line 50 of file connectiondependent.hxx.
Referenced by acquireConnection(), getConnection(), and releaseConnection().