DataModel_detail::iterator< DVL > Class Template Reference

(Non-const) Iterator class for DataVector/DataList. More...

#include <DVLIterator.h>

List of all members.

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

Detailed Description

template<class DVL>
class DataModel_detail::iterator< DVL >

(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.


Constructor & Destructor Documentation

template<class DVL>
DataModel_detail::iterator< DVL >::iterator ( typename BaseContainer::iterator< DVL >  it,
DVL *  container 
) [inline]

Constructor.

Parameters:
it The underlying container iterator.
container xxx

Member Function Documentation

template<class DVL>
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.

template<class DVL>
ElementProxy DataModel_detail::iterator< DVL >::operator[] ( int  n  )  const [inline]

Element access.

Parameters:
n Index relative to the iterator of the element to access.
Returns:
Proxy for the element.

We need to override this here in order to get the return type correct.

template<class DVL>
void DataModel_detail::iterator< DVL >::testInsert ( const char *  op  )  [inline]

Test if we can insert; raise an exception if not.

Parameters:
op Description of the attempted operation.

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on 1 Dec 2017 for RootCore Packages by  doxygen 1.6.1