diff options
Diffstat (limited to 'cppuhelper/inc/cppuhelper/weakref.hxx')
-rw-r--r-- | cppuhelper/inc/cppuhelper/weakref.hxx | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/cppuhelper/inc/cppuhelper/weakref.hxx b/cppuhelper/inc/cppuhelper/weakref.hxx index 01a4c7c6e0df..5ed14743a520 100644 --- a/cppuhelper/inc/cppuhelper/weakref.hxx +++ b/cppuhelper/inc/cppuhelper/weakref.hxx @@ -79,13 +79,15 @@ public: */ WeakReferenceHelper & SAL_CALL operator = ( const WeakReferenceHelper & rWeakRef ) SAL_THROW( () ); - /** Releases this reference and takes over hard reference xInt. If the implementation behind - xInt does not support XWeak or XInt is null, than this reference is null. + /** 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. @param xInt another hard reference */ - inline WeakReferenceHelper & SAL_CALL operator = ( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xInt ) SAL_THROW( () ) - { return operator = ( WeakReferenceHelper( xInt ) ); } + WeakReferenceHelper & SAL_CALL operator = ( + const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface > & xInt ) SAL_THROW( () ); /** Returns true if both weak refs reference to the same object. @@ -107,6 +109,12 @@ public: inline SAL_CALL operator Reference< XInterface > () const SAL_THROW( () ) { return get(); } + /** Releases this reference. + + @since UDK 3.2.12 + */ + void SAL_CALL clear() SAL_THROW( () ); + protected: /** @internal */ OWeakRefListener * m_pImpl; @@ -135,6 +143,19 @@ public: : WeakReferenceHelper( rRef ) {} + /** 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. + + @param xInt another hard reference + + @since UDK 3.2.12 + */ + WeakReference & SAL_CALL operator = ( + const ::com::sun::star::uno::Reference< interface_type > & xInt ) + SAL_THROW( () ) + { WeakReferenceHelper::operator=(xInt); return *this; } + /** Gets a hard reference to the object. @return hard reference or null, if the weakly referenced interface has gone |