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 308 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 315 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 320 of file TileCellBuilder.h.

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

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

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

◆ 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++ ( )
inline

Definition at line 359 of file TileCellBuilder.h.

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

◆ operator->()

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

Definition at line 357 of file TileCellBuilder.h.

357{ 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 310 of file TileCellBuilder.h.

◆ m_itr

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

Definition at line 316 of file TileCellBuilder.h.

◆ m_params

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

Definition at line 309 of file TileCellBuilder.h.

◆ m_params1

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

Definition at line 311 of file TileCellBuilder.h.

◆ m_params2

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

Definition at line 313 of file TileCellBuilder.h.

◆ m_pos

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

Definition at line 314 of file TileCellBuilder.h.

◆ m_second

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

Definition at line 312 of file TileCellBuilder.h.


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