summaryrefslogtreecommitdiff
path: root/libodb-qt/odb/qt/containers/list-iterator.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'libodb-qt/odb/qt/containers/list-iterator.hxx')
-rw-r--r--libodb-qt/odb/qt/containers/list-iterator.hxx30
1 files changed, 30 insertions, 0 deletions
diff --git a/libodb-qt/odb/qt/containers/list-iterator.hxx b/libodb-qt/odb/qt/containers/list-iterator.hxx
new file mode 100644
index 0000000..67f56fd
--- /dev/null
+++ b/libodb-qt/odb/qt/containers/list-iterator.hxx
@@ -0,0 +1,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