blob: b8559190729e6444fcfd531ae6987ca5b5db9118 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#ifndef OPIE_TEMPLATE_BASE_H
#define OPIE_TEMPLATE_BASE_H
#include <qarray.h>
#include "opimrecord.h"
/**
* internal template base
*/
template <class T = OPimRecord>
class OTemplateBase {
public:
enum CacheDirection { Forward=0, Reverse };
OTemplateBase() {
};
virtual ~OTemplateBase() {
}
virtual T find( int uid )const = 0;
/**
* read ahead find
*/
virtual T find( int uid, const QArray<int>& items,
uint current, CacheDirection dir = Forward )const = 0;
virtual void cache( const T& )const = 0;
virtual void setSaneCacheSize( int ) = 0;
};
#endif
|