|
a/src/query/docseq.h |
|
b/src/query/docseq.h |
|
... |
|
... |
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#ifndef _DOCSEQ_H_INCLUDED_
|
17 |
#ifndef _DOCSEQ_H_INCLUDED_
|
18 |
#define _DOCSEQ_H_INCLUDED_
|
18 |
#define _DOCSEQ_H_INCLUDED_
|
19 |
/* @(#$Id: docseq.h,v 1.7 2006-02-21 12:52:48 dockes Exp $ (C) 2004 J.F.Dockes */
|
19 |
/* @(#$Id: docseq.h,v 1.8 2006-09-11 09:08:44 dockes Exp $ (C) 2004 J.F.Dockes */
|
20 |
|
20 |
|
21 |
#include "rcldb.h"
|
21 |
#include "rcldb.h"
|
22 |
#include "history.h"
|
22 |
#include "history.h"
|
23 |
|
23 |
|
24 |
/** Interface for a list of documents coming from some source.
|
24 |
/** Interface for a list of documents coming from some source.
|
|
... |
|
... |
69 |
};
|
69 |
};
|
70 |
|
70 |
|
71 |
/** A DocSequence coming from the history file */
|
71 |
/** A DocSequence coming from the history file */
|
72 |
class DocSequenceHistory : public DocSequence {
|
72 |
class DocSequenceHistory : public DocSequence {
|
73 |
public:
|
73 |
public:
|
74 |
DocSequenceHistory(Rcl::Db *d, RclDHistory *h, const std::string &t)
|
74 |
DocSequenceHistory(Rcl::Db *d, RclHistory *h, const std::string &t)
|
75 |
: DocSequence(t), m_db(d), m_hist(h), m_prevnum(-1), m_prevtime(-1) {}
|
75 |
: DocSequence(t), m_db(d), m_hist(h), m_prevnum(-1), m_prevtime(-1) {}
|
76 |
virtual ~DocSequenceHistory() {}
|
76 |
virtual ~DocSequenceHistory() {}
|
77 |
|
77 |
|
78 |
virtual bool getDoc(int num, Rcl::Doc &doc, int *percent, string *sh = 0);
|
78 |
virtual bool getDoc(int num, Rcl::Doc &doc, int *percent, string *sh = 0);
|
79 |
virtual int getResCnt();
|
79 |
virtual int getResCnt();
|
80 |
private:
|
80 |
private:
|
81 |
Rcl::Db *m_db;
|
81 |
Rcl::Db *m_db;
|
82 |
RclDHistory *m_hist;
|
82 |
RclHistory *m_hist;
|
83 |
int m_prevnum;
|
83 |
int m_prevnum;
|
84 |
long m_prevtime;
|
84 |
long m_prevtime;
|
85 |
|
85 |
|
86 |
std::list<RclDHistoryEntry> m_hlist;
|
86 |
std::list<RclDHistoryEntry> m_hlist;
|
87 |
std::list<RclDHistoryEntry>::const_iterator m_it;
|
87 |
std::list<RclDHistoryEntry>::const_iterator m_it;
|