Diffstat (limited to 'libopie2/opiepim/backend/opimaccessbackend.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie2/opiepim/backend/opimaccessbackend.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/libopie2/opiepim/backend/opimaccessbackend.h b/libopie2/opiepim/backend/opimaccessbackend.h index 4f00bc9..e268f4f 100644 --- a/libopie2/opiepim/backend/opimaccessbackend.h +++ b/libopie2/opiepim/backend/opimaccessbackend.h | |||
@@ -19,7 +19,9 @@ template <class T = OPimRecord> | |||
19 | class OPimAccessBackend { | 19 | class OPimAccessBackend { |
20 | public: | 20 | public: |
21 | typedef OTemplateBase<T> Frontend; | 21 | typedef OTemplateBase<T> Frontend; |
22 | OPimAccessBackend(); | 22 | |
23 | /** The access hint from the frontend */ | ||
24 | OPimAccessBackend(int access = 0); | ||
23 | virtual ~OPimAccessBackend(); | 25 | virtual ~OPimAccessBackend(); |
24 | 26 | ||
25 | /** | 27 | /** |
@@ -88,6 +90,7 @@ public: | |||
88 | */ | 90 | */ |
89 | void setReadAhead( uint count ); | 91 | void setReadAhead( uint count ); |
90 | protected: | 92 | protected: |
93 | int access()const; | ||
91 | void cache( const T& t )const; | 94 | void cache( const T& t )const; |
92 | 95 | ||
93 | /** | 96 | /** |
@@ -98,13 +101,18 @@ protected: | |||
98 | uint readAhead()const; | 101 | uint readAhead()const; |
99 | 102 | ||
100 | private: | 103 | private: |
104 | class Private; | ||
105 | Private* d; | ||
101 | Frontend* m_front; | 106 | Frontend* m_front; |
102 | uint m_read; | 107 | uint m_read; |
108 | int m_acc; | ||
103 | 109 | ||
104 | }; | 110 | }; |
105 | 111 | ||
106 | template <class T> | 112 | template <class T> |
107 | OPimAccessBackend<T>::OPimAccessBackend() { | 113 | OPimAccessBackend<T>::OPimAccessBackend(int acc) |
114 | : m_acc( acc ) | ||
115 | { | ||
108 | m_front = 0l; | 116 | m_front = 0l; |
109 | } | 117 | } |
110 | template <class T> | 118 | template <class T> |
@@ -138,4 +146,8 @@ template <class T> | |||
138 | uint OPimAccessBackend<T>::readAhead()const { | 146 | uint OPimAccessBackend<T>::readAhead()const { |
139 | return m_read; | 147 | return m_read; |
140 | } | 148 | } |
149 | template <class T> | ||
150 | int OPimAccessBackend<T>::access()const { | ||
151 | return m_acc; | ||
152 | } | ||
141 | #endif | 153 | #endif |