Switch to unified view

a/src/query/docseq.h b/src/query/docseq.h
...
...
153
    /** Optional functionality. */
153
    /** Optional functionality. */
154
    virtual bool canFilter() {return false;}
154
    virtual bool canFilter() {return false;}
155
    virtual bool canSort() {return false;}
155
    virtual bool canSort() {return false;}
156
    virtual bool setFiltSpec(const DocSeqFiltSpec &) {return false;}
156
    virtual bool setFiltSpec(const DocSeqFiltSpec &) {return false;}
157
    virtual bool setSortSpec(const DocSeqSortSpec &) {return false;}
157
    virtual bool setSortSpec(const DocSeqSortSpec &) {return false;}
158
    virtual STD_SHARED_PTR<DocSequence> getSourceSeq() {return STD_SHARED_PTR<DocSequence>();}
158
    virtual std::shared_ptr<DocSequence> getSourceSeq() {return std::shared_ptr<DocSequence>();}
159
159
160
    static void set_translations(const std::string& sort, const std::string& filt)
160
    static void set_translations(const std::string& sort, const std::string& filt)
161
    {
161
    {
162
    o_sort_trans = sort;
162
    o_sort_trans = sort;
163
    o_filt_trans = filt;
163
    o_filt_trans = filt;
...
...
179
/** A modifier has a child sequence which does the real work and does
179
/** A modifier has a child sequence which does the real work and does
180
 * something with the results. Some operations are just delegated
180
 * something with the results. Some operations are just delegated
181
 */
181
 */
182
class DocSeqModifier : public DocSequence {
182
class DocSeqModifier : public DocSequence {
183
public:
183
public:
184
    DocSeqModifier(STD_SHARED_PTR<DocSequence> iseq) 
184
    DocSeqModifier(std::shared_ptr<DocSequence> iseq) 
185
    : DocSequence(""), m_seq(iseq) 
185
    : DocSequence(""), m_seq(iseq) 
186
    {}
186
    {}
187
    virtual ~DocSeqModifier() {}
187
    virtual ~DocSeqModifier() {}
188
188
189
    virtual bool getAbstract(Rcl::Doc& doc, std::vector<std::string>& abs) 
189
    virtual bool getAbstract(Rcl::Doc& doc, std::vector<std::string>& abs) 
...
...
239
    }
239
    }
240
    virtual std::string title() 
240
    virtual std::string title() 
241
    {
241
    {
242
    return m_seq->title();
242
    return m_seq->title();
243
    }
243
    }
244
    virtual STD_SHARED_PTR<DocSequence> getSourceSeq() 
244
    virtual std::shared_ptr<DocSequence> getSourceSeq() 
245
    {
245
    {
246
    return m_seq;
246
    return m_seq;
247
    }
247
    }
248
248
249
protected:
249
protected:
...
...
252
    if (!m_seq)
252
    if (!m_seq)
253
        return 0;
253
        return 0;
254
    return m_seq->getDb();
254
    return m_seq->getDb();
255
    }
255
    }
256
256
257
    STD_SHARED_PTR<DocSequence>    m_seq;
257
    std::shared_ptr<DocSequence>    m_seq;
258
};
258
};
259
259
260
class RclConfig;
260
class RclConfig;
261
261
262
// A DocSource can juggle docseqs of different kinds to implement
262
// A DocSource can juggle docseqs of different kinds to implement
263
// sorting and filtering in ways depending on the base seqs capabilities
263
// sorting and filtering in ways depending on the base seqs capabilities
264
class DocSource : public DocSeqModifier {
264
class DocSource : public DocSeqModifier {
265
public:
265
public:
266
    DocSource(RclConfig *config, STD_SHARED_PTR<DocSequence> iseq) 
266
    DocSource(RclConfig *config, std::shared_ptr<DocSequence> iseq) 
267
    : DocSeqModifier(iseq), m_config(config)
267
    : DocSeqModifier(iseq), m_config(config)
268
    {}
268
    {}
269
    virtual bool canFilter() {return true;}
269
    virtual bool canFilter() {return true;}
270
    virtual bool canSort() {return true;}
270
    virtual bool canSort() {return true;}
271
    virtual bool setFiltSpec(const DocSeqFiltSpec &);
271
    virtual bool setFiltSpec(const DocSeqFiltSpec &);