1 #ifndef STDBFIELDIITERATOR_H
2 #define STDBFIELDIITERATOR_H
10 class Iterator :
public std::iterator<std::input_iterator_tag, FieldList::iterator>
12 FieldList::iterator fField;
13 FieldList::iterator fFieldEnd;
16 Iterator(
FieldList *fields) : fField(fields->begin()), fFieldEnd(fields->end()) {}
17 Iterator(
const Iterator& mit) : fField(mit.fField), fFieldEnd(mit.fFieldEnd) { }
18 Iterator(
const FieldList::iterator &first,
const FieldList::iterator &last) :fField(first), fFieldEnd(last) {}
21 bool operator==(
const Iterator& rhs) {
return fField==rhs.fField;}
22 bool operator!=(
const Iterator& rhs) {
return fField!=rhs.fField;}
25 bool hasNext()
const {
return fField != fFieldEnd; }