LibreOffice
LibreOffice 4.3 SDK C/C++ API Reference
|
Base class to implement an UNO object supporting weak references, i.e. More...
#include <weakagg.hxx>
Public Member Functions | |
OWeakAggObject () SAL_THROW(()) | |
Constructor. More... | |
virtual void | acquire () SAL_OVERRIDE throw () |
If a delegator is set, then the delegators gets acquired. More... | |
virtual void | release () SAL_OVERRIDE throw () |
If a delegator is set, then the delegators gets released. More... | |
virtual ::com::sun::star::uno::Any | queryInterface (const ::com::sun::star::uno::Type &rType) SAL_OVERRIDE throw (::com::sun::star::uno::RuntimeException, std::exception) |
If a delegator is set, then the delegator is queried for the demanded interface. More... | |
virtual void | setDelegator (const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &Delegator) SAL_OVERRIDE throw (::com::sun::star::uno::RuntimeException, std::exception) |
Set the delegator. More... | |
virtual ::com::sun::star::uno::Any | queryAggregation (const ::com::sun::star::uno::Type &rType) SAL_OVERRIDE throw (::com::sun::star::uno::RuntimeException, std::exception) |
Called by the delegator or queryInterface. More... | |
![]() | |
OWeakObject () SAL_THROW(()) | |
Default Constructor. More... | |
OWeakObject (const OWeakObject &rObj) SAL_THROW(()) | |
Dummy copy constructor. More... | |
OWeakObject & | operator= (const OWeakObject &) |
Dummy assignment operator. More... | |
virtual ::com::sun::star::uno::Any | queryInterface (const ::com::sun::star::uno::Type &rType) SAL_OVERRIDE throw (::com::sun::star::uno::RuntimeException, std::exception) |
Basic queryInterface() implementation supporting ::com::sun::star::uno::XWeak and ::com::sun::star::uno::XInterface. More... | |
virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAdapter > | queryAdapter () SAL_OVERRIDE throw (::com::sun::star::uno::RuntimeException, std::exception) |
XWeak::queryAdapter() implementation. More... | |
operator::com::sun::star::uno::Reference () SAL_THROW(()) | |
Cast operator to XInterface reference. More... | |
Protected Attributes | |
virtual ~OWeakAggObject() SAL_THROW((::com::sun::star::uno::WeakReferenceHelper | xDelegator |
Virtual dtor. More... | |
![]() | |
oslInterlockedCount | m_refCount |
reference count. More... | |
Base class to implement an UNO object supporting weak references, i.e.
the object can be held weakly (by a com::sun::star::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.
Inherit from this class and delegate acquire()/ release() calls. Re-implement XAggregation::queryInterface().
|
inline |
Constructor.
No delegator set.
|
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::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >, cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakAggImplHelper1< Ifc1 >, cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakAggImplHelper2< Ifc1, Ifc2 >, and cppu::OComponentHelper.
virtual ::com::sun::star::uno::Any cppu::OWeakAggObject::queryAggregation | ( | const ::com::sun::star::uno::Type & | rType | ) | |
throw | ( | ::com::sun::star::uno::RuntimeException, | |||
std::exception | |||||
) |
Called by the delegator or queryInterface.
Re-implement this method instead of queryInterface.
virtual ::com::sun::star::uno::Any cppu::OWeakAggObject::queryInterface | ( | const ::com::sun::star::uno::Type & | rType | ) | |
throw | ( | ::com::sun::star::uno::RuntimeException, | |||
std::exception | |||||
) |
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 |
|
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::WeakAggImplHelper13< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, Ifc13 >, cppu::WeakAggImplHelper12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12 >, cppu::WeakAggImplHelper11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11 >, cppu::WeakAggImplHelper10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10 >, cppu::WeakAggImplHelper9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9 >, cppu::WeakAggImplHelper8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8 >, cppu::WeakAggImplHelper7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7 >, cppu::WeakAggImplHelper6< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6 >, cppu::WeakAggImplHelper5< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5 >, cppu::WeakAggImplHelper1< Ifc1 >, cppu::WeakAggImplHelper4< Ifc1, Ifc2, Ifc3, Ifc4 >, cppu::WeakAggImplHelper3< Ifc1, Ifc2, Ifc3 >, cppu::WeakAggImplHelper2< Ifc1, Ifc2 >, and cppu::OComponentHelper.
|
virtual |
Set the delegator.
The delegator member reference is a weak reference.
Delegator | the object that delegate its queryInterface to this aggregate. |
|
protected |
Virtual dtor.
Called when reference count is 0.