LibreOffice Module comphelper (master) 1
|
This is the iterator of an OInterfaceContainerHelper4. More...
#include <interfacecontainer4.hxx>
Public Member Functions | |
OInterfaceIteratorHelper4 (std::unique_lock< std::mutex > &rGuard, OInterfaceContainerHelper4< 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 (::std::unique_lock<::std::mutex > &rGuard) |
Removes the current element (the last one returned by next()) from the underlying container. More... | |
Private Member Functions | |
OInterfaceIteratorHelper4 (const OInterfaceIteratorHelper4 &)=delete | |
OInterfaceIteratorHelper4 & | operator= (const OInterfaceIteratorHelper4 &)=delete |
Private Attributes | |
OInterfaceContainerHelper4< ListenerT > & | rCont |
o3tl::cow_wrapper< std::vector< css::uno::Reference< ListenerT > >, o3tl::ThreadSafeRefCountingPolicy > | maData |
sal_Int32 | nRemain |
This is the iterator of an OInterfaceContainerHelper4.
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.
ListenerT | UNO event listener type |
Definition at line 46 of file interfacecontainer4.hxx.
|
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...
rCont | the container of the elements. |
rGuard | this parameter only here to make that this container is accessed while locked |
Definition at line 63 of file interfacecontainer4.hxx.
References size.
|
privatedelete |
|
inline |
Return true, if there are more elements in the iterator.
Definition at line 75 of file interfacecontainer4.hxx.
References comphelper::OInterfaceIteratorHelper4< ListenerT >::nRemain.
Referenced by comphelper::AccessibleEventNotifier::addEvent(), comphelper::OMultiTypeInterfaceContainerHelperVar4< key, listener, equalImpl >::disposeAndClear(), comphelper::OPropertySetHelper::firePropertyChangeListeners(), comphelper::OPropertySetHelper::fireVetoableChangeListeners(), and comphelper::OInterfaceContainerHelper4< ListenerT >::forEach().
const css::uno::Reference< ListenerT > & comphelper::OInterfaceIteratorHelper4< ListenerT >::next |
Return the next element of the iterator.
Calling this method if hasMoreElements() has returned false, is an error.
Definition at line 102 of file interfacecontainer4.hxx.
References maData.
Referenced by comphelper::AccessibleEventNotifier::addEvent(), comphelper::OMultiTypeInterfaceContainerHelperVar4< key, listener, equalImpl >::disposeAndClear(), comphelper::OPropertySetHelper::firePropertyChangeListeners(), comphelper::OPropertySetHelper::fireVetoableChangeListeners(), and comphelper::OInterfaceContainerHelper4< ListenerT >::forEach().
|
privatedelete |
void comphelper::OInterfaceIteratorHelper4< ListenerT >::remove | ( | ::std::unique_lock<::std::mutex > & | rGuard | ) |
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.
rGuard | this parameter only here to make that this container is accessed while locked |
Definition at line 109 of file interfacecontainer4.hxx.
References maData.
Referenced by comphelper::OPropertySetHelper::firePropertyChangeListeners(), comphelper::OPropertySetHelper::fireVetoableChangeListeners(), and comphelper::OInterfaceContainerHelper4< ListenerT >::forEach().
|
private |
Definition at line 94 of file interfacecontainer4.hxx.
|
private |
Definition at line 95 of file interfacecontainer4.hxx.
Referenced by comphelper::OInterfaceIteratorHelper4< ListenerT >::hasMoreElements().
|
private |
Definition at line 91 of file interfacecontainer4.hxx.