LibreOffice Module cppuhelper (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | List of all members
cppu::OComponentHelper Class Referenceabstract

Deprecated. More...

#include <component.hxx>

Inheritance diagram for cppu::OComponentHelper:
[legend]
Collaboration diagram for cppu::OComponentHelper:
[legend]

Public Member Functions

 OComponentHelper (::osl::Mutex &rMutex)
 Constructor. More...
 
virtual ~OComponentHelper () SAL_OVERRIDE
 Destructor. More...
 
virtual css::uno::Any SAL_CALL queryInterface (css::uno::Type const &rType) SAL_OVERRIDE
 If a delegator is set, then the delegator is queried for the demanded interface. More...
 
virtual css::uno::Any SAL_CALL queryAggregation (css::uno::Type const &rType) SAL_OVERRIDE
 Called by the delegator or queryInterface. More...
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 If a delegator is set, then the delegators gets acquired. More...
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 If a delegator is set, then the delegators gets released. More...
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId () SAL_OVERRIDE=0
 
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes () SAL_OVERRIDE
 
virtual void SAL_CALL dispose () SAL_OVERRIDE
 
virtual void SAL_CALL addEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) SAL_OVERRIDE
 
virtual void SAL_CALL removeEventListener (const css::uno::Reference< css::lang::XEventListener > &aListener) SAL_OVERRIDE
 
- Public Member Functions inherited from cppu::OWeakAggObject
 OWeakAggObject ()
 Constructor. More...
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 If a delegator is set, then the delegators gets acquired. More...
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 If a delegator is set, then the delegators gets released. More...
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) SAL_OVERRIDE
 If a delegator is set, then the delegator is queried for the demanded interface. More...
 
virtual void SAL_CALL setDelegator (const css::uno::Reference< css::uno::XInterface > &Delegator) SAL_OVERRIDE
 Set the delegator. More...
 
virtual css::uno::Any SAL_CALL queryAggregation (const css::uno::Type &rType) SAL_OVERRIDE
 Called by the delegator or queryInterface. More...
 
- Public Member Functions inherited from cppu::OWeakObject
 OWeakObject ()
 Default Constructor. More...
 
 OWeakObject (const OWeakObject &)
 Dummy copy constructor. More...
 
OWeakObject &SAL_CALL operator= (const OWeakObject &)
 Dummy assignment operator. More...
 
virtual css::uno::Any SAL_CALL queryInterface (const css::uno::Type &rType) SAL_OVERRIDE
 Basic queryInterface() implementation supporting com::sun::star::uno::XWeak and com::sun::star::uno::XInterface. More...
 
virtual void SAL_CALL acquire () SAL_NOEXCEPT SAL_OVERRIDE
 increasing m_refCount More...
 
virtual void SAL_CALL release () SAL_NOEXCEPT SAL_OVERRIDE
 decreasing m_refCount More...
 
virtual css::uno::Reference< css::uno::XAdapter > SAL_CALL queryAdapter () SAL_OVERRIDE
 XWeak::queryAdapter() implementation. More...
 
SAL_CALL operator css::uno::Reference< css::uno::XInterface > ()
 Cast operator to XInterface reference. More...
 

Protected Member Functions

virtual void SAL_CALL disposing ()
 Called in dispose method after the listeners were notified. More...
 
- Protected Member Functions inherited from cppu::OWeakAggObject
virtual ~OWeakAggObject () SAL_OVERRIDE
 Virtual dtor. More...
 
- Protected Member Functions inherited from cppu::OWeakObject
virtual ~OWeakObject () COVERITY_NOEXCEPT_FALSE
 Virtual dtor. More...
 
void disposeWeakConnectionPoint ()
 disposes and resets m_pWeakConnectionPoint More...
 

Private Member Functions

 OComponentHelper (const OComponentHelper &) SAL_DELETED_FUNCTION
 
OComponentHelperoperator= (const OComponentHelper &) SAL_DELETED_FUNCTION
 

Additional Inherited Members

- Protected Attributes inherited from cppu::OWeakAggObject
css::uno::WeakReferenceHelper xDelegator
 weak reference to delegator. More...
 
