The Gaudi Framework  v30r3 (a5ef0a68)
AlgsExecutionStates::Iterator Class Referencefinal

#include <src/AlgsExecutionStates.h>

Inheritance diagram for AlgsExecutionStates::Iterator:
Collaboration diagram for AlgsExecutionStates::Iterator:

Public Member Functions

 Iterator (State s, const std::vector< State > &v, std::vector< State >::const_iterator pos)
 
Iteratoroperator++ ()
 
Iteratoroperator++ (int)
 
uint operator* ()
 

Private Member Functions

auto find_valid (std::vector< State >::const_iterator iter) const
 

Private Attributes

State m_s
 
const std::vector< State > * m_v
 
std::vector< State >::const_iterator m_pos
 

Friends

bool operator== (const Iterator &lhs, const Iterator &rhs)
 
bool operator!= (const Iterator &lhs, const Iterator &rhs)
 

Detailed Description

Definition at line 79 of file AlgsExecutionStates.h.

Constructor & Destructor Documentation

AlgsExecutionStates::Iterator::Iterator ( State  s,
const std::vector< State > &  v,
std::vector< State >::const_iterator  pos 
)
inline

Definition at line 84 of file AlgsExecutionStates.h.

85  : m_s( s ), m_v( &v ), m_pos( find_valid( pos ) )
86  {
87  }
const std::vector< State > * m_v
auto find_valid(std::vector< State >::const_iterator iter) const
string s
Definition: gaudirun.py:253
std::vector< State >::const_iterator m_pos

Member Function Documentation

auto AlgsExecutionStates::Iterator::find_valid ( std::vector< State >::const_iterator  iter) const
inlineprivate

Definition at line 81 of file AlgsExecutionStates.h.

81 { return std::find( iter, m_v->end(), m_s ); }
const std::vector< State > * m_v
T end(T...args)
T find(T...args)
uint AlgsExecutionStates::Iterator::operator* ( )
inline

Definition at line 104 of file AlgsExecutionStates.h.

104 { return std::distance( m_v->begin(), m_pos ); }
T distance(T...args)
const std::vector< State > * m_v
T begin(T...args)
std::vector< State >::const_iterator m_pos
Iterator& AlgsExecutionStates::Iterator::operator++ ( )
inline

Definition at line 96 of file AlgsExecutionStates.h.

97  {
98  if ( m_pos != m_v->end() ) m_pos = find_valid( std::next( m_pos ) );
99  return *this;
100  }
const std::vector< State > * m_v
T end(T...args)
auto find_valid(std::vector< State >::const_iterator iter) const
T next(T...args)
std::vector< State >::const_iterator m_pos
Iterator& AlgsExecutionStates::Iterator::operator++ ( int  )
inline

Definition at line 102 of file AlgsExecutionStates.h.

102 { return ++( *this ); }

Friends And Related Function Documentation

bool operator!= ( const Iterator lhs,
const Iterator rhs 
)
friend

Definition at line 94 of file AlgsExecutionStates.h.

94 { return !( lhs == rhs ); }
bool operator== ( const Iterator lhs,
const Iterator rhs 
)
friend

Definition at line 89 of file AlgsExecutionStates.h.

90  {
91  return lhs.m_s == rhs.m_s && lhs.m_v == rhs.m_v && lhs.m_pos == rhs.m_pos;
92  }

Member Data Documentation

std::vector<State>::const_iterator AlgsExecutionStates::Iterator::m_pos
private

Definition at line 109 of file AlgsExecutionStates.h.

State AlgsExecutionStates::Iterator::m_s
private

Definition at line 107 of file AlgsExecutionStates.h.

const std::vector<State>* AlgsExecutionStates::Iterator::m_v
private

Definition at line 108 of file AlgsExecutionStates.h.


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