author | zecke <zecke> | 2002-09-20 12:59:29 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-20 12:59:29 (UTC) |
commit | a05c10c9744020be31c3038b2de3401b5cc673fb (patch) (unidiff) | |
tree | 20d059bf00fc1199c34a60a8be4cb842ebfe4d14 /libopie2/opiepim/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
Diffstat (limited to 'libopie2/opiepim/orecordlist.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/orecordlist.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/libopie2/opiepim/orecordlist.h b/libopie2/opiepim/orecordlist.h new file mode 100644 index 0000000..c17186f --- a/dev/null +++ b/libopie2/opiepim/orecordlist.h | |||
@@ -0,0 +1,44 @@ | |||
1 | |||
2 | #ifndef OPIE_RECORD_LIST_H | ||
3 | #define OPIE_RECORD_LIST_H | ||
4 | |||
5 | #include <opie/opimaccesstemplate.h> | ||
6 | #include <opie/opimrecord.h> | ||
7 | |||
8 | template <class T = OPimRecord > | ||
9 | class ORecordList { | ||
10 | public: | ||
11 | class Iterator { | ||
12 | friend class ORecordList; | ||
13 | public: | ||
14 | Iterator() {} | ||
15 | ~Iterator() {} | ||
16 | Iterator(const Iterator& ) {} | ||
17 | Iterator &operator=(const Iterator& ); | ||
18 | T &operator*() {} | ||
19 | Iterator &operator++(); | ||
20 | |||
21 | bool operator==( const Iterator& it ); | ||
22 | bool operator!=( const Iterator& it ); | ||
23 | |||
24 | } | ||
25 | ORecordList( const QArray<int>& ids, | ||
26 | OPimAccessTemplate<T>* acc ) | ||
27 | : m_ids(ids ), m_acc( acc ) { | ||
28 | |||
29 | } | ||
30 | ~ORecordList() { | ||
31 | |||
32 | } | ||
33 | Iterator begin(); | ||
34 | Iterator end(); | ||
35 | /* | ||
36 | ConstIterator begin()const; | ||
37 | ConstIterator end()const; | ||
38 | */ | ||
39 | private: | ||
40 | QArray<int> ids; | ||
41 | OPimAccessTemplate<T>* m_acc; | ||
42 | }; | ||
43 | |||
44 | #endif | ||