(Non-const) Iterator class for DataVector/
More...DataList
.
#include <DVLIterator.h>
Public Types | |
typedef DVL | Container |
typedef DVL::BaseContainer | BaseContainer |
Public Member Functions | |
iterator () | |
Default constructor. | |
iterator (typename BaseContainer::iterator it, DVL *container) | |
Constructor. | |
ElementProxy | operator[] (int n) const |
Element access. | |
operator const_iterator () const | |
Convert to a const_iterator . | |
DVL * | container () const |
Return the container holding the referenced element. | |
SG::OwnershipPolicy | ownPolicy () const |
Return the ownership policy of the container from which this iterator was created. | |
void | testInsert (const char *op) |
Test if we can insert; raise an exception if not. | |
bool | operator== (const iterator &i) const |
bool | operator!= (const iterator &i) const |
bool | operator< (const iterator &i) const |
bool | operator> (const iterator &i) const |
bool | operator<= (const iterator &i) const |
bool | operator>= (const iterator &i) const |
bool | operator== (const const_iterator &i) const |
bool | operator!= (const const_iterator &i) const |
bool | operator< (const const_iterator &i) const |
bool | operator> (const const_iterator &i) const |
bool | operator<= (const const_iterator &i) const |
bool | operator>= (const const_iterator &i) const |
iterator_adaptor_::difference_type | operator- (const iterator &i) const |
iterator | operator- (typename iterator_adaptor_::difference_type i) const |
iterator_adaptor_::difference_type | operator- (const const_iterator &i) const |
Friends | |
class | boost::iterator_core_access |
(Non-const) Iterator class for DataVector/
DataList
.
Except for dereferencing, we want this to be the same as the iterator
of the underlying container type. So, we use boost::iterator_adaptor
and override dereference
.
This should nearly meets underlying container's iterator requirements, except that the dereferencing operations return an ElementProxy
instead of a reference
.
This is templated on the specific DataVector/List
class.
DataModel_detail::iterator< DVL >::iterator | ( | typename BaseContainer::iterator< DVL > | it, | |
DVL * | container | |||
) | [inline] |
Constructor.
it | The underlying container iterator. | |
container | xxx |
DataModel_detail::iterator< DVL >::operator const_iterator | ( | ) | const [inline] |
Convert to a const_iterator
.
This is needed to allow iterator
to convert to const_iterator
.
ElementProxy DataModel_detail::iterator< DVL >::operator[] | ( | int | n | ) | const [inline] |
Element access.
n | Index relative to the iterator of the element to access. |
We need to override this here in order to get the return type correct.
void DataModel_detail::iterator< DVL >::testInsert | ( | const char * | op | ) | [inline] |
Test if we can insert; raise an exception if not.
op | Description of the attempted operation. |