| The Gaudi Framework v29r0 (ff2e7097)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Private Attributes | List of all members
AlgsExecutionStates::Iterator Class Reference

`#include <src/AlgsExecutionStates.h>`

Inheritance diagram for AlgsExecutionStates::Iterator:
[legend]
Collaboration diagram for AlgsExecutionStates::Iterator:
[legend]

## Public Types
enum | POS { BEGIN, END }

## Public Member Functions
| Iterator (POS pos, State s, const std::vector< State > &v)
| ~Iterator ()
Iterator & | operator= (const Iterator &other)
bool | operator== (const Iterator &other)
bool | operator!= (const Iterator &other)
Iterator & | operator++ ()
Iterator & | operator++ (int)
uint | operator* ()

## Private Attributes
std::vector< State >::const_iterator | pos_
State | s_
const std::vector< State > * | v_

## Detailed Description

Definition at line 79 of file AlgsExecutionStates.h.

## Member Enumeration Documentation

enum AlgsExecutionStates::Iterator::POS

Enumerator
BEGIN |
END |

Definition at line 83 of file AlgsExecutionStates.h.

83 { BEGIN, END };
AlgsExecutionStates::Iterator::END
Definition: AlgsExecutionStates.h:83
AlgsExecutionStates::Iterator::BEGIN
Definition: AlgsExecutionStates.h:83

## Constructor & Destructor Documentation

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

Definition at line 85 of file AlgsExecutionStates.h.

85 : s_( s ), v_( &v )
86 {
87 if ( pos == POS::BEGIN ) pos_ = std::find( v_->begin(), v_->end(), s_ );
88 if ( pos == POS::END ) pos_ = v_->end();
89 // std::cout << "initialized iterator at " << pos_ << std::endl;
90 }
AlgsExecutionStates::Iterator::v_
const std::vector< State > * v_
Definition: AlgsExecutionStates.h:122
std::vector::end
T end(T...args)
AlgsExecutionStates::Iterator::pos_
std::vector< State >::const_iterator pos_
Definition: AlgsExecutionStates.h:120
std::find
T find(T...args)
std::vector::begin
T begin(T...args)
AlgsExecutionStates::Iterator::s_
State s_
Definition: AlgsExecutionStates.h:121
gaudirun.s
string s
Definition: gaudirun.py:253

AlgsExecutionStates::Iterator::~Iterator | ( |  | ) |
| inline

Definition at line 92 of file AlgsExecutionStates.h.

92 {}

## Member Function Documentation

bool AlgsExecutionStates::Iterator::operator!= | ( | const Iterator & | other | ) |
| inline

Definition at line 104 of file AlgsExecutionStates.h.

104 { return pos_ != other.pos_ || s_ != other.s_ || v_ != other.v_; }
AlgsExecutionStates::Iterator::v_
const std::vector< State > * v_
Definition: AlgsExecutionStates.h:122
AlgsExecutionStates::Iterator::pos_
std::vector< State >::const_iterator pos_
Definition: AlgsExecutionStates.h:120
AlgsExecutionStates::Iterator::s_
State s_
Definition: AlgsExecutionStates.h:121

uint AlgsExecutionStates::Iterator::operator* | ( |  | ) |
| inline

Definition at line 117 of file AlgsExecutionStates.h.

117 { return std::distance( v_->begin(), pos_ ); }
std::distance
T distance(T...args)
AlgsExecutionStates::Iterator::v_
const std::vector< State > * v_
Definition: AlgsExecutionStates.h:122
AlgsExecutionStates::Iterator::pos_
std::vector< State >::const_iterator pos_
Definition: AlgsExecutionStates.h:120
std::vector::begin
T begin(T...args)

Iterator& AlgsExecutionStates::Iterator::operator++ | ( |  | ) |
| inline

Definition at line 106 of file AlgsExecutionStates.h.

107 {
108 if ( pos_ != v_->end() ) {
109 pos_ = std::find( ++pos_, v_->end(), s_ );
110 // std::cout << "advanced iterator to " << pos_ << std::endl;
111 }
112 return ( *this );
113 }
AlgsExecutionStates::Iterator::v_
const std::vector< State > * v_
Definition: AlgsExecutionStates.h:122
std::vector::end
T end(T...args)
AlgsExecutionStates::Iterator::pos_
std::vector< State >::const_iterator pos_
Definition: AlgsExecutionStates.h:120
std::find
T find(T...args)
AlgsExecutionStates::Iterator::s_
State s_
Definition: AlgsExecutionStates.h:121

Iterator& AlgsExecutionStates::Iterator::operator++ | ( | int |  | ) |
| inline

Definition at line 115 of file AlgsExecutionStates.h.

115 { return ( ++( *this ) ); }

Iterator& AlgsExecutionStates::Iterator::operator= | ( | const Iterator & | other | ) |
| inline

Definition at line 94 of file AlgsExecutionStates.h.

95 {
96 pos_ = other.pos_;
97 v_ = other.v_;
98 s_ = other.s_;
99 return ( *this );
100 }
AlgsExecutionStates::Iterator::v_
const std::vector< State > * v_
Definition: AlgsExecutionStates.h:122
AlgsExecutionStates::Iterator::pos_
std::vector< State >::const_iterator pos_
Definition: AlgsExecutionStates.h:120
AlgsExecutionStates::Iterator::s_
State s_
Definition: AlgsExecutionStates.h:121

bool AlgsExecutionStates::Iterator::operator== | ( | const Iterator & | other | ) |
| inline

Definition at line 102 of file AlgsExecutionStates.h.

102 { return pos_ == other.pos_ && s_ == other.s_ && v_ == other.v_; }
AlgsExecutionStates::Iterator::v_
const std::vector< State > * v_
Definition: AlgsExecutionStates.h:122
AlgsExecutionStates::Iterator::pos_
std::vector< State >::const_iterator pos_
Definition: AlgsExecutionStates.h:120
AlgsExecutionStates::Iterator::s_
State s_
Definition: AlgsExecutionStates.h:121

## Member Data Documentation

std::vector<State>::const_iterator AlgsExecutionStates::Iterator::pos_
| private

Definition at line 120 of file AlgsExecutionStates.h.

State AlgsExecutionStates::Iterator::s_
| private

Definition at line 121 of file AlgsExecutionStates.h.

const std::vector<State>* AlgsExecutionStates::Iterator::v_
| private

Definition at line 122 of file AlgsExecutionStates.h.

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

- GaudiHive/src/AlgsExecutionStates.h