-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 @@ -45,19 +45,19 @@ public: ORecordListIterator &operator--(); bool operator==( const ORecordListIterator& it ); bool operator!=( const ORecordListIterator& it ); - + /** * the current item */ uint current()const; - + /** * the number of items */ uint count()const; - + /** * sets the current item */ void setCurrent( uint cur ); @@ -100,14 +100,15 @@ public: /** * the end */ Iterator end(); - + /** * the number of items in the list */ uint count()const; - + + T operator[]( uint i ); // FIXME implemenent remove /* ConstIterator begin()const; ConstIterator end()const; @@ -145,9 +146,9 @@ ORecordListIterator<T> &ORecordListIterator<T>::operator=( const ORecordListIter m_uids = it.m_uids; m_current = it.m_current; m_temp = it.m_temp; m_end = it.m_end; -// m_record = it.m_record; + m_record = it.m_record; return *this; } @@ -251,5 +252,9 @@ ORecordList<T>::Iterator ORecordList<T>::end() { template <class T> uint ORecordList<T>::count()const { return m_ids.count(); } +template <class T> +T ORecordList<T>::operator[]( uint i ) { + return m_acc->find( m_ids[i] ); +} #endif |