-rw-r--r-- | libopie/pim/orecordlist.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libopie/pim/orecordlist.h b/libopie/pim/orecordlist.h index c63d813..1fd0741 100644 --- a/libopie/pim/orecordlist.h +++ b/libopie/pim/orecordlist.h | |||
@@ -43,23 +43,23 @@ public: | |||
43 | T operator*(); | 43 | T operator*(); |
44 | ORecordListIterator &operator++(); | 44 | ORecordListIterator &operator++(); |
45 | ORecordListIterator &operator--(); | 45 | ORecordListIterator &operator--(); |
46 | 46 | ||
47 | bool operator==( const ORecordListIterator& it ); | 47 | bool operator==( const ORecordListIterator& it ); |
48 | bool operator!=( const ORecordListIterator& it ); | 48 | bool operator!=( const ORecordListIterator& it ); |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * the current item | 51 | * the current item |
52 | */ | 52 | */ |
53 | uint current()const; | 53 | uint current()const; |
54 | 54 | ||
55 | /** | 55 | /** |
56 | * the number of items | 56 | * the number of items |
57 | */ | 57 | */ |
58 | uint count()const; | 58 | uint count()const; |
59 | 59 | ||
60 | /** | 60 | /** |
61 | * sets the current item | 61 | * sets the current item |
62 | */ | 62 | */ |
63 | void setCurrent( uint cur ); | 63 | void setCurrent( uint cur ); |
64 | 64 | ||
65 | private: | 65 | private: |
@@ -98,18 +98,19 @@ public: | |||
98 | Iterator begin(); | 98 | Iterator begin(); |
99 | 99 | ||
100 | /** | 100 | /** |
101 | * the end | 101 | * the end |
102 | */ | 102 | */ |
103 | Iterator end(); | 103 | Iterator end(); |
104 | 104 | ||
105 | /** | 105 | /** |
106 | * the number of items in the list | 106 | * the number of items in the list |
107 | */ | 107 | */ |
108 | uint count()const; | 108 | uint count()const; |
109 | 109 | ||
110 | T operator[]( uint i ); | ||
110 | // FIXME implemenent remove | 111 | // FIXME implemenent remove |
111 | /* | 112 | /* |
112 | ConstIterator begin()const; | 113 | ConstIterator begin()const; |
113 | ConstIterator end()const; | 114 | ConstIterator end()const; |
114 | */ | 115 | */ |
115 | private: | 116 | private: |
@@ -143,13 +144,13 @@ ORecordListIterator<T>::ORecordListIterator( const ORecordListIterator<T>& it) { | |||
143 | template <class T> | 144 | template <class T> |
144 | ORecordListIterator<T> &ORecordListIterator<T>::operator=( const ORecordListIterator<T>& it) { | 145 | ORecordListIterator<T> &ORecordListIterator<T>::operator=( const ORecordListIterator<T>& it) { |
145 | m_uids = it.m_uids; | 146 | m_uids = it.m_uids; |
146 | m_current = it.m_current; | 147 | m_current = it.m_current; |
147 | m_temp = it.m_temp; | 148 | m_temp = it.m_temp; |
148 | m_end = it.m_end; | 149 | m_end = it.m_end; |
149 | // m_record = it.m_record; | 150 | m_record = it.m_record; |
150 | 151 | ||
151 | return *this; | 152 | return *this; |
152 | } | 153 | } |
153 | 154 | ||
154 | template <class T> | 155 | template <class T> |
155 | T ORecordListIterator<T>::operator*() { | 156 | T ORecordListIterator<T>::operator*() { |
@@ -249,7 +250,11 @@ ORecordList<T>::Iterator ORecordList<T>::end() { | |||
249 | return it; | 250 | return it; |
250 | } | 251 | } |
251 | template <class T> | 252 | template <class T> |
252 | uint ORecordList<T>::count()const { | 253 | uint ORecordList<T>::count()const { |
253 | return m_ids.count(); | 254 | return m_ids.count(); |
254 | } | 255 | } |
256 | template <class T> | ||
257 | T ORecordList<T>::operator[]( uint i ) { | ||
258 | return m_acc->find( m_ids[i] ); | ||
259 | } | ||
255 | #endif | 260 | #endif |