-rw-r--r-- | libopie/pim/otemplatebase.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libopie/pim/otemplatebase.h b/libopie/pim/otemplatebase.h index 29fb6ec..cadac74 100644 --- a/libopie/pim/otemplatebase.h +++ b/libopie/pim/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 | */ |
17 | class OPimBasePrivate; | ||
17 | struct OPimBase { | 18 | struct 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 | */ |
36 | private: | ||
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 | */ |
44 | class OTemplateBasePrivate; | ||
41 | template <class T = OPimRecord> | 45 | template <class T = OPimRecord> |
42 | class OTemplateBase : public OPimBase { | 46 | class OTemplateBase : public OPimBase { |
43 | public: | 47 | public: |
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 | |||
69 | private: | ||
70 | OTemplateBasePrivate *d; | ||
64 | }; | 71 | }; |
65 | 72 | ||
66 | /* | 73 | /* |
67 | * implementation | 74 | * implementation |
68 | */ | 75 | */ |
69 | template <class T> | 76 | template <class T> |