- Protected Attributes inherited from cppu::OWeakObject
oslInterlockedCount m_refCount
 reference count. More...
 

Detailed Description

Deprecated.

Helper for implementing css::lang::XComponent. Upon disposing objects of this class, sub-classes receive a disposing() call. Objects of this class can be held weakly, i.e. by a css::uno::WeakReference. Object of this class can be aggregated, i.e. incoming queryInterface() calls are delegated.

Attention: \n
The life-cycle of the passed mutex reference has to be longer than objects of this class.
Deprecated:

Definition at line 48 of file component.hxx.

Constructor & Destructor Documentation

◆ OComponentHelper() [1/2]

cppu::OComponentHelper::OComponentHelper ( ::osl::Mutex &  rMutex)

Constructor.

Parameters
rMutexthe mutex used to protect multi-threaded access; lifetime must be longer than the lifetime of this object.

◆ ~OComponentHelper()

cppu::OComponentHelper::~OComponentHelper ( )
virtual

Destructor.

If this object was not disposed previously, object will be disposed manually.

Definition at line 44 of file component.cxx.

◆ OComponentHelper() [2/2]

cppu::OComponentHelper::OComponentHelper ( const OComponentHelper )
private

Member Function Documentation

◆ acquire()

void cppu::OComponentHelper::acquire ( )
virtualnoexcept

If a delegator is set, then the delegators gets acquired.

Otherwise call is delegated to base class cppu::OWeakObject.

Reimplemented from cppu::OWeakAggObject.

Definition at line 66 of file component.cxx.

◆ addEventListener()

void cppu::OComponentHelper::addEventListener ( const css::uno::Reference< css::lang::XEventListener > &  aListener)
virtual

Definition at line 198 of file component.cxx.

References x.

◆ dispose()

void cppu::OComponentHelper::dispose ( void  )
virtual

Definition at line 125 of file component.cxx.

References Exception, cppu::getCaughtException(), and SAL_WARN.

◆ disposing()

void cppu::OComponentHelper::disposing ( )
protectedvirtual

Called in dispose method after the listeners were notified.

Definition at line 120 of file component.cxx.

◆ getImplementationId()

virtual css::uno::Sequence< sal_Int8 > SAL_CALL cppu::OComponentHelper::getImplementationId ( )
pure virtual
Attention: \n
XTypeProvider::getImplementationId() has to be implemented separately!

◆ getTypes()

Sequence< Type > cppu::OComponentHelper::getTypes ( )
virtual
Attention: \n
XTypeProvider::getTypes() has to be re-implemented!

Definition at line 108 of file component.cxx.

References cppu::OTypeCollection::getTypes().

◆ operator=()

OComponentHelper & cppu::OComponentHelper::operator= ( const OComponentHelper )
private

◆ queryAggregation()

Any cppu::OComponentHelper::queryAggregation ( css::uno::Type const &  rType)
virtual

Called by the delegator or queryInterface.

Re-implement this method instead of queryInterface.

See also
queryInterface

Reimplemented from cppu::OWeakAggObject.

Definition at line 52 of file component.cxx.

References Any, and p.

◆ queryInterface()

Any cppu::OComponentHelper::queryInterface ( css::uno::Type const &  rType)
virtual

If a delegator is set, then the delegator is queried for the demanded interface.

If the delegator cannot provide the demanded interface, it calls queryAggregation() on its aggregated objects.

Parameters
rTypedemanded interface type
Returns
demanded type or empty any
See also
queryAggregation.

Reimplemented from cppu::OWeakAggObject.

Definition at line 48 of file component.cxx.

References Any, and cppu::queryInterface().

◆ release()

void cppu::OComponentHelper::release ( )
virtualnoexcept

If a delegator is set, then the delegators gets released.

Otherwise call is delegated to base class cppu::OWeakObject.

Reimplemented from cppu::OWeakAggObject.

Definition at line 71 of file component.cxx.

References dispose(), m_refCount, SAL_WARN, and x.

◆ removeEventListener()

void cppu::OComponentHelper::removeEventListener ( const css::uno::Reference< css::lang::XEventListener > &  aListener)
virtual

Definition at line 215 of file component.cxx.


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