23#ifndef INCLUDED_CPPUHELPER_WEAKREF_HXX
24#define INCLUDED_CPPUHELPER_WEAKREF_HXX
30#include "com/sun/star/uno/Reference.hxx"
31#include "com/sun/star/uno/XInterface.hpp"
44class OWeakRefListener;
71#if defined LIBO_INTERNAL_ONLY
73 { other.m_pImpl =
nullptr; }
83#if defined LIBO_INTERNAL_ONLY
103#if defined LIBO_INTERNAL_ONLY
114 const css::uno::Reference< css::uno::XInterface > & xInt );
116#if defined LIBO_INTERNAL_ONLY
124 const css::uno::Reference< css::uno::XWeak > & xWeak );
133 {
return (
get() == rObj.
get()); }
139 css::uno::Reference< css::uno::XInterface > SAL_CALL
get()
const;
152 void SAL_CALL clear();
171template<
class interface_type >
178 : WeakReferenceHelper()
185 WeakReference(
const Reference< interface_type > & rRef )
186 : WeakReferenceHelper( rRef )
197 WeakReference & SAL_CALL operator = (
198 const css::uno::Reference< interface_type > & xInt )
201#if defined LIBO_INTERNAL_ONLY
208 WeakReference & operator = (
209 const css::uno::Reference< css::uno::XWeak > & xWeak )
217 SAL_CALL
operator Reference< interface_type > ()
const
218 {
return Reference< interface_type >::query(
get() ); }
The WeakReferenceHelper holds a weak reference to an object.
WeakReferenceHelper(const css::uno::Reference< css::uno::XInterface > &xInt)
Initialize this reference with the hard interface reference xInt.
WeakReferenceHelper &SAL_CALL operator=(const WeakReferenceHelper &rWeakRef)
Releases this reference and takes over rWeakRef.
WeakReferenceHelper()
Default ctor.
css::uno::Reference< css::uno::XInterface > SAL_CALL get() const
Gets a hard reference to the object.
#define CPPUHELPER_DLLPUBLIC
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)