LibreOffice Module comphelper (master) 1
|
This is the iterator of an OInterfaceContainerHelper2. More...
#include <interfacecontainer2.hxx>
Public Member Functions | |
OInterfaceIteratorHelper2 (OInterfaceContainerHelper2 &rCont) | |
Create an iterator over the elements of the container. More... | |
~OInterfaceIteratorHelper2 () | |
Releases the connection to the container. More... | |
bool | hasMoreElements () const |
Return true, if there are more elements in the iterator. More... | |
css::uno::XInterface * | 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 | |
OInterfaceIteratorHelper2 (const OInterfaceIteratorHelper2 &)=delete | |
OInterfaceIteratorHelper2 & | operator= (const OInterfaceIteratorHelper2 &)=delete |
Private Attributes | |
OInterfaceContainerHelper2 & | rCont |
detail::element_alias2 | aData |
sal_Int32 | nRemain |
bool | bIsList |
This is the iterator of an OInterfaceContainerHelper2.
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.
Definition at line 61 of file interfacecontainer2.hxx.
comphelper::OInterfaceIteratorHelper2::OInterfaceIteratorHelper2 | ( | OInterfaceContainerHelper2 & | rCont | ) |
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. It is not allowed to destroy the container as long as an iterator exist.
rCont | the container of the elements. |
Definition at line 40 of file interfacecontainer2.cxx.
References aData, comphelper::OInterfaceContainerHelper2::aData, comphelper::OInterfaceContainerHelper2::bInUse, bIsList, comphelper::OInterfaceContainerHelper2::bIsList, comphelper::OInterfaceContainerHelper2::copyAndResetInUse(), nRemain, comphelper::detail::element_alias2::pAsInterface, comphelper::detail::element_alias2::pAsVector, rCont, and comphelper::OInterfaceContainerHelper2::rMutex.
comphelper::OInterfaceIteratorHelper2::~OInterfaceIteratorHelper2 | ( | ) |
Releases the connection to the container.
Definition at line 63 of file interfacecontainer2.cxx.
References aData, comphelper::OInterfaceContainerHelper2::aData, comphelper::OInterfaceContainerHelper2::bInUse, bIsList, comphelper::OInterfaceContainerHelper2::bIsList, comphelper::detail::element_alias2::pAsInterface, comphelper::detail::element_alias2::pAsVector, rCont, and comphelper::OInterfaceContainerHelper2::rMutex.
|
privatedelete |
|
inline |
Return true, if there are more elements in the iterator.
Definition at line 85 of file interfacecontainer2.hxx.
Referenced by comphelper::OInterfaceContainerHelper2::disposeAndClear(), and comphelper::OInterfaceContainerHelper2::forEach().
XInterface * comphelper::OInterfaceIteratorHelper2::next | ( | ) |
Return the next element of the iterator.
Calling this method if hasMoreElements() has returned false, is an error. Cast the returned pointer to the
Definition at line 88 of file interfacecontainer2.cxx.
References aData, bIsList, nRemain, comphelper::detail::element_alias2::pAsInterface, and comphelper::detail::element_alias2::pAsVector.
Referenced by comphelper::OInterfaceContainerHelper2::disposeAndClear(), and comphelper::OInterfaceContainerHelper2::forEach().
|
privatedelete |
void comphelper::OInterfaceIteratorHelper2::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() inbetween is an error.
Definition at line 102 of file interfacecontainer2.cxx.
References aData, bIsList, o3tl::make_unsigned(), nRemain, comphelper::detail::element_alias2::pAsInterface, comphelper::detail::element_alias2::pAsVector, rCont, and comphelper::OInterfaceContainerHelper2::removeInterface().
Referenced by comphelper::OInterfaceContainerHelper2::forEach().
|
private |
Definition at line 102 of file interfacecontainer2.hxx.
Referenced by next(), OInterfaceIteratorHelper2(), remove(), and ~OInterfaceIteratorHelper2().
|
private |
Definition at line 104 of file interfacecontainer2.hxx.
Referenced by next(), OInterfaceIteratorHelper2(), remove(), and ~OInterfaceIteratorHelper2().
|
private |
Definition at line 103 of file interfacecontainer2.hxx.
Referenced by next(), OInterfaceIteratorHelper2(), and remove().
|
private |
Definition at line 101 of file interfacecontainer2.hxx.
Referenced by OInterfaceIteratorHelper2(), remove(), and ~OInterfaceIteratorHelper2().