LibreOffice Module comphelper (master) 1
Protected Member Functions | Private Attributes | List of all members
comphelper::OWeakListenerAdapterBase Class Reference

(the base for) an adapter which allows to add as listener to a foreign component, without being held hard. More...

#include <weakeventlistener.hxx>

Inheritance diagram for comphelper::OWeakListenerAdapterBase:
[legend]

Protected Member Functions

css::uno::Reference< css::uno::XInterface > getListener () const
 
const css::uno::Reference< css::uno::XInterface > & getBroadcaster () const
 
void resetListener ()
 
 OWeakListenerAdapterBase (const css::uno::Reference< css::uno::XWeak > &_rxListener, css::uno::Reference< css::uno::XInterface > _xBroadcaster)
 
virtual ~OWeakListenerAdapterBase ()
 

Private Attributes

css::uno::WeakReference< css::uno::XInterface > m_aListener
 
css::uno::Reference< css::uno::XInterface > m_xBroadcaster
 

Detailed Description

(the base for) an adapter which allows to add as listener to a foreign component, without being held hard.

The idea is that this adapter is added as listener to a foreign component, which usually holds it's listener hard. The adapter itself knows the real listener as weak reference, thus not affecting its life time.

Definition at line 47 of file weakeventlistener.hxx.

Constructor & Destructor Documentation

◆ OWeakListenerAdapterBase()

comphelper::OWeakListenerAdapterBase::OWeakListenerAdapterBase ( const css::uno::Reference< css::uno::XWeak > &  _rxListener,
css::uno::Reference< css::uno::XInterface >  _xBroadcaster 
)
inlineprotected

Definition at line 75 of file weakeventlistener.hxx.

◆ ~OWeakListenerAdapterBase()

comphelper::OWeakListenerAdapterBase::~OWeakListenerAdapterBase ( )
protectedvirtual

Definition at line 31 of file weakeventlistener.cxx.

Member Function Documentation

◆ getBroadcaster()

const css::uno::Reference< css::uno::XInterface > & comphelper::OWeakListenerAdapterBase::getBroadcaster ( ) const
inlineprotected

Definition at line 63 of file weakeventlistener.hxx.

References m_xBroadcaster.

◆ getListener()

css::uno::Reference< css::uno::XInterface > comphelper::OWeakListenerAdapterBase::getListener ( ) const
inlineprotected

◆ resetListener()

void comphelper::OWeakListenerAdapterBase::resetListener ( )
inlineprotected

Definition at line 68 of file weakeventlistener.hxx.

References m_aListener.

Member Data Documentation

◆ m_aListener

css::uno::WeakReference< css::uno::XInterface > comphelper::OWeakListenerAdapterBase::m_aListener
private

Definition at line 51 of file weakeventlistener.hxx.

Referenced by getListener(), and resetListener().

◆ m_xBroadcaster

css::uno::Reference< css::uno::XInterface > comphelper::OWeakListenerAdapterBase::m_xBroadcaster
private

Definition at line 53 of file weakeventlistener.hxx.

Referenced by getBroadcaster().


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