summaryrefslogtreecommitdiff
path: root/libopie/pim/opimaccessbackend.h
authorzecke <zecke>2002-09-20 12:59:29 (UTC)
committer zecke <zecke>2002-09-20 12:59:29 (UTC)
commita05c10c9744020be31c3038b2de3401b5cc673fb (patch) (side-by-side diff)
tree20d059bf00fc1199c34a60a8be4cb842ebfe4d14 /libopie/pim/opimaccessbackend.h
parent7099778ab711f78cfd86dadad1b8af993e008f38 (diff)
downloadopie-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 'libopie/pim/opimaccessbackend.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/pim/opimaccessbackend.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/libopie/pim/opimaccessbackend.h b/libopie/pim/opimaccessbackend.h
new file mode 100644
index 0000000..d9af589
--- a/dev/null
+++ b/libopie/pim/opimaccessbackend.h
@@ -0,0 +1,29 @@
+#ifndef OPIE_PIM_ACCESS_BACKEND
+#define OPIE_PIM_ACCESS_BACKEND
+
+#include <qarray.h>
+
+#include <opie/opimrecord.h>
+
+template <class T = OPimRecord>
+class OPimAccessBackend {
+public:
+ OPimAccessBackend() {
+ }
+ ~OPimAccessBackend() {
+ }
+ virtual void load() = 0;
+ virtual void reload() = 0;
+ virtual void save() = 0;
+ virtual QArray<int> allRecords() = 0;
+ virtual QArray<int> queryByExample( const T& t, int sort ) = 0;
+ virtual T find(int uid ) = 0;
+ virtual void clear() = 0;
+ virtual bool add( const T& t ) = 0;
+ virtual bool remove( int uid ) = 0;
+ virtual void replace( const T& t ) = 0;
+
+
+};
+
+#endif