UDK 3.2.7 C/C++ API Reference
Public Member Functions
com::sun::star::uno::WeakReference< interface_type > Class Template Reference

The WeakReference<> holds a weak reference to an object. More...

#include <weakref.hxx>

Inheritance diagram for com::sun::star::uno::WeakReference< interface_type >:
com::sun::star::uno::WeakReferenceHelper

List of all members.

Public Member Functions

 WeakReference () throw ()
 Default ctor.
 WeakReference (const Reference< interface_type > &rRef) throw ()
 Copy ctor.
WeakReferenceoperator= (const ::com::sun::star::uno::Reference< interface_type > &xInt) throw ()
 Releases this reference and takes over hard reference xInt.
 operator Reference< interface_type > () const throw ()
 Gets a hard reference to the object.

Detailed Description

template<class interface_type>
class com::sun::star::uno::WeakReference< interface_type >

The WeakReference<> holds a weak reference to an object.

This object must implement the ::com::sun::star::uno::XWeak interface. The implementation is thread safe.

Template Parameters:
interface_typetype of interface

Constructor & Destructor Documentation

template<class interface_type >
com::sun::star::uno::WeakReference< interface_type >::WeakReference ( ) throw () [inline]

Default ctor.

Creates an empty weak reference.

template<class interface_type >
com::sun::star::uno::WeakReference< interface_type >::WeakReference ( const Reference< interface_type > &  rRef) throw () [inline]

Copy ctor.

Initialize this reference with a hard reference.

Parameters:
rRefanother hard ref

Member Function Documentation

template<class interface_type >
com::sun::star::uno::WeakReference< interface_type >::operator Reference< interface_type > ( ) const throw () [inline]

Gets a hard reference to the object.

Returns:
hard reference or null, if the weakly referenced interface has gone
template<class interface_type >
WeakReference& com::sun::star::uno::WeakReference< interface_type >::operator= ( const ::com::sun::star::uno::Reference< interface_type > &  xInt) throw () [inline]

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.

Parameters:
xIntanother hard reference
Since:
UDK 3.2.12

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines