LibreOffice
LibreOffice 4.3 SDK C/C++ API Reference
|
The WeakReferenceHelper holds a weak reference to an object. More...
#include <weakref.hxx>
Public Member Functions | |
WeakReferenceHelper () SAL_THROW(()) | |
Default ctor. More... | |
WeakReferenceHelper (const WeakReferenceHelper &rWeakRef) SAL_THROW(()) | |
Copy ctor. More... | |
WeakReferenceHelper (const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &xInt) SAL_THROW(()) | |
Initialize this reference with the hard interface reference xInt. More... | |
~WeakReferenceHelper () SAL_THROW(()) | |
Releases this reference. More... | |
WeakReferenceHelper & | operator= (const WeakReferenceHelper &rWeakRef) SAL_THROW(()) |
Releases this reference and takes over rWeakRef. More... | |
WeakReferenceHelper & | operator= (const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > &xInt) SAL_THROW(()) |
Releases this reference and takes over hard reference xInt. More... | |
bool | operator== (const WeakReferenceHelper &rObj) const SAL_THROW(()) |
Returns true if both weak refs reference to the same object. More... | |
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > | get () const SAL_THROW(()) |
Gets a hard reference to the object. More... | |
operator Reference< XInterface > () const SAL_THROW(()) | |
Gets a hard reference to the object. More... | |
void | clear () SAL_THROW(()) |
Releases this reference. More... | |
The WeakReferenceHelper holds a weak reference to an object.
This object must implement the com::sun::star::uno::XWeak interface. The implementation is thread safe.
|
inline |
Default ctor.
Creates an empty weak reference.
com::sun::star::uno::WeakReferenceHelper::WeakReferenceHelper | ( | const WeakReferenceHelper & | rWeakRef | ) |
Copy ctor.
Initialize this reference with the same interface as in rWeakRef.
rWeakRef | another weak ref |
com::sun::star::uno::WeakReferenceHelper::WeakReferenceHelper | ( | const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & | xInt | ) |
Initialize this reference with the hard interface reference xInt.
If the implementation behind xInt does not support XWeak or XInt is null then this reference will be null.
xInt | another hard interface reference |
com::sun::star::uno::WeakReferenceHelper::~WeakReferenceHelper | ( | ) |
Releases this reference.
void com::sun::star::uno::WeakReferenceHelper::clear | ( | ) |
Releases this reference.
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > com::sun::star::uno::WeakReferenceHelper::get | ( | ) | const |
Gets a hard reference to the object.
|
inline |
Gets a hard reference to the object.
WeakReferenceHelper& com::sun::star::uno::WeakReferenceHelper::operator= | ( | const WeakReferenceHelper & | rWeakRef | ) |
Releases this reference and takes over rWeakRef.
rWeakRef | another weak ref |
WeakReferenceHelper& com::sun::star::uno::WeakReferenceHelper::operator= | ( | const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & | xInt | ) |
Releases this reference and takes over hard reference xInt.
If the implementation behind xInt does not support XWeak or XInt is null, then this reference is null.
xInt | another hard reference |
|
inline |
Returns true if both weak refs reference to the same object.
rObj | another weak ref |