StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StRecordIterator.cxx
1 #include "StRecordIterator.h"
2 #include "StRecord.h"
3 #include <cassert>
4 
5 using namespace TxLogging;
6 using namespace std;
7 
8 //_______________________________________________________________________
9 Iterator& Iterator::operator++() {++fField;return *this;}
10 //_______________________________________________________________________
11 Iterator& Iterator::operator++(int) {fField++;return *this;}
12 //_______________________________________________________________________
13 StRecord* Iterator::operator*() {return *fField;}
14 //_______________________________________________________________________
15 const StRecord* Iterator::operator*() const {return *fField;}
16 //_______________________________________________________________________
17 StRecord* Iterator::next()
18 {
19  assert((fField!=fFieldEnd ) && "No item to iterate");
20  StRecord* nxt = *fField;
21  operator++();
22  return nxt;
23 }
24