ATLAS Offline Software
Loading...
Searching...
No Matches
DataLinkVector< DC >::iterator Class Reference

class iterator - iterator over elements in DataLinkVector which manages the Entry objects More...

#include <DataLinkVector.h>

Collaboration diagram for DataLinkVector< DC >::iterator:

Public Member Functions

 iterator ()
 constructor
bool operator!= (const iterator it) const
 comparison operator
bool operator== (const iterator it) const
 comparison operator
iteratoroperator= (const iterator it)
 assignment operator
iteratoroperator++ ()
 increment operator
iterator operator++ (int)
 increment operator
DataLinkToperator* ()
 access to object by ref
DataLinkToperator-> ()
 access to object by pointer
bool hasData ()
 test if DataHolder has data

Protected Member Functions

 iterator (const MyType *dlv, EntryVectorIt it)
void checkChain ()
 make sure entry is chained If not, add entry to the chain otherwise do nothing because
EntryVectorentryVector ()
 protected method for derived class to access m_vect

Protected Attributes

const MyTypem_dlv
EntryVectorIt m_it

Friends

class DataLinkVector< DC >

Detailed Description

template<class DC>
class DataLinkVector< DC >::iterator

class iterator - iterator over elements in DataLinkVector which manages the Entry objects

Definition at line 127 of file DataLinkVector.h.

Constructor & Destructor Documentation

◆ iterator() [1/2]

template<class DC>
DataLinkVector< DC >::iterator::iterator ( )

constructor

Definition at line 333 of file DataLinkVector.h.

334 : m_dlv(NULL) {}
This class is a a vector of DataLink for objects of type DC It uses an internal chain to keep track o...

◆ iterator() [2/2]

template<class DC>
DataLinkVector< DC >::iterator::iterator ( const MyType * dlv,
EntryVectorIt it )
protected

Definition at line 384 of file DataLinkVector.h.

386 : m_dlv(dlv), m_it(it) {}

Member Function Documentation

◆ checkChain()

template<class DC>
void DataLinkVector< DC >::iterator::checkChain ( )
protected

make sure entry is chained If not, add entry to the chain otherwise do nothing because

Definition at line 393 of file DataLinkVector.h.

394{ if( m_it->previousEntry() == NULL ) m_dlv->chainEntry( &(*m_it) ) ; }

◆ entryVector()

template<class DC>
DataLinkVector< DC >::EntryVector & DataLinkVector< DC >::iterator::entryVector ( )
protected

protected method for derived class to access m_vect

Definition at line 400 of file DataLinkVector.h.

401{
402 return m_dlv->m_vect ;
403}

◆ hasData()

template<class DC>
bool DataLinkVector< DC >::iterator::hasData ( )

test if DataHolder has data

Definition at line 374 of file DataLinkVector.h.

375{
376 // check if DL is valid, and cash the state
377 checkChain(); // this entry has been touched.
378 Entry& e = *m_it;
379 bool DL_valid = e.dataLink().hasData();
380 return DL_valid;
381}
void checkChain()
make sure entry is chained If not, add entry to the chain otherwise do nothing because

◆ operator!=()

template<class DC>
bool DataLinkVector< DC >::iterator::operator!= ( const iterator it) const

comparison operator

Definition at line 339 of file DataLinkVector.h.

340{ return it.m_it != m_it; }

◆ operator*()

template<class DC>
DataLinkVector< DC >::DataLinkT & DataLinkVector< DC >::iterator::operator* ( )

access to object by ref

Definition at line 364 of file DataLinkVector.h.

365{ checkChain(); return m_it->dataLink(); }

◆ operator++() [1/2]

template<class DC>
DataLinkVector< DC >::iterator & DataLinkVector< DC >::iterator::operator++ ( )

increment operator

Definition at line 354 of file DataLinkVector.h.

355{ ++m_it; return *this; }

◆ operator++() [2/2]

template<class DC>
DataLinkVector< DC >::iterator DataLinkVector< DC >::iterator::operator++ ( int )

increment operator

Definition at line 359 of file DataLinkVector.h.

360{ return iterator( m_dlv, m_it++ ); }

◆ operator->()

template<class DC>
DataLinkVector< DC >::DataLinkT * DataLinkVector< DC >::iterator::operator-> ( )

access to object by pointer

Definition at line 369 of file DataLinkVector.h.

370{ checkChain(); return &m_it->dataLink(); }

◆ operator=()

template<class DC>
DataLinkVector< DC >::iterator & DataLinkVector< DC >::iterator::operator= ( const iterator it)

assignment operator

Definition at line 349 of file DataLinkVector.h.

350{ m_dlv = it.m_dlv; m_it = it.m_it; return *this; }

◆ operator==()

template<class DC>
bool DataLinkVector< DC >::iterator::operator== ( const iterator it) const

comparison operator

Definition at line 344 of file DataLinkVector.h.

345{ return it.m_it == m_it; }

◆ DataLinkVector< DC >

template<class DC>
friend class DataLinkVector< DC >
friend

Definition at line 155 of file DataLinkVector.h.

Member Data Documentation

◆ m_dlv

template<class DC>
const MyType* DataLinkVector< DC >::iterator::m_dlv
protected

Definition at line 171 of file DataLinkVector.h.

◆ m_it

template<class DC>
EntryVectorIt DataLinkVector< DC >::iterator::m_it
protected

Definition at line 172 of file DataLinkVector.h.


The documentation for this class was generated from the following file: