summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/orecordlist.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/orecordlist.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/orecordlist.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/libopie2/opiepim/orecordlist.h b/libopie2/opiepim/orecordlist.h
index 3b30a73..75bb33c 100644
--- a/libopie2/opiepim/orecordlist.h
+++ b/libopie2/opiepim/orecordlist.h
@@ -16,7 +16,9 @@
16 */ 16 */
17template <class T> class ORecordList;
17template <class T = OPimRecord> 18template <class T = OPimRecord>
18class ORecordListIterator { 19class ORecordListIterator {
20 friend class ORecordList<T>;
19public: 21public:
20 typedef OTemplateBase<T> Base; 22 typedef OTemplateBase<T> Base;
21 23
22 /** 24 /**
@@ -26,3 +28,3 @@ public:
26 ORecordListIterator( const QArray<int>, const Base* ); 28 ORecordListIterator( const QArray<int>, const Base* );
27 29
28 /** 30 /**
@@ -32,8 +34,8 @@ public:
32 ~ORecordListIterator(); 34 ~ORecordListIterator();
33 35
34 ORecordListIterator( const ORecordListIterator& ); 36 ORecordListIterator( const ORecordListIterator& );
35 ORecordListIterator &operator=(const ORecordListIterator& ); 37 ORecordListIterator &operator=(const ORecordListIterator& );
36 38
37 /** 39 /**
38 * a * operator ;) 40 * a * operator ;)
39 * use it like this T = (*it); 41 * use it like this T = (*it);
@@ -61,3 +63,3 @@ private:
61 * from OPimAccessTemplate 63 * from OPimAccessTemplate
62 */ 64 */
63template <class T = OPimRecord > 65template <class T = OPimRecord >
@@ -67,4 +69,4 @@ public:
67 typedef ORecordListIterator<T> Iterator; 69 typedef ORecordListIterator<T> Iterator;
68 70
69 /** 71 /**
70 * c'tor 72 * c'tor
@@ -74,3 +76,3 @@ public:
74 ~ORecordList(); 76 ~ORecordList();
75 77
76 /** 78 /**
@@ -79,3 +81,3 @@ public:
79 Iterator begin(); 81 Iterator begin();
80 82
81 /** 83 /**
@@ -107,2 +109,3 @@ template <class T>
107ORecordListIterator<T>::ORecordListIterator( const ORecordListIterator<T>& it) { 109ORecordListIterator<T>::ORecordListIterator( const ORecordListIterator<T>& it) {
110 qWarning("ORecordListIterator");
108 m_uids = it.m_uids; 111 m_uids = it.m_uids;
@@ -127,2 +130,3 @@ template <class T>
127T &ORecordListIterator<T>::operator*() { 130T &ORecordListIterator<T>::operator*() {
131 qWarning("operator* %d %d", m_current, m_uids[m_current] );
128 if (!m_end ) 132 if (!m_end )
@@ -137,3 +141,3 @@ template <class T>
137ORecordListIterator<T> &ORecordListIterator<T>::operator++() { 141ORecordListIterator<T> &ORecordListIterator<T>::operator++() {
138 if (m_current < m_uids.count() ) { 142 if (m_current < (int)m_uids.count() ) {
139 m_end = false; 143 m_end = false;
@@ -191,2 +195,3 @@ template <class T>
191ORecordList<T>::Iterator ORecordList<T>::begin() { 195ORecordList<T>::Iterator ORecordList<T>::begin() {
196 qWarning("ORecordList::begin");
192 Iterator it( m_ids, m_acc ); 197 Iterator it( m_ids, m_acc );
@@ -199,2 +204,4 @@ ORecordList<T>::Iterator ORecordList<T>::end() {
199 it.m_current = m_ids.count(); 204 it.m_current = m_ids.count();
205
206 return it;
200} 207}