23 #ifndef INCLUDED_CPPUHELPER_WEAKREF_HXX 24 #define INCLUDED_CPPUHELPER_WEAKREF_HXX 31 #include "com/sun/star/uno/XInterface.hpp" 44 class OWeakRefListener;
71 #if defined LIBO_INTERNAL_ONLY 73 { other.m_pImpl =
nullptr; }
81 WeakReferenceHelper(
const css::uno::Reference< css::uno::XInterface > & xInt );
83 #if defined LIBO_INTERNAL_ONLY 90 WeakReferenceHelper(
const css::uno::Reference< css::uno::XWeak > & xWeak );
95 ~WeakReferenceHelper();
101 WeakReferenceHelper & SAL_CALL operator = (
const WeakReferenceHelper & rWeakRef );
103 #if defined LIBO_INTERNAL_ONLY 104 WeakReferenceHelper & operator =(WeakReferenceHelper && other);
113 WeakReferenceHelper & SAL_CALL operator = (
114 const css::uno::Reference< css::uno::XInterface > & xInt );
116 #if defined LIBO_INTERNAL_ONLY 123 WeakReferenceHelper & operator = (
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();
156 OWeakRefListener * m_pImpl;
171 template<
class interface_type >
198 const css::uno::Reference< interface_type > & xInt )
201 #if defined LIBO_INTERNAL_ONLY 209 const css::uno::Reference< css::uno::XWeak > & xWeak )
static SAL_WARN_UNUSED_RESULT Reference< interface_type > query(const BaseReference &rRef)
Queries given interface reference for type interface_type.
Definition: Reference.hxx:373
bool operator==(const Any &rAny, const C &value)
Template equality operator: compares set value of left side any to right side value.
Definition: Any.hxx:664
#define SAL_WARN_UNUSED
Annotate classes where a compiler should warn if an instance is unused.
Definition: types.h:587
Template reference class for interface type derived from BaseReference.
Definition: unotype.hxx:43
WeakReference(const Reference< interface_type > &rRef)
Copy ctor.
Definition: weakref.hxx:185
WeakReferenceHelper & operator=(const WeakReferenceHelper &rWeakRef)
Releases this reference and takes over rWeakRef.
css::uno::Reference< css::uno::XInterface > get() const
Gets a hard reference to the object.
The WeakReference<> holds a weak reference to an object.
Definition: weakref.hxx:172
#define CPPUHELPER_DLLPUBLIC
Definition: cppuhelperdllapi.h:32
WeakReference()
Default ctor.
Definition: weakref.hxx:177
The WeakReferenceHelper holds a weak reference to an object.
Definition: weakref.hxx:56
WeakReferenceHelper()
Default ctor.
Definition: weakref.hxx:61