LibreOffice Module dbaccess (master) 1
|
handles asynchronous links which may be called in multi-threaded environments If you use an instance of this class as member of your own class, it will handle several crucial points for you (for instance the case that somebody posts the event while another thread tries to delete this event in the destructor of the class). More...
#include <AsynchronousLink.hxx>
Public Member Functions | |
OAsynchronousLink (const Link< void *, void > &_rHandler) | |
constructs the object More... | |
~OAsynchronousLink () | |
bool | IsRunning () const |
void | Call (void *_pArgument=nullptr) |
void | CancelCall () |
Private Member Functions | |
DECL_LINK (OnAsyncCall, void *, void) | |
Private Attributes | |
Link< void *, void > | m_aHandler |
std::mutex | m_aEventSafety |
std::mutex | m_aDestructionSafety |
ImplSVEvent * | m_nEventId |
handles asynchronous links which may be called in multi-threaded environments If you use an instance of this class as member of your own class, it will handle several crucial points for you (for instance the case that somebody posts the event while another thread tries to delete this event in the destructor of the class).
Definition at line 38 of file AsynchronousLink.hxx.
OAsynchronousLink::OAsynchronousLink | ( | const Link< void *, void > & | _rHandler | ) |
constructs the object
_rHandler | The link to be called asynchronously |
Definition at line 25 of file AsynchronousLink.cxx.
OAsynchronousLink::~OAsynchronousLink | ( | ) |
Definition at line 31 of file AsynchronousLink.cxx.
References m_aDestructionSafety, m_aEventSafety, m_nEventId, and Application::RemoveUserEvent().
void OAsynchronousLink::Call | ( | void * | _pArgument = nullptr | ) |
Definition at line 49 of file AsynchronousLink.cxx.
References LINK, m_aEventSafety, m_nEventId, Application::PostUserEvent(), and Application::RemoveUserEvent().
Referenced by dbaui::OGenericUnoController::closeTask(), dbaui::SbaXDataBrowserController::errorOccured(), dbaui::OApplicationController::Execute(), dbaui::SbaXDataBrowserController::frameAction(), dbaui::OGenericUnoController::ImplInvalidateFeature(), dbaui::OGenericUnoController::InvalidateAll_Impl(), dbaui::SbaXDataBrowserController::leaveFormAction(), and dbaui::SbaXDataBrowserController::LoadFinished().
void OAsynchronousLink::CancelCall | ( | ) |
Definition at line 57 of file AsynchronousLink.cxx.
References m_aEventSafety, m_nEventId, and Application::RemoveUserEvent().
Referenced by dbaui::OGenericUnoController::disposing(), dbaui::SbaXDataBrowserController::frameAction(), dbaui::OApplicationController::select(), and dbaui::SbaXDataBrowserController::suspend().
|
private |
|
inline |
Definition at line 53 of file AsynchronousLink.hxx.
References m_nEventId.
|
private |
Definition at line 42 of file AsynchronousLink.hxx.
Referenced by ~OAsynchronousLink().
|
private |
Definition at line 41 of file AsynchronousLink.hxx.
Referenced by Call(), CancelCall(), and ~OAsynchronousLink().
|
private |
Definition at line 40 of file AsynchronousLink.hxx.
|
private |
Definition at line 43 of file AsynchronousLink.hxx.
Referenced by Call(), CancelCall(), IsRunning(), and ~OAsynchronousLink().