Const iterator class for DataVector/
More...DataList.
#include <DVLIterator.h>
Public Types | |
| typedef DVL::const_value_type | value_type |
| Standard iterator typedefs. | |
| typedef value_type | reference |
| typedef value_type * | pointer |
|
typedef DVL::BaseContainer::const_iterator::difference_type | difference_type |
|
typedef DVL::BaseContainer::const_iterator::iterator_category | iterator_category |
| typedef DVL | Container |
| typedef DVL::BaseContainer | BaseContainer |
Public Member Functions | |
| const_iterator () | |
| Default constructor. | |
| const_iterator (typename BaseContainer::const_iterator it) | |
| Constructor. | |
| reference | operator* () const |
| Dereference. Operaotr-> doesn't make sense here. | |
| reference | operator[] (difference_type n) const |
| const_iterator & | operator++ () |
| Increment / decrement. | |
| const_iterator | operator++ (int) |
| const_iterator & | operator-- () |
| const_iterator | operator-- (int) |
| const_iterator & | operator+= (difference_type n) |
| Arithmetic. | |
| const_iterator & | operator-= (difference_type n) |
| const_iterator | operator+ (difference_type n) const |
| const_iterator | operator- (difference_type n) const |
| difference_type | operator- (const_iterator other) const |
| bool | operator== (const const_iterator &other) const |
| Comparisons. | |
| bool | operator!= (const const_iterator &other) const |
| bool | operator< (const const_iterator &other) const |
| bool | operator> (const const_iterator &other) const |
| bool | operator<= (const const_iterator &other) const |
| bool | operator>= (const const_iterator &other) const |
Const iterator class for DataVector/ DataList.
We need to cast dereferences to the appropriate type. This could be done with a boost::transform_iterator, except that the iterator category for that will be one of boost's new-style iterator categories, which don't interoperate well with the standard C++ categories. In particular, the container concept checks didn't work.
This is templated on the specific DataVector/List class.
This used to be done using boost::iterator_adaptor, but that caused problems with root6. So now use just write out the iterator explicitly.
| DataModel_detail::const_iterator< DVL >::const_iterator | ( | typename BaseContainer::const_iterator< DVL > | it | ) | [inline] |
Constructor.
| it | The underlying container iterator. |
1.6.1