- typedef SMDS_SetIterator<ELEM, typename TSET::const_iterator > TFather;
- public:
- MySetIterator(const TSET& s):TFather(s.begin(),s.end())
- {
- }
+protected:
+ typename TSET::const_iterator _it, _end;
+ TSET _table;
+// int _ind;
+public:
+ MySetIterator(const TSET& table)
+// : _it(table.begin()), _end(table.end())
+ {
+// MESSAGE("table.size()="<< table.size());
+ _table = table;
+ _it = _table.begin();
+ _end = _table.end();
+// for (int i=0; i< _table.size(); i++)
+// if (_table[i]) { MESSAGE("_table["<< i << "]="<< _table[i]);}
+// else
+// { MESSAGE("_table["<< i << "]=NULL"); }
+// _ind = 0;
+ }
+
+ virtual bool more()
+ {
+ while((_it != _end) && (*_it == 0))
+ {
+ _it++;
+// _ind++;
+ }
+// MESSAGE("more _ind=" << _ind);
+ return (_it != _end);
+ }
+
+ virtual ELEM next()
+ {
+ ELEM e=*_it;
+// if (e) { MESSAGE("next _ind=" << _ind << " *_it=" << *_it);}
+// else { MESSAGE("next _ind=" << _ind << " *_it=NULL");}
+// _ind++;
+ _it++;
+ return e;
+ }