ATLAS Offline Software
Loading...
Searching...
No Matches
TileCellBuilder::DoubleVectorIterator< T, V > Class Template Reference
Collaboration diagram for TileCellBuilder::DoubleVectorIterator< T, V >:

Public Member Functions

 DoubleVectorIterator (VecParams &params, T *f, const VecParams &params1, T *s, const VecParams &params2, int p)
 DoubleVectorIterator (const DoubleVectorIterator &i)=default
DoubleVectorIterator & operator= (const DoubleVectorIterator &other)=default
bool operator!= (const DoubleVectorIterator &i)
V & operator* () const
V * operator-> () const
DoubleVectorIterator & operator++ ()

Private Types

typedef T::iterator itr_type

Private Attributes

VecParams & m_params
T * m_first
const VecParams & m_params1
T * m_second
const VecParams & m_params2
int m_pos
itr_type m_itr

Detailed Description

template<typename T, typename V>
class TileCellBuilder::DoubleVectorIterator< T, V >

Definition at line 336 of file TileCellBuilder.h.

Member Typedef Documentation

◆ itr_type

template<typename T, typename V>
typedef T::iterator TileCellBuilder::DoubleVectorIterator< T, V >::itr_type
private

Definition at line 343 of file TileCellBuilder.h.

Constructor & Destructor Documentation

◆ DoubleVectorIterator() [1/2]

template<typename T, typename V>
TileCellBuilder::DoubleVectorIterator< T, V >::DoubleVectorIterator ( VecParams & params,
T * f,
const VecParams & params1,
T * s,
const VecParams & params2,
int p )
inline

Definition at line 348 of file TileCellBuilder.h.

354 : m_params(params),
355 m_first(f),
357 m_second(s),
359 m_pos(p) {
360
361 if (m_first->begin() != m_first->end() && m_pos < 1) {
362 m_pos = 0;
363 m_itr = m_first->begin();
364 } else if (m_second->begin() != m_second->end() && m_pos < 2) {
365 m_pos = 1;
366 m_itr = m_second->begin();
367 // set parameters for second vector
369 } else {
370 m_pos = 2;
371 m_itr = m_second->end();
372 }
373 }

◆ DoubleVectorIterator() [2/2]

template<typename T, typename V>
TileCellBuilder::DoubleVectorIterator< T, V >::DoubleVectorIterator ( const DoubleVectorIterator< T, V > & i)
default

Member Function Documentation

◆ operator!=()

template<typename T, typename V>
bool TileCellBuilder::DoubleVectorIterator< T, V >::operator!= ( const DoubleVectorIterator< T, V > & i)
inline

Definition at line 379 of file TileCellBuilder.h.

379 {
380 if (m_pos != i.m_pos || m_itr != i.m_itr) return true;
381 else return false;
382 }

◆ operator*()

template<typename T, typename V>
V & TileCellBuilder::DoubleVectorIterator< T, V >::operator* ( ) const
inline

Definition at line 384 of file TileCellBuilder.h.

384{ return (*m_itr); }

◆ operator++()

template<typename T, typename V>
DoubleVectorIterator & TileCellBuilder::DoubleVectorIterator< T, V >::operator++ ( )
inline

Definition at line 387 of file TileCellBuilder.h.

387 {
388 switch (m_pos) {
389 case 0:
390 if (m_itr != m_first->end()) ++m_itr;
391 if (m_itr != m_first->end()) break;
392 m_itr = m_second->begin();
393 m_pos = 1;
394 // set parameters for second vector
396 if (m_itr != m_second->end()) break;
397 m_pos = 2;
398 // recover parameters for first vector
400 break;
401 case 1:
402 if (m_itr != m_second->end()) ++m_itr;
403 if (m_itr != m_second->end()) break;
404 m_pos = 2;
405 // recover parameters for first vector
407 break;
408 default:
409 break;
410 }
411 return *this;
412 }

◆ operator->()

template<typename T, typename V>
V * TileCellBuilder::DoubleVectorIterator< T, V >::operator-> ( ) const
inline

Definition at line 385 of file TileCellBuilder.h.

385{ return (*m_itr); }

◆ operator=()

template<typename T, typename V>
DoubleVectorIterator & TileCellBuilder::DoubleVectorIterator< T, V >::operator= ( const DoubleVectorIterator< T, V > & other)
default

Member Data Documentation

◆ m_first

template<typename T, typename V>
T* TileCellBuilder::DoubleVectorIterator< T, V >::m_first
private

Definition at line 338 of file TileCellBuilder.h.

◆ m_itr

template<typename T, typename V>
itr_type TileCellBuilder::DoubleVectorIterator< T, V >::m_itr
private

Definition at line 344 of file TileCellBuilder.h.

◆ m_params

template<typename T, typename V>
VecParams& TileCellBuilder::DoubleVectorIterator< T, V >::m_params
private

Definition at line 337 of file TileCellBuilder.h.

◆ m_params1

template<typename T, typename V>
const VecParams& TileCellBuilder::DoubleVectorIterator< T, V >::m_params1
private

Definition at line 339 of file TileCellBuilder.h.

◆ m_params2

template<typename T, typename V>
const VecParams& TileCellBuilder::DoubleVectorIterator< T, V >::m_params2
private

Definition at line 341 of file TileCellBuilder.h.

◆ m_pos

template<typename T, typename V>
int TileCellBuilder::DoubleVectorIterator< T, V >::m_pos
private

Definition at line 342 of file TileCellBuilder.h.

◆ m_second

template<typename T, typename V>
T* TileCellBuilder::DoubleVectorIterator< T, V >::m_second
private

Definition at line 340 of file TileCellBuilder.h.


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