use refcntr to access docsequence
This commit is contained in:
parent
aff98f7fc9
commit
a6018c428a
@ -1,5 +1,5 @@
|
|||||||
#ifndef lint
|
#ifndef lint
|
||||||
static char rcsid[] = "@(#$Id: sortseq.cpp,v 1.8 2006-09-21 09:37:28 dockes Exp $ (C) 2005 J.F.Dockes";
|
static char rcsid[] = "@(#$Id: sortseq.cpp,v 1.9 2006-12-05 15:18:48 dockes Exp $ (C) 2005 J.F.Dockes";
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -82,7 +82,7 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
DocSeqSorted::DocSeqSorted(DocSequence &iseq, DocSeqSortSpec &sortspec,
|
DocSeqSorted::DocSeqSorted(RefCntr<DocSequence> iseq, DocSeqSortSpec &sortspec,
|
||||||
const std::string &t)
|
const std::string &t)
|
||||||
: DocSequence(t)
|
: DocSequence(t)
|
||||||
{
|
{
|
||||||
@ -92,7 +92,7 @@ DocSeqSorted::DocSeqSorted(DocSequence &iseq, DocSeqSortSpec &sortspec,
|
|||||||
int i;
|
int i;
|
||||||
for (i = 0; i < m_spec.sortwidth; i++) {
|
for (i = 0; i < m_spec.sortwidth; i++) {
|
||||||
int percent;
|
int percent;
|
||||||
if (!iseq.getDoc(i, m_docs[i], &percent)) {
|
if (!iseq->getDoc(i, m_docs[i], &percent)) {
|
||||||
LOGERR(("DocSeqSorted: getDoc failed for doc %d\n", i));
|
LOGERR(("DocSeqSorted: getDoc failed for doc %d\n", i));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -16,11 +16,12 @@
|
|||||||
*/
|
*/
|
||||||
#ifndef _SORTSEQ_H_INCLUDED_
|
#ifndef _SORTSEQ_H_INCLUDED_
|
||||||
#define _SORTSEQ_H_INCLUDED_
|
#define _SORTSEQ_H_INCLUDED_
|
||||||
/* @(#$Id: sortseq.h,v 1.7 2006-09-21 09:37:28 dockes Exp $ (C) 2004 J.F.Dockes */
|
/* @(#$Id: sortseq.h,v 1.8 2006-12-05 15:18:48 dockes Exp $ (C) 2004 J.F.Dockes */
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "refcntr.h"
|
||||||
#include "docseq.h"
|
#include "docseq.h"
|
||||||
|
|
||||||
class DocSeqSortSpec {
|
class DocSeqSortSpec {
|
||||||
@ -42,7 +43,7 @@ class DocSeqSortSpec {
|
|||||||
*/
|
*/
|
||||||
class DocSeqSorted : public DocSequence {
|
class DocSeqSorted : public DocSequence {
|
||||||
public:
|
public:
|
||||||
DocSeqSorted(DocSequence &iseq, DocSeqSortSpec &sortspec,
|
DocSeqSorted(RefCntr<DocSequence> iseq, DocSeqSortSpec &sortspec,
|
||||||
const std::string &t);
|
const std::string &t);
|
||||||
virtual ~DocSeqSorted() {}
|
virtual ~DocSeqSorted() {}
|
||||||
virtual bool getDoc(int num, Rcl::Doc &doc, int *percent, string *sh = 0);
|
virtual bool getDoc(int num, Rcl::Doc &doc, int *percent, string *sh = 0);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user