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
DoubleVectorIteratoroperator= (const DoubleVectorIterator &other)=default
bool operator!= (const DoubleVectorIterator &i)
V & operator* () const
V * operator-> () const
DoubleVectorIteratoroperator++ ()

Private Types

typedef T::iterator itr_type

Private Attributes

VecParamsm_params
T * m_first
const VecParamsm_params1
T * m_second
const VecParamsm_params2
int m_pos
itr_type m_itr

Detailed Description

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

Definition at line 307 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 314 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 319 of file TileCellBuilder.h.

325 : m_params(params),
326 m_first(f),
328 m_second(s),
330 m_pos(p) {
331
332 if (m_first->begin() != m_first->end() && m_pos < 1) {
333 m_pos = 0;
334 m_itr = m_first->begin();
335 } else if (m_second->begin() != m_second->end() && m_pos < 2) {
336 m_pos = 1;
337 m_itr = m_second->begin();
338 // set parameters for second vector
340 } else {
341 m_pos = 2;
342 m_itr = m_second->end();
343 }
344 }

◆ 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 350 of file TileCellBuilder.h.

350 {
351 if (m_pos != i.m_pos || m_itr != i.m_itr) return true;
352 else return false;
353 }

◆ operator*()

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

Definition at line 355 of file TileCellBuilder.h.

355{ return (*m_itr); }

◆ operator++()

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

Definition at line 358 of file TileCellBuilder.h.

358 {
359 switch (m_pos) {
360 case 0:
361 if (m_itr != m_first->end()) ++m_itr;
362 if (m_itr != m_first->end()) break;
363 m_itr = m_second->begin();
364 m_pos = 1;
365 // set parameters for second vector
367 if (m_itr != m_second->end()) break;
368 m_pos = 2;
369 // recover parameters for first vector
371 break;
372 case 1:
373 if (m_itr != m_second->end()) ++m_itr;
374 if (m_itr != m_second->end()) break;
375 m_pos = 2;
376 // recover parameters for first vector
378 break;
379 default:
380 break;
381 }
382 return *this;
383 }

◆ operator->()

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

Definition at line 356 of file TileCellBuilder.h.

356{ 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 309 of file TileCellBuilder.h.

◆ m_itr

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

Definition at line 315 of file TileCellBuilder.h.

◆ m_params

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

Definition at line 308 of file TileCellBuilder.h.

◆ m_params1

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

Definition at line 310 of file TileCellBuilder.h.

◆ m_params2

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

Definition at line 312 of file TileCellBuilder.h.

◆ m_pos

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

Definition at line 313 of file TileCellBuilder.h.

◆ m_second

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

Definition at line 311 of file TileCellBuilder.h.


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