LibreOffice Module comphelper (master)  1
Public Member Functions | Private Attributes | List of all members
comphelper::WeakBag< T > Class Template Reference

A bag of UNO weak references. More...

#include <weakbag.hxx>

Inheritance diagram for comphelper::WeakBag< T >:
[legend]

Public Member Functions

void add (css::uno::Reference< T > const &e)
 Add a new weak reference. More...
 
css::uno::Reference< T > remove ()
 Remove a living reference. More...
 

Private Attributes

std::vector< css::uno::WeakReference< T > > m_list
 

Detailed Description

template<typename T>
class comphelper::WeakBag< T >

A bag of UNO weak references.

Definition at line 35 of file weakbag.hxx.

Member Function Documentation

template<typename T>
void comphelper::WeakBag< T >::add ( css::uno::Reference< T > const &  e)
inline

Add a new weak reference.

The implementation keeps the amount of memory consumed linear in the number of living references added, not linear in the number of total references added.

Parameters
ea non-null reference.

Definition at line 47 of file weakbag.hxx.

template<typename T>
css::uno::Reference< T > comphelper::WeakBag< T >::remove ( )
inline

Remove a living reference.

Returns
a living reference, or null if there are none.

Definition at line 65 of file weakbag.hxx.

Member Data Documentation

template<typename T>
std::vector< css::uno::WeakReference< T > > comphelper::WeakBag< T >::m_list
private

The documentation for this class was generated from the following file: