UDK 3.2.7 C/C++ API Reference
|
Base class to implement an UNO object supporting weak references, i.e. More...
#include <weakagg.hxx>
Public Member Functions | |
OWeakAggObject () throw () | |
Constructor. | |
virtual void | acquire () throw () |
If a delegator is set, then the delegators gets acquired. | |
virtual void | release () throw () |
If a delegator is set, then the delegators gets released. | |
virtual ::com::sun::star::uno::Any | queryInterface (const ::com::sun::star::uno::Type &rType) throw (::com::sun::star::uno::RuntimeException) |
If a delegator is set, then the delegator is queried for the demanded interface. | |
virtual void | setDelegator (const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &Delegator) throw (::com::sun::star::uno::RuntimeException) |
Set the delegator. | |
virtual ::com::sun::star::uno::Any | queryAggregation (const ::com::sun::star::uno::Type &rType) throw (::com::sun::star::uno::RuntimeException) |
Called by the delegator or queryInterface. | |
Protected Member Functions | |
virtual | ~OWeakAggObject () throw (::com::sun::star::uno::RuntimeException) |
Virtual dtor. | |
Protected Attributes | |
::com::sun::star::uno::WeakReferenceHelper | xDelegator |
weak reference to delegator. |
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().
cppu::OWeakAggObject::OWeakAggObject | ( | ) | throw () [inline] |
Constructor.
No delegator set.
virtual cppu::OWeakAggObject::~OWeakAggObject | ( | ) | throw (::com::sun::star::uno::RuntimeException) [protected, virtual] |
Virtual dtor.
Called when reference count is 0.
virtual void cppu::OWeakAggObject::acquire | ( | ) | throw () [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::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::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 >.
virtual ::com::sun::star::uno::Any cppu::OWeakAggObject::queryAggregation | ( | const ::com::sun::star::uno::Type & | rType | ) | throw (::com::sun::star::uno::RuntimeException) |
Called by the delegator or queryInterface.
Re-implement this method instead of queryInterface.
Reimplemented in cppu::OComponentHelper.
virtual ::com::sun::star::uno::Any cppu::OWeakAggObject::queryInterface | ( | const ::com::sun::star::uno::Type & | rType | ) | throw (::com::sun::star::uno::RuntimeException) |
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.
virtual void cppu::OWeakAggObject::release | ( | ) | throw () [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::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::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 >.
virtual void cppu::OWeakAggObject::setDelegator | ( | const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & | Delegator | ) | throw (::com::sun::star::uno::RuntimeException) [virtual] |
Set the delegator.
The delegator member reference is a weak reference.
Delegator | the object that delegate its queryInterface to this aggregate. |
weak reference to delegator.