Switch to unified view

a/src/query/docseq.h b/src/query/docseq.h
...
...
112
    virtual bool docDups(const Rcl::Doc&, std::vector<Rcl::Doc>&)
112
    virtual bool docDups(const Rcl::Doc&, std::vector<Rcl::Doc>&)
113
    {
113
    {
114
    return false;
114
    return false;
115
    }
115
    }
116
116
117
    virtual bool getEnclosing(Rcl::Doc&, Rcl::Doc&) = 0;
117
    virtual bool getEnclosing(Rcl::Doc&, Rcl::Doc&);
118
118
119
    /** Get estimated total count in results */
119
    /** Get estimated total count in results */
120
    virtual int getResCnt() = 0;
120
    virtual int getResCnt() = 0;
121
121
122
    /** Get title for result list */
122
    /** Get title for result list */
...
...
157
    static void set_translations(const std::string& sort, const std::string& filt)
157
    static void set_translations(const std::string& sort, const std::string& filt)
158
    {
158
    {
159
    o_sort_trans = sort;
159
    o_sort_trans = sort;
160
    o_filt_trans = filt;
160
    o_filt_trans = filt;
161
    }
161
    }
162
163
    virtual Rcl::Db *getDb() = 0;
164
162
protected:
165
protected:
166
163
    static std::string o_sort_trans;
167
    static std::string o_sort_trans;
164
    static std::string o_filt_trans;
168
    static std::string o_filt_trans;
165
    std::string          m_reason;
169
    std::string          m_reason;
170
166
 private:
171
 private:
167
    std::string          m_title;
172
    std::string          m_title;
168
};
173
};
169
174
170
/** A modifier has a child sequence which does the real work and does
175
/** A modifier has a child sequence which does the real work and does
...
...
226
    {
231
    {
227
    if (m_seq.isNull())
232
    if (m_seq.isNull())
228
        return string();
233
        return string();
229
    return m_seq->getReason();
234
    return m_seq->getReason();
230
    }
235
    }
231
    virtual std::string title() {return m_seq->title();}
236
    virtual std::string title() 
237
    {
238
  return m_seq->title();
239
    }
232
    virtual RefCntr<DocSequence> getSourceSeq() {return m_seq;}
240
    virtual RefCntr<DocSequence> getSourceSeq() 
241
    {
242
  return m_seq;
243
    }
244
245
    virtual Rcl::Db *getDb()
246
    {
247
  if (m_seq.isNull())
248
      return 0;
249
  return m_seq->getDb();
250
    }
233
251
234
protected:
252
protected:
253
235
    RefCntr<DocSequence>    m_seq;
254
    RefCntr<DocSequence>    m_seq;
236
};
255
};
237
256
238
class RclConfig;
257
class RclConfig;
258
239
// A DocSource can juggle docseqs of different kinds to implement
259
// A DocSource can juggle docseqs of different kinds to implement
240
// sorting and filtering in ways depending on the base seqs capabilities
260
// sorting and filtering in ways depending on the base seqs capabilities
241
class DocSource : public DocSeqModifier {
261
class DocSource : public DocSeqModifier {
242
public:
262
public:
243
    DocSource(RclConfig *config, RefCntr<DocSequence> iseq) 
263
    DocSource(RclConfig *config, RefCntr<DocSequence> iseq)