author | zecke <zecke> | 2002-09-22 19:25:33 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-22 19:25:33 (UTC) |
commit | 3f194c85b5b9243ff30f1067361ef9fa5bb85a1e (patch) (side-by-side diff) | |
tree | 909eae5d629918d579424a8ca644d6795b43faaf /libopie2/opiepim/orecordlist.h | |
parent | 4904161b6b043e1397db4affd7930fd999ff742e (diff) | |
download | opie-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.h | 40 |
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 @@ -4,22 +4,43 @@ #include <qarray.h> #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--(); bool operator==( const ORecordListIterator& it ); bool operator!=( const ORecordListIterator& it ); @@ -32,22 +53,37 @@ private: T m_record; /* d pointer for future versions */ 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; ConstIterator end()const; */ private: |