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 Member Functions inherited from Base
virtual ~Base () override
 

Protected Attributes

mutable::osl::Mutex m_aMutex
 
- Protected Attributes inherited from Base
oslInterlockedCount m_nRef
 
uno_Environmentm_pEnv
 
std::unique_ptr< cppu::Enterablem_pEnterable
 
EnvFun_Pm_env_acquire
 
EnvFun_Pm_env_release
 
EnvFun_PP_Pm_env_harden
 
EnvFun_Pm_env_acquireWeak
 
EnvFun_Pm_env_releaseWeak
 
ExtEnv_registerProxyInterfacem_env_registerProxyInterface
 
ExtEnv_revokeInterfacem_env_revokeInterface
 
ExtEnv_getObjectIdentifierm_env_getObjectIdentifier
 
ExtEnv_getRegisteredInterfacem_env_getRegisteredInterface
 
ExtEnv_getRegisteredInterfacesm_env_getRegisteredInterfaces
 
ExtEnv_computeObjectIdentifierm_env_computeObjectIdentifier
 
ExtEnv_acquireInterfacem_env_acquireInterface
 
ExtEnv_releaseInterfacem_env_releaseInterface
 

Private Member Functions

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

Additional Inherited Members

- Public Member Functions inherited from Base
 Base (uno_Environment *pEnv, cppu::Enterable *pEnterable)
 
void acquireWeak ()
 
void releaseWeak ()
 
void harden (uno_Environment **ppHardEnv)
 
void acquire ()
 
void release ()
 
void registerProxyInterface (void **ppProxy, uno_freeProxyFunc freeProxy, OUString const &oid, typelib_InterfaceTypeDescription *pTypeDescr)
 
void revokeInterface (void *pInterface)
 
void getObjectIdentifier (void *pInterface, OUString *pOid)
 
void getRegisteredInterface (void **, OUString const &oid, typelib_InterfaceTypeDescription *)
 
void getRegisteredInterfaces (void ***, sal_Int32 *pnLen, uno_memAlloc memAlloc)
 
void computeObjectIdentifier (void *pInterface, OUString *pOid)
 
void acquireInterface (void *pInterface)
 
void releaseInterface (void *pInterface)
 
virtual void v_enter () override
 
virtual void v_leave () override
 
virtual void v_callInto_v (uno_EnvCallee *pCallee, va_list *pParam) override
 
virtual void v_callOut_v (uno_EnvCallee *pCallee, va_list *pParam) override
 
virtual bool v_isValid (OUString *pReason) override
 
- Public Member Functions inherited from cppu::Enterable
virtual bool v_isValid (rtl::OUString *pReason)=0
 
virtual ~Enterable ()
 
 Enterable ()
 
void enter ()
 
void leave ()
 
void callInto_v (uno_EnvCallee *pCallee, va_list *pParam)
 
void callOut_v (uno_EnvCallee *pCallee, va_list *pParam)
 
void callInto (uno_EnvCallee *pCallee,...)
 
void callOut (uno_EnvCallee *pCallee,...)
 
int isValid (rtl::OUString *pReason)
 

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 46 of file disambiguationhelper.hxx.

Constructor & Destructor Documentation

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 57 of file disambiguationhelper.hxx.

Member Function Documentation

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

Definition at line 65 of file disambiguationhelper.hxx.

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

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

Member Data Documentation

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

Definition at line 68 of file disambiguationhelper.hxx.


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