author | eilers <eilers> | 2003-08-01 12:30:16 (UTC) |
---|---|---|
committer | eilers <eilers> | 2003-08-01 12:30:16 (UTC) |
commit | 6c715b67a8f0e32a4edca5be91332622834c8d91 (patch) (unidiff) | |
tree | ae2d660e1fd9c990c2d725c075ce6c42480b0af8 /libopie2/opiepim/core/opimcache.h | |
parent | cb45aa10043fdd6fddcab42ef0e07ddafc3d506d (diff) | |
download | opie-6c715b67a8f0e32a4edca5be91332622834c8d91.zip opie-6c715b67a8f0e32a4edca5be91332622834c8d91.tar.gz opie-6c715b67a8f0e32a4edca5be91332622834c8d91.tar.bz2 |
Merging changes from BRANCH_1_0 to HEAD
Diffstat (limited to 'libopie2/opiepim/core/opimcache.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimcache.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/opimcache.h b/libopie2/opiepim/core/opimcache.h index 73414e5..7f7cff5 100644 --- a/libopie2/opiepim/core/opimcache.h +++ b/libopie2/opiepim/core/opimcache.h | |||
@@ -2,12 +2,14 @@ | |||
2 | #define OPIE_PIM_CACHE_H | 2 | #define OPIE_PIM_CACHE_H |
3 | 3 | ||
4 | #include <qintcache.h> | 4 | #include <qintcache.h> |
5 | 5 | ||
6 | #include "opimrecord.h" | 6 | #include "opimrecord.h" |
7 | 7 | ||
8 | class OPimCacheItemPrivate; | ||
9 | |||
8 | template <class T = OPimRecord> | 10 | template <class T = OPimRecord> |
9 | class OPimCacheItem { | 11 | class OPimCacheItem { |
10 | public: | 12 | public: |
11 | OPimCacheItem( const T& t = T() ); | 13 | OPimCacheItem( const T& t = T() ); |
12 | OPimCacheItem( const OPimCacheItem& ); | 14 | OPimCacheItem( const OPimCacheItem& ); |
13 | ~OPimCacheItem(); | 15 | ~OPimCacheItem(); |
@@ -15,14 +17,17 @@ public: | |||
15 | OPimCacheItem &operator=( const OPimCacheItem& ); | 17 | OPimCacheItem &operator=( const OPimCacheItem& ); |
16 | 18 | ||
17 | T record()const; | 19 | T record()const; |
18 | void setRecord( const T& ); | 20 | void setRecord( const T& ); |
19 | private: | 21 | private: |
20 | T m_t; | 22 | T m_t; |
23 | OPimCacheItemPrivate *d; | ||
21 | }; | 24 | }; |
22 | 25 | ||
26 | |||
27 | class OPimCachePrivate; | ||
23 | /** | 28 | /** |
24 | * OPimCache for caching the items | 29 | * OPimCache for caching the items |
25 | * We support adding, removing | 30 | * We support adding, removing |
26 | * and finding | 31 | * and finding |
27 | */ | 32 | */ |
28 | template <class T = OPimRecord> | 33 | template <class T = OPimRecord> |
@@ -43,12 +48,13 @@ public: | |||
43 | void add( const T& ); | 48 | void add( const T& ); |
44 | void remove( int uid ); | 49 | void remove( int uid ); |
45 | void replace( const T& ); | 50 | void replace( const T& ); |
46 | 51 | ||
47 | private: | 52 | private: |
48 | QIntCache<Item> m_cache; | 53 | QIntCache<Item> m_cache; |
54 | OPimCachePrivate* d; | ||
49 | }; | 55 | }; |
50 | 56 | ||
51 | // Implementation | 57 | // Implementation |
52 | template <class T> | 58 | template <class T> |
53 | OPimCacheItem<T>::OPimCacheItem( const T& t ) | 59 | OPimCacheItem<T>::OPimCacheItem( const T& t ) |
54 | : m_t(t) { | 60 | : m_t(t) { |