summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core/otemplatebase.h
Unidiff
Diffstat (limited to 'libopie2/opiepim/core/otemplatebase.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/otemplatebase.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/otemplatebase.h b/libopie2/opiepim/core/otemplatebase.h
index 29fb6ec..cadac74 100644
--- a/libopie2/opiepim/core/otemplatebase.h
+++ b/libopie2/opiepim/core/otemplatebase.h
@@ -11,12 +11,13 @@
11 * we've this class 11 * we've this class
12 * this is here to give us the possibility 12 * this is here to give us the possibility
13 * to have a common base class 13 * to have a common base class
14 * You may not want to use that interface internaly 14 * You may not want to use that interface internaly
15 * POOR mans interface 15 * POOR mans interface
16 */ 16 */
17class OPimBasePrivate;
17struct OPimBase { 18struct OPimBase {
18 /** 19 /**
19 * return the rtti 20 * return the rtti
20 */ 21 */
21 virtual int rtti()= 0; 22 virtual int rtti()= 0;
22 virtual OPimRecord* record()const = 0; 23 virtual OPimRecord* record()const = 0;
@@ -29,18 +30,21 @@ struct OPimBase {
29 virtual bool save() = 0; 30 virtual bool save() = 0;
30 virtual QArray<int> records()const = 0; 31 virtual QArray<int> records()const = 0;
31 /* 32 /*
32 * ADD editing here? 33 * ADD editing here?
33 * -zecke 34 * -zecke
34 */ 35 */
36private:
37 OPimBasePrivate* d;
35 38
36}; 39};
37/** 40/**
38 * internal template base 41 * internal template base
39 * T needs to implement the copy c'tor!!! 42 * T needs to implement the copy c'tor!!!
40 */ 43 */
44class OTemplateBasePrivate;
41template <class T = OPimRecord> 45template <class T = OPimRecord>
42class OTemplateBase : public OPimBase { 46class OTemplateBase : public OPimBase {
43public: 47public:
44 enum CacheDirection { Forward=0, Reverse }; 48 enum CacheDirection { Forward=0, Reverse };
45 OTemplateBase() { 49 OTemplateBase() {
46 }; 50 };
@@ -58,12 +62,15 @@ public:
58 62
59 /* reimplement of OPimBase */ 63 /* reimplement of OPimBase */
60 int rtti(); 64 int rtti();
61 OPimRecord* record()const; 65 OPimRecord* record()const;
62 OPimRecord* record(int uid )const; 66 OPimRecord* record(int uid )const;
63 static T* rec(); 67 static T* rec();
68
69private:
70 OTemplateBasePrivate *d;
64}; 71};
65 72
66/* 73/*
67 * implementation 74 * implementation
68 */ 75 */
69template <class T> 76template <class T>