aboutsummaryrefslogtreecommitdiff
path: root/odb/qt/containers/list-iterator.hxx
blob: 67f56fd596a94b9060d2e61b258224b275eb7ff6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// file      : odb/qt/containers/list-iterator.hxx
// license   : GNU GPL v2; see accompanying LICENSE file

#ifndef ODB_QT_CONTAINERS_LIST_ITERATOR_HXX
#define ODB_QT_CONTAINERS_LIST_ITERATOR_HXX

#include <odb/pre.hxx>

#include <QtCore/QListIterator>

#include <odb/qt/list.hxx>

// Java-style QListIterator-like iterator. You can also use the
// QListIterator directly (but not QMutableListIterator).
//
template <typename T>
class QOdbListIterator: public QListIterator<T>
{
public:
  QOdbListIterator (const QOdbList<T>& c): QListIterator<T> (c) {}
  QOdbListIterator& operator=(const QOdbList<T>& c)
  {
    static_cast<QListIterator<T>&> (*this) = c;
    return *this;
  }
};

#include <odb/post.hxx>

#endif // ODB_QT_CONTAINERS_LIST_ITERATOR_HXX