Switch to unified view

a/src/query/docseq.h b/src/query/docseq.h
...
...
25
using std::list;
25
using std::list;
26
using std::vector;
26
using std::vector;
27
#endif
27
#endif
28
28
29
#include "rcldoc.h"
29
#include "rcldoc.h"
30
#include "refcntr.h"
30
31
31
// A result list entry. 
32
// A result list entry. 
32
struct ResListEntry {
33
struct ResListEntry {
33
    Rcl::Doc doc;
34
    Rcl::Doc doc;
34
    string subHeader;
35
    string subHeader;
...
...
118
              vector<vector<string> >& groups, 
119
              vector<vector<string> >& groups, 
119
              vector<int>& gslks) 
120
              vector<int>& gslks) 
120
    {
121
    {
121
    terms.clear(); groups.clear(); gslks.clear(); return true;
122
    terms.clear(); groups.clear(); gslks.clear(); return true;
122
    }
123
    }
123
    virtual list<string> expand(Rcl::Doc &) {list<string> e; return e;}
124
    virtual list<string> expand(Rcl::Doc &) {return list<string>();}
124
125
125
    /** Optional functionality. Yeah, not nice */
126
    /** Optional functionality. Yeah, not nice */
126
    virtual bool canFilter() {return false;}
127
    virtual bool canFilter() {return false;}
127
    virtual bool setFiltSpec(DocSeqFiltSpec &) {return false;}
128
    virtual bool setFiltSpec(DocSeqFiltSpec &) {return false;}
128
    virtual bool canSort() {return false;}
129
    virtual bool canSort() {return false;}
...
...
130
131
131
 private:
132
 private:
132
    string m_title;
133
    string m_title;
133
};
134
};
134
135
136
/** A modifier has a child sequence which does the real work and does
137
 * something with the results. Some operations are just delegated
138
 */
139
class DocSeqModifier : public DocSequence {
140
public:
141
    DocSeqModifier(const string &t, RefCntr<DocSequence> iseq) 
142
  : DocSequence(t), m_seq(iseq) 
143
    {}
144
    virtual ~DocSeqModifier() {}
145
146
    virtual string getAbstract(Rcl::Doc& doc) 
147
    {
148
  return m_seq->getAbstract(doc);
149
    }
150
    virtual string getDescription() 
151
    {
152
  return m_seq->getDescription();
153
    }
154
    virtual bool getTerms(vector<string>& terms, 
155
            vector<vector<string> >& groups, 
156
            vector<int>& gslks) 
157
    {
158
  return m_seq->getTerms(terms, groups, gslks);
159
    }
160
161
protected:
162
    RefCntr<DocSequence>    m_seq;
163
};
164
165
135
#endif /* _DOCSEQ_H_INCLUDED_ */
166
#endif /* _DOCSEQ_H_INCLUDED_ */