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

This is the iterator of an OInterfaceContainerHelper3. More...

#include <interfacecontainer3.hxx>

Collaboration diagram for comphelper::OInterfaceIteratorHelper3< ListenerT >:
[legend]

Public Member Functions

 OInterfaceIteratorHelper3 (OInterfaceContainerHelper3< ListenerT > &rCont_)
 Create an iterator over the elements of the container. More...
 
bool hasMoreElements () const
 Return true, if there are more elements in the iterator. More...
 
css::uno::Reference< ListenerT > const & next ()
 Return the next element of the iterator. More...
 
void remove ()
 Removes the current element (the last one returned by next()) from the underlying container. More...
 

Private Member Functions

 OInterfaceIteratorHelper3 (const OInterfaceIteratorHelper3 &)=delete
 
OInterfaceIteratorHelper3operator= (const OInterfaceIteratorHelper3 &)=delete
 

Private Attributes

OInterfaceContainerHelper3< ListenerT > & rCont
 
o3tl::cow_wrapper< std::vector< css::uno::Reference< ListenerT > >, o3tl::ThreadSafeRefCountingPolicymaData
 
sal_Int32 nRemain
 

Detailed Description

template<class ListenerT>
class comphelper::OInterfaceIteratorHelper3< ListenerT >

This is the iterator of an OInterfaceContainerHelper3.

Typically one constructs an instance on the stack for one firing session. It is not allowed to assign or copy an instance of this class.

Template Parameters
ListenerTUNO event listener type
See also
OInterfaceContainerHelper3

Definition at line 48 of file interfacecontainer3.hxx.

Constructor & Destructor Documentation

◆ OInterfaceIteratorHelper3() [1/2]

template<class ListenerT >
comphelper::OInterfaceIteratorHelper3< ListenerT >::OInterfaceIteratorHelper3 ( OInterfaceContainerHelper3< ListenerT > &  rCont_)
inline

Create an iterator over the elements of the container.

The iterator copies the elements of the container. A change to the container during the lifetime of an iterator is allowed and does not affect the iterator-instance. The iterator and the container take cares themself for concurrent access, no additional guarding is necessary.

Remark: The copy is on demand. The iterator copy the elements only if the container change the contents...

Parameters
rContthe container of the elements.

Definition at line 63 of file interfacecontainer3.hxx.

References size.

◆ OInterfaceIteratorHelper3() [2/2]

template<class ListenerT >
comphelper::OInterfaceIteratorHelper3< ListenerT >::OInterfaceIteratorHelper3 ( const OInterfaceIteratorHelper3< ListenerT > &  )
privatedelete

Member Function Documentation

◆ hasMoreElements()

template<class ListenerT >
bool comphelper::OInterfaceIteratorHelper3< ListenerT >::hasMoreElements ( ) const
inline

◆ next()

template<class ListenerT >
const css::uno::Reference< ListenerT > & comphelper::OInterfaceIteratorHelper3< ListenerT >::next

Return the next element of the iterator.

Calling this method if hasMoreElements() has returned false, is an error.

Definition at line 96 of file interfacecontainer3.hxx.

References maData.

Referenced by comphelper::OInterfaceContainerHelper3< ListenerT >::disposeAndClear(), and comphelper::OInterfaceContainerHelper3< ListenerT >::forEach().

◆ operator=()

template<class ListenerT >
OInterfaceIteratorHelper3 & comphelper::OInterfaceIteratorHelper3< ListenerT >::operator= ( const OInterfaceIteratorHelper3< ListenerT > &  )
privatedelete

◆ remove()

template<class ListenerT >
void comphelper::OInterfaceIteratorHelper3< ListenerT >::remove

Removes the current element (the last one returned by next()) from the underlying container.

Calling this method before next() has been called or calling it twice with no next() in between is an error.

Definition at line 102 of file interfacecontainer3.hxx.

References maData.

Referenced by comphelper::OInterfaceContainerHelper3< ListenerT >::forEach().

Member Data Documentation

◆ maData

template<class ListenerT >
o3tl::cow_wrapper<std::vector<css::uno::Reference<ListenerT> >, o3tl::ThreadSafeRefCountingPolicy> comphelper::OInterfaceIteratorHelper3< ListenerT >::maData
private

Definition at line 88 of file interfacecontainer3.hxx.

◆ nRemain

template<class ListenerT >
sal_Int32 comphelper::OInterfaceIteratorHelper3< ListenerT >::nRemain
private

◆ rCont

template<class ListenerT >
OInterfaceContainerHelper3<ListenerT>& comphelper::OInterfaceIteratorHelper3< ListenerT >::rCont
private

Definition at line 85 of file interfacecontainer3.hxx.


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