Switch to unified view

a/src/query/docseq.h b/src/query/docseq.h
...
...
47
/** Filtering spec. This is only used to filter by doc category for now, hence
47
/** Filtering spec. This is only used to filter by doc category for now, hence
48
    the rather specialized interface */
48
    the rather specialized interface */
49
class DocSeqFiltSpec {
49
class DocSeqFiltSpec {
50
 public:
50
 public:
51
    DocSeqFiltSpec() {}
51
    DocSeqFiltSpec() {}
52
    enum Crit {DSFS_MIMETYPE};
52
    enum Crit {DSFS_MIMETYPE, DSFS_QLANG, DSFS_PASSALL};
53
    void orCrit(Crit crit, const string& value) {
53
    void orCrit(Crit crit, const string& value) {
54
    crits.push_back(crit);
54
    crits.push_back(crit);
55
    values.push_back(value);
55
    values.push_back(value);
56
    }
56
    }
57
    std::vector<Crit> crits;
57
    std::vector<Crit> crits;
...
...
189
189
190
protected:
190
protected:
191
    RefCntr<DocSequence>    m_seq;
191
    RefCntr<DocSequence>    m_seq;
192
};
192
};
193
193
194
class RclConfig;
194
// A DocSource can juggle docseqs of different kinds to implement
195
// A DocSource can juggle docseqs of different kinds to implement
195
// sorting and filtering in ways depending on the base seqs capabilities
196
// sorting and filtering in ways depending on the base seqs capabilities
196
class DocSource : public DocSeqModifier {
197
class DocSource : public DocSeqModifier {
197
public:
198
public:
198
    DocSource(RefCntr<DocSequence> iseq) 
199
    DocSource(RclConfig *config, RefCntr<DocSequence> iseq) 
199
  : DocSeqModifier(iseq)
200
  : DocSeqModifier(iseq), m_config(config)
200
    {}
201
    {}
201
    virtual bool canFilter() {return true;}
202
    virtual bool canFilter() {return true;}
202
    virtual bool canSort() {return true;}
203
    virtual bool canSort() {return true;}
203
    virtual bool setFiltSpec(const DocSeqFiltSpec &);
204
    virtual bool setFiltSpec(const DocSeqFiltSpec &);
204
    virtual bool setSortSpec(const DocSeqSortSpec &);
205
    virtual bool setSortSpec(const DocSeqSortSpec &);
...
...
216
    }
217
    }
217
    virtual string title();
218
    virtual string title();
218
private:
219
private:
219
    bool buildStack();
220
    bool buildStack();
220
    void stripStack();
221
    void stripStack();
222
    RclConfig *m_config;
221
    DocSeqFiltSpec  m_fspec;
223
    DocSeqFiltSpec  m_fspec;
222
    DocSeqSortSpec  m_sspec;
224
    DocSeqSortSpec  m_sspec;
223
};
225
};
224
226
225
#endif /* _DOCSEQ_H_INCLUDED_ */
227
#endif /* _DOCSEQ_H_INCLUDED_ */