From a05c10c9744020be31c3038b2de3401b5cc673fb Mon Sep 17 00:00:00 2001 From: zecke Date: Fri, 20 Sep 2002 12:59:29 +0000 Subject: 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 --- (limited to 'libopie2/opiepim/backend/opimaccessbackend.h') diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h new file mode 100644 index 0000000..d9af589 --- a/dev/null +++ b/libopie2/opiepim/backend/opimaccessbackend.h @@ -0,0 +1,29 @@ +#ifndef OPIE_PIM_ACCESS_BACKEND +#define OPIE_PIM_ACCESS_BACKEND + +#include + +#include + +template +class OPimAccessBackend { +public: + OPimAccessBackend() { + } + ~OPimAccessBackend() { + } + virtual void load() = 0; + virtual void reload() = 0; + virtual void save() = 0; + virtual QArray allRecords() = 0; + virtual QArray 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 -- cgit v0.9.0.2