actual/packages/node-libofx/OpenSP-1.5.2/include/ListIter.h

30 lines
573 B
C
Raw Normal View History

2022-04-29 02:44:38 +00:00
// Copyright (c) 1994 James Clark
// See the file COPYING for copying permission.
#ifndef ListIter_INCLUDED
#define ListIter_INCLUDED 1
#include "List.h"
#include "IListIter.h"
#ifdef SP_NAMESPACE
namespace SP_NAMESPACE {
#endif
template<class T>
class ListIter {
public:
ListIter(const List<T> &list) : iter_(list.list_) { }
const T &cur() const { return iter_.cur()->value; }
int done() const { return iter_.done(); }
void next() { iter_.next(); }
private:
IListIter<ListItem<T> > iter_;
};
#ifdef SP_NAMESPACE
}
#endif
#endif /* not ListIter_INCLUDED */