Diffstat (limited to 'libopie2/opiepim/core/opimtemplatebase.h') (more/less context) (show whitespace changes)
-rw-r--r-- | libopie2/opiepim/core/opimtemplatebase.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/libopie2/opiepim/core/opimtemplatebase.h b/libopie2/opiepim/core/opimtemplatebase.h index b48dfed..ec9a94e 100644 --- a/libopie2/opiepim/core/opimtemplatebase.h +++ b/libopie2/opiepim/core/opimtemplatebase.h @@ -32,4 +32,5 @@ /* OPIE */ #include <opie2/opimrecord.h> +#include <opie2/opimcache.h> /* QT */ @@ -71,5 +72,5 @@ private: /** * internal template base - * T needs to implement the copy c'tor!!! + * Attention: T needs to implement the copy c'tor!!! */ class OTemplateBasePrivate; @@ -77,5 +78,7 @@ template <class T = OPimRecord> class OTemplateBase : public OPimBase { public: + /** Look ahead direction of cache */ enum CacheDirection { Forward=0, Reverse }; + OTemplateBase() { }; @@ -89,4 +92,14 @@ public: virtual T find( int uid, const QArray<int>& items, uint current, CacheDirection dir = Forward )const = 0; + + /** + * Find in Cache.. + * Returns empty object if nothing found. + */ + virtual T cacheFind( int uid )const = 0; + + /** + * Put element into Cache + */ virtual void cache( const T& )const = 0; virtual void setSaneCacheSize( int ) = 0; @@ -96,4 +109,5 @@ public: static T* rec(); + private: OTemplateBasePrivate *d; |