LibreOffice Module svx (master)  1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
svxform::DelayedEvent Class Reference

small class which encapsulates posting a Link instance as ApplicationUserEvent More...

#include <delayedevent.hxx>

Collaboration diagram for svxform::DelayedEvent:
[legend]

Public Member Functions

 DelayedEvent (const Link< void *, void > &_rHandler)
 
 ~DelayedEvent ()
 
void Call ()
 calls the handler asynchronously More...
 
void CancelPendingCall ()
 cancels a call which is currently pending More...
 

Private Member Functions

 DECL_LINK (OnCall, void *, void)
 
 DelayedEvent (const DelayedEvent &)=delete
 
DelayedEventoperator= (const DelayedEvent &)=delete
 

Private Attributes

Link< void *, void > const m_aHandler
 
ImplSVEventm_nEventId
 

Detailed Description

small class which encapsulates posting a Link instance as ApplicationUserEvent

No thread safety at all here, just a little saving of code to type multiple times

Definition at line 37 of file delayedevent.hxx.

Constructor & Destructor Documentation

svxform::DelayedEvent::DelayedEvent ( const Link< void *, void > &  _rHandler)
inline

Definition at line 40 of file delayedevent.hxx.

svxform::DelayedEvent::~DelayedEvent ( )
inline

Definition at line 46 of file delayedevent.hxx.

References CancelPendingCall().

svxform::DelayedEvent::DelayedEvent ( const DelayedEvent )
privatedelete

Member Function Documentation

void svxform::DelayedEvent::Call ( )

calls the handler asynchronously

If there's already a call pending, this previous call is cancelled.

Definition at line 26 of file delayedevent.cxx.

References CancelPendingCall(), LINK, m_nEventId, Application::PostUserEvent(), and SAL_WARN_IF.

void svxform::DelayedEvent::CancelPendingCall ( )

cancels a call which is currently pending

If no call is currently pending, then this is ignored.

Definition at line 34 of file delayedevent.cxx.

References m_nEventId, and Application::RemoveUserEvent().

Referenced by Call(), and ~DelayedEvent().

svxform::DelayedEvent::DECL_LINK ( OnCall  ,
void ,
void   
)
private
DelayedEvent& svxform::DelayedEvent::operator= ( const DelayedEvent )
privatedelete

Member Data Documentation

Link<void*,void> const svxform::DelayedEvent::m_aHandler
private

Definition at line 64 of file delayedevent.hxx.

ImplSVEvent* svxform::DelayedEvent::m_nEventId
private

Definition at line 65 of file delayedevent.hxx.

Referenced by Call(), and CancelPendingCall().


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