LibreOffice Module comphelper (master)  1
Protected Member Functions | List of all members
comphelper::OWeakListenerAdapter< BROADCASTER, LISTENER > Class Template Referenceabstract

yet another base for weak listener adapters, this time with some type safety More...

#include <weakeventlistener.hxx>

Inheritance diagram for comphelper::OWeakListenerAdapter< BROADCASTER, LISTENER >:
[legend]
Collaboration diagram for comphelper::OWeakListenerAdapter< BROADCASTER, LISTENER >:
[legend]

Protected Member Functions

 OWeakListenerAdapter (const css::uno::Reference< css::uno::XWeak > &_rxListener, const css::uno::Reference< BROADCASTER > &_rxBroadcaster)
 ctor More...
 
css::uno::Reference< LISTENER > getListener () const
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 
virtual void SAL_CALL disposing () override=0
 
- Protected Member Functions inherited from comphelper::OWeakListenerAdapterBase
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, const css::uno::Reference< css::uno::XInterface > &_rxBroadcaster)
 
virtual ~OWeakListenerAdapterBase ()
 

Additional Inherited Members

- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

template<class BROADCASTER, class LISTENER>
class comphelper::OWeakListenerAdapter< BROADCASTER, LISTENER >

yet another base for weak listener adapters, this time with some type safety

Note that derived classes need to overwrite all virtual methods of their interface except XEventListener::disposing, and forward it to their master listener.

Additionally, derived classes need to add themself as listener to the broadcaster, as this can't be done in a generic way

Definition at line 98 of file weakeventlistener.hxx.

Constructor & Destructor Documentation

template<class BROADCASTER , class LISTENER >
comphelper::OWeakListenerAdapter< BROADCASTER, LISTENER >::OWeakListenerAdapter ( const css::uno::Reference< css::uno::XWeak > &  _rxListener,
const css::uno::Reference< BROADCASTER > &  _rxBroadcaster 
)
protected

ctor

Note that derived classes still need to add themself as listener to the broadcaster, as this can't be done in a generic way

Definition at line 156 of file weakeventlistener.hxx.

References m_aMutex.

Member Function Documentation

template<class BROADCASTER , class LISTENER >
void SAL_CALL comphelper::OWeakListenerAdapter< BROADCASTER, LISTENER >::disposing ( const css::lang::EventObject &  Source)
overrideprotectedvirtual

Definition at line 167 of file weakeventlistener.hxx.

template<class BROADCASTER , class LISTENER >
virtual void SAL_CALL comphelper::OWeakListenerAdapter< BROADCASTER, LISTENER >::disposing ( )
overrideprotectedpure virtual
template<class BROADCASTER , class LISTENER >
css::uno::Reference< LISTENER > comphelper::OWeakListenerAdapter< BROADCASTER, LISTENER >::getListener ( ) const
inlineprotected

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