23#ifndef INCLUDED_CPPUHELPER_WEAKREF_HXX
24#define INCLUDED_CPPUHELPER_WEAKREF_HXX
31#include "com/sun/star/uno/XInterface.hpp"
44class OWeakRefListener;
70#if defined LIBO_INTERNAL_ONLY
72 { other.m_pImpl =
nullptr; }
92#if defined LIBO_INTERNAL_ONLY
103 const css::uno::Reference< css::uno::XInterface > & xInt );
111 {
return (get() == rObj.
get()); }
117 css::uno::Reference< css::uno::XInterface > SAL_CALL
get()
const;
134 OWeakRefListener * m_pImpl;
149template<
class interface_type >
176 const css::uno::Reference< interface_type > & xInt )
177 { WeakReferenceHelper::operator=(xInt);
return *
this; }
179#if defined LIBO_INTERNAL_ONLY
181 css::uno::Reference< interface_type > && xInt )
182 { WeakReferenceHelper::operator=(std::move(xInt));
return *
this; }
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:587
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:32
Template reference class for interface type derived from BaseReference.
Definition: Reference.h:184
The WeakReferenceHelper holds a weak reference to an object.
Definition: weakref.hxx:56
WeakReferenceHelper(const css::uno::Reference< css::uno::XInterface > &xInt)
Initialize this reference with the hard interface reference xInt.
css::uno::Reference< css::uno::XInterface > get() const
Gets a hard reference to the object.
WeakReferenceHelper(const WeakReferenceHelper &rWeakRef)
Copy ctor.
~WeakReferenceHelper()
Releases this reference.
WeakReferenceHelper()
Default ctor.
Definition: weakref.hxx:60
void clear()
Releases this reference.
The WeakReference<> holds a weak reference to an object.
Definition: weakref.hxx:151
WeakReference()
Default ctor.
Definition: weakref.hxx:155
WeakReference(const Reference< interface_type > &rRef)
Copy ctor.
Definition: weakref.hxx:163