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 >:

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

◆ add()

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

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.

ea non-null reference.

Definition at line 47 of file weakbag.hxx.

References i, and comphelper::WeakBag< T >::m_list.

◆ remove()

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

Remove a living reference.

a living reference, or null if there are none.

Definition at line 65 of file weakbag.hxx.

References comphelper::WeakBag< T >::m_list.

Member Data Documentation

◆ m_list

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

Definition at line 77 of file weakbag.hxx.

Referenced by comphelper::WeakBag< T >::add(), and comphelper::WeakBag< T >::remove().

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