20#include <com/sun/star/lang/XComponent.hpp>
37 for (
auto it = maVector.begin(); it != maVector.end(); )
39 uno::WeakReference< uno::XInterface > & rWeakRef = *it;
40 uno::Reference< uno::XInterface > xTestRef( rWeakRef );
43 it = maVector.erase( it );
47 if ( rWeakRef == xRef )
52 maVector.emplace_back( xRef );
59 uno::WeakReference< uno::XInterface >& rRef,
60 void const * pSearchData,
66 uno::WeakReference< uno::XInterface > & itRef = *it;
67 uno::Reference< uno::XInterface > xTestRef( itRef );
74 if( (*pSearchFunc)( itRef, pSearchData ) )
89 uno::Reference< uno::XInterface > xTestRef( elem );
92 uno::Reference< lang::XComponent > xComp( xTestRef, uno::UNO_QUERY );
std::vector< css::uno::WeakReference< css::uno::XInterface > > maVector
void insert(const css::uno::WeakReference< css::uno::XInterface > &xRef) noexcept
inserts the given ref into this container
~SvUnoWeakContainer() noexcept
bool findRef(css::uno::WeakReference< css::uno::XInterface > &rRef, void const *pSearchData, weakref_searchfunc pSearchFunc)
searches the container for a ref that returns true on the given search function
SvUnoWeakContainer() noexcept
bool(* weakref_searchfunc)(const css::uno::WeakReference< css::uno::XInterface > &xRef, void const *pSearchData)