ATLAS Offline Software
Public Member Functions | Public Attributes | Friends | List of all members
SelectObject< DCC, OBJECT >::const_iterator Class Reference

#include <SelectObject.h>

Collaboration diagram for SelectObject< DCC, OBJECT >::const_iterator:

Public Member Functions

 const_iterator ()
 
const_iteratoroperator= (const const_iterator &it)
 
const_iteratoroperator++ ()
 
void advanceObject ()
 
void advanceCollection ()
 
const_iterator operator++ (int)
 
const OBJECT * operator* ()
 
bool operator!= (const const_iterator it) const
 
bool operator== (const const_iterator it) const
 
 const_iterator (MyType *s, const DCC *dcc, DC_const_iterator &dc_it)
 

Public Attributes

const DCC * m_dcc
 
DC_const_iterator m_dc_it
 
const DCm_dc
 
Object_const_iterator m_digit_it
 
MyTypem_select
 

Friends

class SelectObject< DCC, OBJECT >
 

Detailed Description

template<class DCC, typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
class SelectObject< DCC, OBJECT >::const_iterator

Definition at line 32 of file SelectObject.h.

Constructor & Destructor Documentation

◆ const_iterator() [1/2]

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
SelectObject< DCC, OBJECT >::const_iterator::const_iterator ( )
inline

Definition at line 35 of file SelectObject.h.

35 {}

◆ const_iterator() [2/2]

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
SelectObject< DCC, OBJECT >::const_iterator::const_iterator ( MyType s,
const DCC *  dcc,
DC_const_iterator dc_it 
)
inline

Definition at line 116 of file SelectObject.h.

117  : m_dcc(dcc), m_dc_it(dc_it),m_select(s)
118  {
119  if(m_dcc && m_dc_it!=m_dcc->end())
120  {
122  }
123 
124  }

Member Function Documentation

◆ advanceCollection()

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
void SelectObject< DCC, OBJECT >::const_iterator::advanceCollection ( )
inline

Definition at line 65 of file SelectObject.h.

65  {
66  for( ; m_dc_it != m_dcc->end();++m_dc_it)
67  {
68  m_dc = *m_dc_it ;
69  if(m_select->select(m_dc)){
70  for(m_digit_it = m_dc->begin() ;
71  m_digit_it!=m_dc->end();++m_digit_it) {
72  // check if this digit is accepted.
73  if(m_select->select(*m_digit_it))
74  return ;
75  }
76  }
77  }
78  // reach here only when mc_dc_it == end
79  return ;
80 
81  }

◆ advanceObject()

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
void SelectObject< DCC, OBJECT >::const_iterator::advanceObject ( )
inline

Definition at line 51 of file SelectObject.h.

51  {
52 
53  for(; m_digit_it!=m_dc->end();++m_digit_it) {
54  // check if this digit is accepted.
55  if(m_select->select(*m_digit_it)){
56  return ;
57  }
58  }
59  // reached end of a collection,
60  ++m_dc_it;
62  return ;
63  }

◆ operator!=()

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
bool SelectObject< DCC, OBJECT >::const_iterator::operator!= ( const const_iterator  it) const
inline

Definition at line 94 of file SelectObject.h.

95  { if( it.m_dcc != m_dcc || it.m_dc_it != m_dc_it )
96  return true;
97  if( m_dcc && m_dc_it != m_dcc->end()) {
98  // check digit_it only if it is not end
99  if(it.m_digit_it != m_digit_it) return true;
100  return false;
101  }
102  return false;
103  }

◆ operator*()

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
const OBJECT* SelectObject< DCC, OBJECT >::const_iterator::operator* ( )
inline

Definition at line 89 of file SelectObject.h.

90  { return *m_digit_it; }

◆ operator++() [1/2]

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
const_iterator& SelectObject< DCC, OBJECT >::const_iterator::operator++ ( )
inline

Definition at line 44 of file SelectObject.h.

45  {
46  ++m_digit_it;
47  advanceObject();
48  return *this;
49  }

◆ operator++() [2/2]

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
const_iterator SelectObject< DCC, OBJECT >::const_iterator::operator++ ( int  )
inline

Definition at line 83 of file SelectObject.h.

84  { const_iterator tmp = *this;
85  ++*this;
86  return tmp;
87  }

◆ operator=()

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
const_iterator& SelectObject< DCC, OBJECT >::const_iterator::operator= ( const const_iterator it)
inline

Definition at line 36 of file SelectObject.h.

37  { m_dcc = it.m_dcc;
38  m_digit_it = it.m_digit_it;
39  m_dc_it = it.m_dc_it;
40  m_dc = it.m_dc;
41  return *this;
42  }

◆ operator==()

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
bool SelectObject< DCC, OBJECT >::const_iterator::operator== ( const const_iterator  it) const
inline

Definition at line 104 of file SelectObject.h.

105  { return it.m_dcc == m_dcc
106  && it.m_dc_it == m_dc_it
107  && ((it.m_digit_it == m_digit_it) ||
108  (m_dcc && (m_dc_it==m_dcc->end())));
109  // if both dc_it == end, then don't check digit_it
110  }

Friends And Related Function Documentation

◆ SelectObject< DCC, OBJECT >

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
friend class SelectObject< DCC, OBJECT >
friend

Definition at line 104 of file SelectObject.h.

Member Data Documentation

◆ m_dc

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
const DC* SelectObject< DCC, OBJECT >::const_iterator::m_dc

Definition at line 128 of file SelectObject.h.

◆ m_dc_it

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
DC_const_iterator SelectObject< DCC, OBJECT >::const_iterator::m_dc_it

Definition at line 127 of file SelectObject.h.

◆ m_dcc

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
const DCC* SelectObject< DCC, OBJECT >::const_iterator::m_dcc

Definition at line 126 of file SelectObject.h.

◆ m_digit_it

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
Object_const_iterator SelectObject< DCC, OBJECT >::const_iterator::m_digit_it

Definition at line 129 of file SelectObject.h.

◆ m_select

template<class DCC , typename OBJECT = typename DCC::IDENTIFIABLE::DIGIT>
MyType* SelectObject< DCC, OBJECT >::const_iterator::m_select

Definition at line 130 of file SelectObject.h.


The documentation for this class was generated from the following file:
SelectObject::const_iterator::const_iterator
const_iterator()
Definition: SelectObject.h:35
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
skel.it
it
Definition: skel.GENtoEVGEN.py:396
SelectObject::const_iterator::m_dc_it
DC_const_iterator m_dc_it
Definition: SelectObject.h:127
SelectObject::const_iterator::m_dcc
const DCC * m_dcc
Definition: SelectObject.h:126
SelectObject::const_iterator::m_digit_it
Object_const_iterator m_digit_it
Definition: SelectObject.h:129
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
SelectObject::const_iterator::advanceCollection
void advanceCollection()
Definition: SelectObject.h:65
SelectObject::const_iterator::advanceObject
void advanceObject()
Definition: SelectObject.h:51
SelectObject::const_iterator::m_select
MyType * m_select
Definition: SelectObject.h:130
SelectObject::const_iterator::m_dc
const DC * m_dc
Definition: SelectObject.h:128
SelectObject::select
virtual bool select(const DC *dc)=0