![]() |
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. | |
| 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 () |
| Return the container holding the referenced element. | |
| const 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 |
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. | |
Private Attributes | |
| DVL * | m_container |
| The referenced container. | |
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 136 of file DVLIterator.h.
| typedef DVL::BaseContainer DataModel_detail::iterator< DVL >::BaseContainer |
Definition at line 167 of file DVLIterator.h.
|
private |
Definition at line 162 of file DVLIterator.h.
| typedef DVL DataModel_detail::iterator< DVL >::Container |
Definition at line 166 of file DVLIterator.h.
|
private |
Definition at line 161 of file DVLIterator.h.
|
private |
Definition at line 158 of file DVLIterator.h.
|
inline |
Default constructor.
Definition at line 173 of file DVLIterator.h.
|
inline |
Constructor.
| it | The underlying container iterator. |
| container | The container over which we're iterating. |
Definition at line 183 of file DVLIterator.h.
|
inline |
Return the container holding the referenced element.
Definition at line 218 of file DVLIterator.h.
|
inline |
Return the container holding the referenced element.
Definition at line 227 of file DVLIterator.h.
|
inlineprivate |
Dereference the iterator.
Definition at line 300 of file DVLIterator.h.
|
inline |
Convert to a const_iterator.
This is needed to allow iterator to convert to const_iterator.
Definition at line 209 of file DVLIterator.h.
|
inline |
Definition at line 264 of file DVLIterator.h.
|
inline |
Definition at line 255 of file DVLIterator.h.
|
inline |
Definition at line 285 of file DVLIterator.h.
|
inline |
Definition at line 277 of file DVLIterator.h.
|
inline |
Definition at line 279 of file DVLIterator.h.
|
private |
|
inline |
Definition at line 266 of file DVLIterator.h.
|
inline |
Definition at line 256 of file DVLIterator.h.
|
inline |
Definition at line 270 of file DVLIterator.h.
|
inline |
Definition at line 258 of file DVLIterator.h.
|
inline |
Definition at line 262 of file DVLIterator.h.
|
inline |
Definition at line 254 of file DVLIterator.h.
|
inline |
Definition at line 268 of file DVLIterator.h.
|
inline |
Definition at line 257 of file DVLIterator.h.
|
inline |
Definition at line 272 of file DVLIterator.h.
|
inline |
Definition at line 259 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 197 of file DVLIterator.h.
|
inline |
Return the ownership policy of the container from which this iterator was created.
Definition at line 237 of file DVLIterator.h.
|
inline |
Test if we can insert; raise an exception if not.
| op | Description of the attempted operation. |
Definition at line 247 of file DVLIterator.h.
|
friend |
Definition at line 293 of file DVLIterator.h.
|
private |
The referenced container.
Definition at line 308 of file DVLIterator.h.