LibreOffice Module canvas (master) 1
Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
canvas::DisambiguationHelper< Base > Class Template Reference

Base class, initializing its own baseclass with m_aMutex. More...

#include <disambiguationhelper.hxx>

Inheritance diagram for canvas::DisambiguationHelper< Base >:
[legend]
Collaboration diagram for canvas::DisambiguationHelper< Base >:
[legend]

Protected Member Functions

 DisambiguationHelper ()
 Construct DisambiguationHelper. More...
 
virtual void disposeThis ()
 
virtual void disposeEventSource (const css::lang::EventObject &)
 

Protected Attributes

mutable::osl::Mutex m_aMutex
 

Private Member Functions

virtual void SAL_CALL disposing () override
 
virtual void SAL_CALL disposing (const css::lang::EventObject &Source) override
 

Detailed Description

template<class Base>
class canvas::DisambiguationHelper< Base >

Base class, initializing its own baseclass with m_aMutex.

This is necessary to make the CanvasBase, GraphicDeviceBase, etc. classes freely combinable - letting them perform this initialization would prohibit deriving e.g. CanvasBase from GraphicDeviceBase.

On top of that, disambiguates XEventListener::disposing and WeakComponentImplHelper::disposing.

Having two virtual methods with the same name, and not overriding them in every derived class, will hide one of them. Later trying to override the same method, will generate a new vtable slot, and lead to very hard to spot errors.

Definition at line 45 of file disambiguationhelper.hxx.

Constructor & Destructor Documentation

◆ DisambiguationHelper()

template<class Base >
canvas::DisambiguationHelper< Base >::DisambiguationHelper ( )
inlineprotected

Construct DisambiguationHelper.

This method is the whole purpose of this template: initializing a base class with the provided m_aMutex member (the WeakComponentImplHelper templates need that, as they require the lifetime of the mutex to extend theirs).

Definition at line 56 of file disambiguationhelper.hxx.

References Base.

Member Function Documentation

◆ disposeEventSource()

template<class Base >
virtual void canvas::DisambiguationHelper< Base >::disposeEventSource ( const css::lang::EventObject &  )
inlineprotectedvirtual
Exceptions
css::uno::RuntimeException

Definition at line 64 of file disambiguationhelper.hxx.

Referenced by canvas::DisambiguationHelper< Base >::disposing().

◆ disposeThis()

template<class Base >
virtual void canvas::DisambiguationHelper< Base >::disposeThis ( )
inlineprotectedvirtual

◆ disposing() [1/2]

template<class Base >
virtual void SAL_CALL canvas::DisambiguationHelper< Base >::disposing ( )
inlineoverrideprivatevirtual

◆ disposing() [2/2]

template<class Base >
virtual void SAL_CALL canvas::DisambiguationHelper< Base >::disposing ( const css::lang::EventObject &  Source)
inlineoverrideprivatevirtual

Member Data Documentation

◆ m_aMutex

template<class Base >
mutable::osl::Mutex canvas::DisambiguationHelper< Base >::m_aMutex
protected

Definition at line 67 of file disambiguationhelper.hxx.


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