File indexing completed on 2024-04-06 12:13:01
0001 #include "FWCore/Reflection/interface/IterWithDict.h"
0002 #include <cassert>
0003
0004 namespace edm {
0005
0006 void IterWithDictBase::advance() {
0007 if (atEnd_) {
0008 return;
0009 }
0010 TObject* obj = iter_.Next();
0011 if (obj == nullptr) {
0012 atEnd_ = true;
0013 }
0014 }
0015
0016 TIter const& IterWithDictBase::iter() const { return iter_; }
0017
0018 IterWithDictBase::IterWithDictBase() : iter_(static_cast<TList*>(nullptr)), atEnd_(true) {
0019
0020
0021
0022
0023 }
0024
0025 IterWithDictBase::IterWithDictBase(TList* list) : iter_(list), atEnd_(false) {
0026
0027 TObject* obj = iter_.Next();
0028 if (obj == nullptr) {
0029 atEnd_ = true;
0030 }
0031 }
0032
0033 bool IterWithDictBase::operator!=(IterWithDictBase const& rhs) const {
0034
0035
0036
0037 if (atEnd_ != rhs.atEnd_) {
0038
0039 return true;
0040 }
0041 if (atEnd_) {
0042
0043 return false;
0044 }
0045
0046 return iter_ != rhs.iter_;
0047 }
0048
0049 }