summaryrefslogtreecommitdiff
path: root/libopie/pim/opimaccesstemplate.h
authorzecke <zecke>2002-10-19 00:08:35 (UTC)
committer zecke <zecke>2002-10-19 00:08:35 (UTC)
commit549472ef07703ef27dc5f58a37e8f16c714fb2a1 (patch) (side-by-side diff)
tree9742f2545ef3504e61a07cef2996aa29b9db5b90 /libopie/pim/opimaccesstemplate.h
parent598cfa66b57d61e15bc3c5ea3a9c8e7295864455 (diff)
downloadopie-549472ef07703ef27dc5f58a37e8f16c714fb2a1.zip
opie-549472ef07703ef27dc5f58a37e8f16c714fb2a1.tar.gz
opie-549472ef07703ef27dc5f58a37e8f16c714fb2a1.tar.bz2
Add void setReadAhead(uint) to the templates
OTodoAccessSQL use the read ahead value
Diffstat (limited to 'libopie/pim/opimaccesstemplate.h') (more/less context) (show whitespace changes)
-rw-r--r--libopie/pim/opimaccesstemplate.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/libopie/pim/opimaccesstemplate.h b/libopie/pim/opimaccesstemplate.h
index 50cb1e4..c5523a8 100644
--- a/libopie/pim/opimaccesstemplate.h
+++ b/libopie/pim/opimaccesstemplate.h
@@ -107,24 +107,25 @@ public:
* @param uid The ID of the item to remove
* @return <i>true</i> if successful.
*/
virtual bool remove( int uid );
/**
* replace T from backend
* @param t The item to replace
* @return <i>true</i> if successful.
*/
virtual bool replace( const T& t) ;
+ void setReadAhead( uint count );
/**
* @internal
*/
void cache( const T& )const;
void setSaneCacheSize( int );
protected:
/**
* invalidate the cache
*/
void invalidateCache();
void setBackEnd( BackEnd* end );
@@ -242,13 +243,17 @@ void OPimAccessTemplate<T>::setBackEnd( BackEnd* end ) {
if (m_backEnd )
m_backEnd->setFrontend( this );
}
template <class T>
void OPimAccessTemplate<T>::cache( const T& t ) const{
/* hacky we need to work around the const*/
((OPimAccessTemplate<T>*)this)->m_cache.add( t );
}
template <class T>
void OPimAccessTemplate<T>::setSaneCacheSize( int size ) {
m_cache.setSize( size );
}
+template <class T>
+void OPimAccessTemplate<T>::setReadAhead( uint count ) {
+ m_backEnd->setReadAhead( count );
+}
#endif