LibreOffice Module dbaccess (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
dbaui::OAsynchronousLink Class Referencefinal

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>

Collaboration diagram for dbaui::OAsynchronousLink:
[legend]

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
 
ImplSVEventm_nEventId
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ OAsynchronousLink()

OAsynchronousLink::OAsynchronousLink ( const Link< void *, void > &  _rHandler)

constructs the object

Parameters
_rHandlerThe link to be called asynchronously

Definition at line 25 of file AsynchronousLink.cxx.

◆ ~OAsynchronousLink()

OAsynchronousLink::~OAsynchronousLink ( )

Member Function Documentation

◆ Call()

void OAsynchronousLink::Call ( void *  _pArgument = nullptr)

◆ CancelCall()

void OAsynchronousLink::CancelCall ( )

◆ DECL_LINK()

dbaui::OAsynchronousLink::DECL_LINK ( OnAsyncCall  ,
void *  ,
void   
)
private

◆ IsRunning()

bool dbaui::OAsynchronousLink::IsRunning ( ) const
inline

Definition at line 53 of file AsynchronousLink.hxx.

References m_nEventId.

Member Data Documentation

◆ m_aDestructionSafety

std::mutex dbaui::OAsynchronousLink::m_aDestructionSafety
private

Definition at line 42 of file AsynchronousLink.hxx.

Referenced by ~OAsynchronousLink().

◆ m_aEventSafety

std::mutex dbaui::OAsynchronousLink::m_aEventSafety
private

Definition at line 41 of file AsynchronousLink.hxx.

Referenced by Call(), CancelCall(), and ~OAsynchronousLink().

◆ m_aHandler

Link<void*,void> dbaui::OAsynchronousLink::m_aHandler
private

Definition at line 40 of file AsynchronousLink.hxx.

◆ m_nEventId

ImplSVEvent* dbaui::OAsynchronousLink::m_nEventId
private

Definition at line 43 of file AsynchronousLink.hxx.

Referenced by Call(), CancelCall(), IsRunning(), and ~OAsynchronousLink().


The documentation for this class was generated from the following files: