summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/opimaccessbackend.h
authorzecke <zecke>2002-09-22 19:25:33 (UTC)
committer zecke <zecke>2002-09-22 19:25:33 (UTC)
commit3f194c85b5b9243ff30f1067361ef9fa5bb85a1e (patch) (side-by-side diff)
tree909eae5d629918d579424a8ca644d6795b43faaf /libopie2/opiepim/backend/opimaccessbackend.h
parent4904161b6b043e1397db4affd7930fd999ff742e (diff)
downloadopie-3f194c85b5b9243ff30f1067361ef9fa5bb85a1e.zip
opie-3f194c85b5b9243ff30f1067361ef9fa5bb85a1e.tar.gz
opie-3f194c85b5b9243ff30f1067361ef9fa5bb85a1e.tar.bz2
Some documentation
and addition to OTodoAccess overDue and effectiveTodos
Diffstat (limited to 'libopie2/opiepim/backend/opimaccessbackend.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiepim/backend/opimaccessbackend.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h
index 8e744e7..5707b58 100644
--- a/libopie2/opiepim/backend/opimaccessbackend.h
+++ b/libopie2/opiepim/backend/opimaccessbackend.h
@@ -5,20 +5,73 @@
#include <opie/opimrecord.h>
+
+/**
+ * OPimAccessBackend is the base class
+ * for all private backends
+ * it operates on OPimRecord as the base class
+ * and it's responsible for fast manipulating
+ * the resource the implementation takes care
+ * of
+ */
template <class T = OPimRecord>
class OPimAccessBackend {
public:
OPimAccessBackend();
virtual ~OPimAccessBackend();
+
+ /**
+ * load the resource
+ */
virtual void load() = 0;
+
+ /**
+ * reload the resource
+ */
virtual void reload() = 0;
+
+ /**
+ * save the resource and
+ * all it's changes
+ */
virtual void save() = 0;
+
+ /**
+ * return an array of
+ * all available uids
+ */
virtual QArray<int> allRecords()const = 0;
+
+ /**
+ * queryByExample for T with the SortOrder
+ * sort
+ */
virtual QArray<int> queryByExample( const T& t, int sort ) = 0;
+
+ /**
+ * find the OPimRecord with uid @param uid
+ * returns T and T.isEmpty() if nothing was found
+ */
virtual T find(int uid ) = 0;
+
+ /**
+ * clear the back end
+ */
virtual void clear() = 0;
+
+ /**
+ * add T
+ */
virtual bool add( const T& t ) = 0;
+
+ /**
+ * remove
+ */
virtual bool remove( int uid ) = 0;
+
+ /**
+ * replace a record with T.uid()
+ */
virtual bool replace( const T& t ) = 0;