LibreOffice: cppu::OWeakAggObject Class Reference

LibreOffice LibreOffice 26.8 SDK C/C++ API Reference

Loading...
Searching...
No Matches
cppu::OWeakAggObject Class Reference

Base class to implement a UNO object supporting weak references, i.e. More...

`#include <weakagg.hxx>`

Inheritance diagram for cppu::OWeakAggObject:

## Public Member Functions
| OWeakAggObject ()
| Constructor.
virtual void | acquire () SAL_NOEXCEPT SAL_OVERRIDE
| If a delegator is set, then the delegators gets acquired.
virtual void | release () SAL_NOEXCEPT SAL_OVERRIDE
| If a delegator is set, then the delegators gets released.
virtual css::uno::Any | queryInterface (const css::uno::Type &rType) SAL_OVERRIDE
| If a delegator is set, then the delegator is queried for the demanded interface.
virtual void | setDelegator (const css::uno::Reference< css::uno::XInterface > &Delegator) SAL_OVERRIDE
| Set the delegator.
virtual css::uno::Any | queryAggregation (const css::uno::Type &rType) SAL_OVERRIDE
| Called by the delegator or queryInterface.
Public Member Functions inherited from cppu::OWeakObject
| OWeakObject ()
| Default Constructor.
| OWeakObject (const OWeakObject &)
| Dummy copy constructor.
OWeakObject & | operator= (const OWeakObject &)
| Dummy assignment operator.
virtual css::uno::Reference< css::uno::XAdapter > | queryAdapter () SAL_OVERRIDE
| XWeak::queryAdapter() implementation.
| operator css::uno::Reference< css::uno::XInterface > ()
| Cast operator to XInterface reference.

## Protected Member Functions
virtual | ~OWeakAggObject () SAL_OVERRIDE
| Virtual dtor.
Protected Member Functions inherited from cppu::OWeakObject
virtual | ~OWeakObject () COVERITY_NOEXCEPT_FALSE
| Virtual dtor.
void | disposeWeakConnectionPoint ()
| disposes and resets m_pWeakConnectionPoint

## Protected Attributes
css::uno::WeakReferenceHelper | xDelegator
| weak reference to delegator.
Protected Attributes inherited from cppu::OWeakObject
oslInterlockedCount | m_refCount
| reference count.

## Detailed Description

Base class to implement a UNO object supporting weak references, i.e.

the object can be held weakly (by a css::uno::WeakReference) and aggregation, i.e. the object can be aggregated by another (delegator). This implementation copes with reference counting. Upon last release(), the virtual dtor is called.

Derive:
  Inherit from this class and delegate acquire()/ release() calls. Re-implement XAggregation::queryInterface().

## Constructor & Destructor Documentation

## ◆ OWeakAggObject()

cppu::OWeakAggObject::OWeakAggObject | ( |  | ) |
| inline

Constructor.

No delegator set.

## ◆ ~OWeakAggObject()

virtual cppu::OWeakAggObject::~OWeakAggObject | ( |  | ) |
| protectedvirtual

Virtual dtor.

Called when reference count is 0.

Attention
  Despite the fact that a RuntimeException is allowed to be thrown, you must not throw any exception upon destruction!

## Member Function Documentation

## ◆ acquire()

virtual void cppu::OWeakAggObject::acquire | ( |  | ) |
| virtual

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

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

Reimplemented from cppu::OWeakObject.

Reimplemented in cppu::OComponentHelper, cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakAggImplHelper1< Ifc1 >, cppu::WeakAggImplHelper2< Ifc1, Ifc2 >, cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, and cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >.

## ◆ queryAggregation()

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

Called by the delegator or queryInterface.

Re-implement this method instead of queryInterface.

See also
  queryInterface

Reimplemented in cppu::OComponentHelper, cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakAggImplHelper1< Ifc1 >, cppu::WeakAggImplHelper2< Ifc1, Ifc2 >, cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, and cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >.

## ◆ queryInterface()

virtual css::uno::Any cppu::OWeakAggObject::queryInterface | ( | const css::uno::Type & | 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

  rType | demanded interface type

Returns
  demanded type or empty any

See also
  queryAggregation.

Reimplemented from cppu::OWeakObject.

Reimplemented in cppu::OComponentHelper, cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakAggImplHelper1< Ifc1 >, cppu::WeakAggImplHelper2< Ifc1, Ifc2 >, cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, and cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >.

## ◆ release()

virtual void cppu::OWeakAggObject::release | ( |  | ) |
| virtual

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

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

Reimplemented from cppu::OWeakObject.

Reimplemented in cppu::OComponentHelper, cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakAggImplHelper1< Ifc1 >, cppu::WeakAggImplHelper2< Ifc1, Ifc2 >, cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, and cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >.

## ◆ setDelegator()

virtual void cppu::OWeakAggObject::setDelegator | ( | const css::uno::Reference< css::uno::XInterface > & | Delegator | ) |
| virtual

Set the delegator.

The delegator member reference is a weak reference.

Parameters

  Delegator | the object that delegate its queryInterface to this aggregate.

## Member Data Documentation

## ◆ xDelegator

css::uno::WeakReferenceHelper cppu::OWeakAggObject::xDelegator
| protected

weak reference to delegator.

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

- cppuhelper/weakagg.hxx