LibreOffice Module cppuhelper (master) 1
|
Base class to implement a UNO object supporting weak references, i.e. More...
#include <weakagg.hxx>
Public Member Functions | |
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 | ~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... | |
Protected Attributes | |
css::uno::WeakReferenceHelper | xDelegator |
weak reference to delegator. More... | |
Protected Attributes inherited from cppu::OWeakObject | |
oslInterlockedCount | m_refCount |
reference count. More... | |
Private Member Functions | |
OWeakAggObject (const OWeakAggObject &rObj) SAL_DELETED_FUNCTION | |
OWeakAggObject & | operator= (const OWeakAggObject &rObj) SAL_DELETED_FUNCTION |
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.
Definition at line 45 of file weakagg.hxx.
|
inline |
|
protectedvirtual |
Virtual dtor.
Called when reference count is 0.
|
private |
|
virtualnoexcept |
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::WeakAggImplHelper1< Ifc1 >, 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::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 >.
Definition at line 280 of file weak.cxx.
References cppu::OWeakObject::acquire(), x, and xDelegator.
Referenced by cppu::WeakAggImplHelper1< Ifc1 >::acquire(), cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >::acquire(), cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >::acquire(), cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >::acquire(), cppu::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >::acquire(), cppu::WeakAggImplHelper2< Ifc1, Ifc2 >::acquire(), cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >::acquire(), cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >::acquire(), cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::acquire(), cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::acquire(), cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::acquire(), cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >::acquire(), and cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >::acquire().
|
private |
|
virtual |
Called by the delegator or queryInterface.
Re-implement this method instead of queryInterface.
Reimplemented in cppu::OComponentHelper, cppu::WeakAggImplHelper1< Ifc1 >, 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::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 >.
Definition at line 307 of file weak.cxx.
References Any, and cppu::queryInterface().
Referenced by queryInterface().
|
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.
rType | demanded interface type |
Reimplemented from cppu::OWeakObject.
Reimplemented in cppu::OComponentHelper, cppu::WeakAggImplHelper1< Ifc1 >, 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::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 >.
Definition at line 300 of file weak.cxx.
References Any, queryAggregation(), x, and xDelegator.
Referenced by cppu::WeakAggImplHelper1< Ifc1 >::queryInterface(), cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >::queryInterface(), cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >::queryInterface(), cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >::queryInterface(), cppu::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >::queryInterface(), cppu::WeakAggImplHelper2< Ifc1, Ifc2 >::queryInterface(), cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >::queryInterface(), cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >::queryInterface(), cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::queryInterface(), cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::queryInterface(), cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::queryInterface(), cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >::queryInterface(), and cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >::queryInterface().
|
virtualnoexcept |
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::WeakAggImplHelper1< Ifc1 >, 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::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 >.
Definition at line 290 of file weak.cxx.
References cppu::OWeakObject::release(), x, and xDelegator.
Referenced by cppu::WeakAggImplHelper1< Ifc1 >::release(), cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >::release(), cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >::release(), cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >::release(), cppu::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >::release(), cppu::WeakAggImplHelper2< Ifc1, Ifc2 >::release(), cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >::release(), cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >::release(), cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >::release(), cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >::release(), cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >::release(), cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >::release(), and cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >::release().
|
virtual |
Set the delegator.
The delegator member reference is a weak reference.
Delegator | the object that delegate its queryInterface to this aggregate. |
Definition at line 317 of file weak.cxx.
References xDelegator.
|
protected |
weak reference to delegator.
Definition at line 96 of file weakagg.hxx.
Referenced by acquire(), queryInterface(), release(), and setDelegator().