Last change
on this file since 301 was 110, checked in by rjmcnab, 25 years ago |
Moved from src/library.
|
-
Property svn:executable
set to
*
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.0 KB
|
Line | |
---|
1 | /**********************************************************************
|
---|
2 | *
|
---|
3 | * querycache.h --
|
---|
4 | * Copyright (C) 1999 The New Zealand Digital Library Project
|
---|
5 | *
|
---|
6 | * PUT COPYRIGHT NOTICE HERE
|
---|
7 | *
|
---|
8 | * $Id: querycache.h 110 1999-01-08 09:02:22Z rjmcnab $
|
---|
9 | *
|
---|
10 | *********************************************************************/
|
---|
11 |
|
---|
12 |
|
---|
13 | #ifndef QUERYCACHE_H
|
---|
14 | #define QUERYCACHE_H
|
---|
15 |
|
---|
16 |
|
---|
17 | #include "text_t.h"
|
---|
18 | #include "queryinfo.h"
|
---|
19 |
|
---|
20 | class resultcacheel
|
---|
21 | {
|
---|
22 | public:
|
---|
23 | resultcacheel ();
|
---|
24 |
|
---|
25 | int accessnum;
|
---|
26 | queryparamclass queryparameters;
|
---|
27 | queryresultsclass queryresults;
|
---|
28 | };
|
---|
29 |
|
---|
30 |
|
---|
31 | class querycache {
|
---|
32 | public:
|
---|
33 | querycache (int themaxcachesize);
|
---|
34 | ~querycache ();
|
---|
35 |
|
---|
36 | // returns true if the query was found in the cache
|
---|
37 | // if the query was found then queryresults contains
|
---|
38 | // the results
|
---|
39 | bool find (const queryparamclass &queryparams,
|
---|
40 | queryresultsclass &queryresults);
|
---|
41 |
|
---|
42 | void cache (const queryparamclass &queryparams,
|
---|
43 | const queryresultsclass &queryresults);
|
---|
44 |
|
---|
45 | protected:
|
---|
46 | resultcacheel *resultcache;
|
---|
47 |
|
---|
48 | int maxcachesize;
|
---|
49 | int nextaccessnum;
|
---|
50 |
|
---|
51 | int getnextaccessnum ();
|
---|
52 | int getfreecachenum ();
|
---|
53 | };
|
---|
54 |
|
---|
55 |
|
---|
56 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.