![]() |
ATLAS Offline Software
|
(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. More... | |
| iterator (typename BaseContainer::iterator it, DVL *container) | |
| Constructor. More... | |
| ElementProxy | operator[] (int n) const |
| Element access. More... | |
| operator const_iterator () const | |
Convert to a const_iterator. More... | |
| DVL * | container () |
| Return the container holding the referenced element. More... | |
| const DVL * | container () const |
| Return the container holding the referenced element. More... | |
| SG::OwnershipPolicy | ownPolicy () const |
| Return the ownership policy of the container from which this iterator was created. More... | |
| void | testInsert (const char *op) |
| Test if we can insert; raise an exception if not. More... | |
| 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 |
Private Types | |
| typedef boost::iterator_adaptor< iterator, typename DVL::BaseContainer::iterator, typename DVL::value_type, typename DVL::BaseContainer::const_iterator::iterator_category, typename DVL::ElementProxy > | iterator_adaptor_ |
| typedef DVL::ElementProxy | ElementProxy |
| typedef DVL::const_iterator | const_iterator |
Private Member Functions | |
| DVL::pointer | operator-> () |
| ElementProxy | dereference () const |
| Dereference the iterator. More... | |
Private Attributes | |
| DVL * | m_container |
| The referenced container. More... | |
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.
Definition at line 171 of file DVLIterator.h.
| typedef DVL::BaseContainer DataModel_detail::iterator< DVL >::BaseContainer |
Definition at line 202 of file DVLIterator.h.
|
private |
Definition at line 197 of file DVLIterator.h.
| typedef DVL DataModel_detail::iterator< DVL >::Container |
Definition at line 201 of file DVLIterator.h.
|
private |
Definition at line 196 of file DVLIterator.h.
|
private |
Definition at line 193 of file DVLIterator.h.
|
inline |
|
inline |
Constructor.
| it | The underlying container iterator. |
| container | The container over which we're iterating. |
Definition at line 218 of file DVLIterator.h.
|
inline |
Return the container holding the referenced element.
Definition at line 253 of file DVLIterator.h.
|
inline |
Return the container holding the referenced element.
Definition at line 262 of file DVLIterator.h.
|
inlineprivate |
Dereference the iterator.
Definition at line 335 of file DVLIterator.h.
|
inline |
Convert to a const_iterator.
This is needed to allow iterator to convert to const_iterator.
Definition at line 244 of file DVLIterator.h.
|
inline |
Definition at line 299 of file DVLIterator.h.
|
inline |
Definition at line 290 of file DVLIterator.h.
|
inline |
Definition at line 320 of file DVLIterator.h.
|
inline |
Definition at line 312 of file DVLIterator.h.
|
inline |
Definition at line 314 of file DVLIterator.h.
|
private |
|
inline |
Definition at line 301 of file DVLIterator.h.
|
inline |
Definition at line 291 of file DVLIterator.h.
|
inline |
Definition at line 305 of file DVLIterator.h.
|
inline |
Definition at line 293 of file DVLIterator.h.
|
inline |
Definition at line 297 of file DVLIterator.h.
|
inline |
Definition at line 289 of file DVLIterator.h.
|
inline |
Definition at line 303 of file DVLIterator.h.
|
inline |
Definition at line 292 of file DVLIterator.h.
|
inline |
Definition at line 307 of file DVLIterator.h.
|
inline |
Definition at line 294 of file DVLIterator.h.
|
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.
Definition at line 232 of file DVLIterator.h.
|
inline |
Return the ownership policy of the container from which this iterator was created.
Definition at line 272 of file DVLIterator.h.
|
inline |
Test if we can insert; raise an exception if not.
| op | Description of the attempted operation. |
Definition at line 282 of file DVLIterator.h.
|
friend |
Definition at line 328 of file DVLIterator.h.
|
private |
The referenced container.
Definition at line 343 of file DVLIterator.h.
1.8.18