summaryrefslogtreecommitdiff
path: root/libopie/pim/opimaccesstemplate.h
Side-by-side diff
Diffstat (limited to 'libopie/pim/opimaccesstemplate.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/opimaccesstemplate.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/libopie/pim/opimaccesstemplate.h b/libopie/pim/opimaccesstemplate.h
index 8cf81c8..259e2c1 100644
--- a/libopie/pim/opimaccesstemplate.h
+++ b/libopie/pim/opimaccesstemplate.h
@@ -24,2 +24,6 @@ class OPimAccessTemplate : public OTemplateBase<T> {
public:
+ enum Access {
+ Random = 0,
+ SortedAccess
+ };
typedef ORecordList<T> List;
@@ -30,4 +34,6 @@ public:
* c'tor BackEnd
+ * enum Access a small hint on how to handle the backend
*/
OPimAccessTemplate( BackEnd* end);
+
virtual ~OPimAccessTemplate();
@@ -37,3 +43,3 @@ public:
*/
- virtual bool load();
+ bool load();
@@ -51,3 +57,3 @@ public:
*/
- virtual bool save();
+ bool save();
@@ -87,3 +93,3 @@ public:
*/
- virtual void clear() ;
+ void clear() ;
@@ -110,3 +116,4 @@ public:
*/
- virtual bool remove( int uid );
+ bool remove( int uid );
+ bool remove( const OPimRecord& );
@@ -125,2 +132,4 @@ public:
void setSaneCacheSize( int );
+
+ QArray<int> records()const;
protected:
@@ -174,2 +183,6 @@ typename OPimAccessTemplate<T>::List OPimAccessTemplate<T>::allRecords()const {
template <class T>
+QArray<int> OPimAccessTemplate<T>::records()const {
+ return m_backEnd->allRecords();
+}
+template <class T>
typename OPimAccessTemplate<T>::List
@@ -233,2 +246,6 @@ bool OPimAccessTemplate<T>::remove( int uid ) {
template <class T>
+bool OPimAccessTemplate<T>::remove( const OPimRecord& rec) {
+ return remove( rec.uid() );
+}
+template <class T>
bool OPimAccessTemplate<T>::replace( const T& t ) {