LibreOffice Module sfx2 (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
SfxHintPoster Class Referencefinal

[Description] More...

#include <hintpost.hxx>

Inheritance diagram for SfxHintPoster:
[legend]
Collaboration diagram for SfxHintPoster:
[legend]

Public Member Functions

 SfxHintPoster (std::function< void(std::unique_ptr< SfxRequest >)> aLink)
 
void Post (std::unique_ptr< SfxRequest > pHint)
 
void SetEventHdl (const std::function< void(std::unique_ptr< SfxRequest >)> &rLink)
 
- Public Member Functions inherited from SvRefBase
 SvRefBase ()
 
 SvRefBase (const SvRefBase &)
 
SvRefBaseoperator= (const SvRefBase &)
 
void RestoreNoDelete ()
 
void AddNextRef ()
 
void AddFirstRef ()
 
void ReleaseRef ()
 
unsigned int GetRefCount () const
 

Private Member Functions

 DECL_LINK (DoEvent_Impl, void *, void)
 
virtual ~SfxHintPoster () override
 

Private Attributes

std::function< void(std::unique_ptr< SfxRequest >)> m_Link
 

Additional Inherited Members

- Protected Member Functions inherited from SvRefBase
virtual ~SvRefBase () COVERITY_NOEXCEPT_FALSE
 

Detailed Description

[Description]

This class allows sending unique events via VCL's Application::PostUserEvent(). When the User-Event is dispatched, the handler <Event()> is called, which calls the Link provided with SetEventHdl().

The instances are held via Ref-Count until a possibly sent event has arrived. If the target dies before delivery, the connection must be severed with SetEventHdl(Link()).

Definition at line 41 of file hintpost.hxx.

Constructor & Destructor Documentation

◆ ~SfxHintPoster()

SfxHintPoster::~SfxHintPoster ( )
overrideprivatevirtual

Definition at line 31 of file hintpost.cxx.

◆ SfxHintPoster()

SfxHintPoster::SfxHintPoster ( std::function< void(std::unique_ptr< SfxRequest >)>  aLink)

Definition at line 26 of file hintpost.cxx.

Member Function Documentation

◆ DECL_LINK()

SfxHintPoster::DECL_LINK ( DoEvent_Impl  ,
void *  ,
void   
)
private

◆ Post()

void SfxHintPoster::Post ( std::unique_ptr< SfxRequest pHint)

Definition at line 33 of file hintpost.cxx.

References SvRefBase::AddFirstRef(), LINK, and Application::PostUserEvent().

◆ SetEventHdl()

void SfxHintPoster::SetEventHdl ( const std::function< void(std::unique_ptr< SfxRequest >)> &  rLink)

Definition at line 49 of file hintpost.cxx.

References m_Link.

Member Data Documentation

◆ m_Link

std::function<void (std::unique_ptr<SfxRequest>)> SfxHintPoster::m_Link
private

Definition at line 44 of file hintpost.hxx.

Referenced by SetEventHdl().


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