Switch to unified view

a/src/query/docseq.h b/src/query/docseq.h
...
...
129
    virtual bool canSort() {return false;}
129
    virtual bool canSort() {return false;}
130
    virtual bool setFiltSpec(const DocSeqFiltSpec &) {return false;}
130
    virtual bool setFiltSpec(const DocSeqFiltSpec &) {return false;}
131
    virtual bool setSortSpec(const DocSeqSortSpec &) {return false;}
131
    virtual bool setSortSpec(const DocSeqSortSpec &) {return false;}
132
    virtual RefCntr<DocSequence> getSourceSeq() {return RefCntr<DocSequence>();}
132
    virtual RefCntr<DocSequence> getSourceSeq() {return RefCntr<DocSequence>();}
133
133
134
    static void set_translations(const string& sort, const string& filt)
135
    {
136
  o_sort_trans = sort;
137
  o_filt_trans = filt;
138
    }
139
protected:
140
    static string o_sort_trans;
141
    static string o_filt_trans;
134
 private:
142
 private:
135
    string          m_title;
143
    string          m_title;
136
};
144
};
137
145
138
/** A modifier has a child sequence which does the real work and does
146
/** A modifier has a child sequence which does the real work and does
...
...
145
    {}
153
    {}
146
    virtual ~DocSeqModifier() {}
154
    virtual ~DocSeqModifier() {}
147
155
148
    virtual string getAbstract(Rcl::Doc& doc) 
156
    virtual string getAbstract(Rcl::Doc& doc) 
149
    {
157
    {
158
  if (m_seq.isNull())
159
      return "";
150
    return m_seq->getAbstract(doc);
160
    return m_seq->getAbstract(doc);
151
    }
161
    }
152
    virtual string getDescription() 
162
    virtual string getDescription() 
153
    {
163
    {
164
  if (m_seq.isNull())
165
      return "";
154
    return m_seq->getDescription();
166
    return m_seq->getDescription();
155
    }
167
    }
156
    virtual bool getTerms(vector<string>& terms, 
168
    virtual bool getTerms(vector<string>& terms, 
157
              vector<vector<string> >& groups, 
169
              vector<vector<string> >& groups, 
158
              vector<int>& gslks) 
170
              vector<int>& gslks) 
159
    {
171
    {
172
  if (m_seq.isNull())
173
      return false;
160
    return m_seq->getTerms(terms, groups, gslks);
174
    return m_seq->getTerms(terms, groups, gslks);
161
    }
175
    }
162
    virtual void getUTerms(vector<string>& terms)
176
    virtual void getUTerms(vector<string>& terms)
163
    {
177
    {
178
  if (m_seq.isNull())
179
      return;
164
    m_seq->getUTerms(terms);
180
    m_seq->getUTerms(terms);
165
    }
181
    }
166
    virtual string title() {return m_seq->title();}
182
    virtual string title() {return m_seq->title();}
167
    virtual RefCntr<DocSequence> getSourceSeq() {return m_seq;}
183
    virtual RefCntr<DocSequence> getSourceSeq() {return m_seq;}
168
184
...
...
181
    virtual bool canSort() {return true;}
197
    virtual bool canSort() {return true;}
182
    virtual bool setFiltSpec(const DocSeqFiltSpec &);
198
    virtual bool setFiltSpec(const DocSeqFiltSpec &);
183
    virtual bool setSortSpec(const DocSeqSortSpec &);
199
    virtual bool setSortSpec(const DocSeqSortSpec &);
184
    virtual bool getDoc(int num, Rcl::Doc &doc, string *sh = 0)
200
    virtual bool getDoc(int num, Rcl::Doc &doc, string *sh = 0)
185
    {
201
    {
202
  if (m_seq.isNull())
203
      return false;
186
    return m_seq->getDoc(num, doc, sh);
204
    return m_seq->getDoc(num, doc, sh);
187
    }
205
    }
188
    virtual int getResCnt()
206
    virtual int getResCnt()
189
    {
207
    {
208
  if (m_seq.isNull())
209
      return 0;
190
    return m_seq->getResCnt();
210
    return m_seq->getResCnt();
191
    }
192
    static void set_translations(const string& sort, const string& filt)
193
    {
194
  o_sort_trans = sort;
195
  o_filt_trans = filt;
196
    }
211
    }
197
    virtual string title();
212
    virtual string title();
198
private:
213
private:
199
    bool buildStack();
214
    bool buildStack();
200
    void stripStack();
215
    void stripStack();
201
    DocSeqFiltSpec  m_fspec;
216
    DocSeqFiltSpec  m_fspec;
202
    DocSeqSortSpec  m_sspec;
217
    DocSeqSortSpec  m_sspec;
203
    static string o_sort_trans;
204
    static string o_filt_trans;
205
};
218
};
206
219
207
#endif /* _DOCSEQ_H_INCLUDED_ */
220
#endif /* _DOCSEQ_H_INCLUDED_ */