author | zecke <zecke> | 2002-09-20 12:59:29 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-20 12:59:29 (UTC) |
commit | a05c10c9744020be31c3038b2de3401b5cc673fb (patch) (side-by-side diff) | |
tree | 20d059bf00fc1199c34a60a8be4cb842ebfe4d14 /libopie/pim/orecordlist.h | |
parent | 7099778ab711f78cfd86dadad1b8af993e008f38 (diff) | |
download | opie-a05c10c9744020be31c3038b2de3401b5cc673fb.zip opie-a05c10c9744020be31c3038b2de3401b5cc673fb.tar.gz opie-a05c10c9744020be31c3038b2de3401b5cc673fb.tar.bz2 |
Our new common template based start for Accessing and Manipulating
the Records
The CROSS_REFERENCE branch will get ported to it.
We use templates for several reasons
They allow us to share code and to be easily extended
I've to make them not inline to save memory...
I've to port all DBs and Record related classes
-rw-r--r-- | libopie/pim/orecordlist.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/libopie/pim/orecordlist.h b/libopie/pim/orecordlist.h new file mode 100644 index 0000000..c17186f --- a/dev/null +++ b/libopie/pim/orecordlist.h @@ -0,0 +1,44 @@ + +#ifndef OPIE_RECORD_LIST_H +#define OPIE_RECORD_LIST_H + +#include <opie/opimaccesstemplate.h> +#include <opie/opimrecord.h> + +template <class T = OPimRecord > +class ORecordList { +public: + class Iterator { + friend class ORecordList; + public: + Iterator() {} + ~Iterator() {} + Iterator(const Iterator& ) {} + Iterator &operator=(const Iterator& ); + T &operator*() {} + Iterator &operator++(); + + bool operator==( const Iterator& it ); + bool operator!=( const Iterator& it ); + + } + ORecordList( const QArray<int>& ids, + OPimAccessTemplate<T>* acc ) + : m_ids(ids ), m_acc( acc ) { + + } + ~ORecordList() { + + } + Iterator begin(); + Iterator end(); + /* + ConstIterator begin()const; + ConstIterator end()const; + */ +private: + QArray<int> ids; + OPimAccessTemplate<T>* m_acc; +}; + +#endif |