summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/orecordlist.h
authorzecke <zecke>2002-09-22 19:25:33 (UTC)
committer zecke <zecke>2002-09-22 19:25:33 (UTC)
commit3f194c85b5b9243ff30f1067361ef9fa5bb85a1e (patch) (side-by-side diff)
tree909eae5d629918d579424a8ca644d6795b43faaf /libopie2/opiepim/orecordlist.h
parent4904161b6b043e1397db4affd7930fd999ff742e (diff)
downloadopie-3f194c85b5b9243ff30f1067361ef9fa5bb85a1e.zip
opie-3f194c85b5b9243ff30f1067361ef9fa5bb85a1e.tar.gz
opie-3f194c85b5b9243ff30f1067361ef9fa5bb85a1e.tar.bz2
Some documentation
and addition to OTodoAccess overDue and effectiveTodos
Diffstat (limited to 'libopie2/opiepim/orecordlist.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/orecordlist.h40
1 files changed, 38 insertions, 2 deletions
diff --git a/libopie2/opiepim/orecordlist.h b/libopie2/opiepim/orecordlist.h
index a3955b0..3b30a73 100644
--- a/libopie2/opiepim/orecordlist.h
+++ b/libopie2/opiepim/orecordlist.h
@@ -7,16 +7,37 @@
#include "otemplatebase.h"
#include "opimrecord.h"
-
+/**
+ * Our List Iterator
+ * it behaves like STL or Qt
+ *
+ * for(it = list.begin(); it != list.end(); ++it )
+ * doSomeCoolStuff( (*it) );
+ */
template <class T = OPimRecord>
class ORecordListIterator {
public:
typedef OTemplateBase<T> Base;
+
+ /**
+ * The c'tor used internally from
+ * ORecordList
+ */
ORecordListIterator( const QArray<int>, const Base* );
+
+ /**
+ * The standard c'tor
+ */
ORecordListIterator();
~ORecordListIterator();
+
ORecordListIterator( const ORecordListIterator& );
ORecordListIterator &operator=(const ORecordListIterator& );
+
+ /**
+ * a * operator ;)
+ * use it like this T = (*it);
+ */
T &operator*();
ORecordListIterator &operator++();
ORecordListIterator &operator--();
@@ -35,16 +56,31 @@ private:
class IteratorPrivate;
IteratorPrivate *d;
};
-
+/**
+ * The recordlist used as a return type
+ * from OPimAccessTemplate
+ */
template <class T = OPimRecord >
class ORecordList {
public:
typedef OTemplateBase<T> Base;
typedef ORecordListIterator<T> Iterator;
+
+ /**
+ * c'tor
+ */
ORecordList( const QArray<int>& ids,
const Base* );
~ORecordList();
+
+ /**
+ * the first iterator
+ */
Iterator begin();
+
+ /**
+ * the end
+ */
Iterator end();
/*
ConstIterator begin()const;