Switch to unified view

a/src/rcldb/searchdata.h b/src/rcldb/searchdata.h
...
...
29
29
30
#include "rcldb.h"
30
#include "rcldb.h"
31
#include "refcntr.h"
31
#include "refcntr.h"
32
#include "smallut.h"
32
#include "smallut.h"
33
33
34
class RclConfig;
35
34
#ifndef NO_NAMESPACES
36
#ifndef NO_NAMESPACES
35
using std::vector;
37
using std::vector;
36
using std::string;
38
using std::string;
37
namespace Rcl {
39
namespace Rcl {
38
#endif // NO_NAMESPACES
40
#endif // NO_NAMESPACES
...
...
111
    /** Set date span for filtering results */
113
    /** Set date span for filtering results */
112
    void setDateSpan(DateInterval *dip) {m_dates = *dip; m_haveDates = true;}
114
    void setDateSpan(DateInterval *dip) {m_dates = *dip; m_haveDates = true;}
113
115
114
    /** Add file type for filtering results */
116
    /** Add file type for filtering results */
115
    void addFiletype(const string& ft) {m_filetypes.push_back(ft);}
117
    void addFiletype(const string& ft) {m_filetypes.push_back(ft);}
118
    /** Add file type to not wanted list */
119
    void remFiletype(const string& ft) {m_nfiletypes.push_back(ft);}
116
120
117
    void setStemlang(const string& lang = "english") {m_stemlang = lang;}
121
    void setStemlang(const string& lang = "english") {m_stemlang = lang;}
118
122
119
    /** Retrieve error description */
123
    /** Retrieve error description */
120
    string getReason() {return m_reason;}
124
    string getReason() {return m_reason;}
...
...
138
142
139
private:
143
private:
140
    SClType                   m_tp; // Only SCLT_AND or SCLT_OR here
144
    SClType                   m_tp; // Only SCLT_AND or SCLT_OR here
141
    vector<SearchDataClause*> m_query;
145
    vector<SearchDataClause*> m_query;
142
    vector<string>            m_filetypes; // Restrict to filetypes if set.
146
    vector<string>            m_filetypes; // Restrict to filetypes if set.
147
    vector<string>            m_nfiletypes; // Unwanted file types
143
    string                    m_topdir; // Restrict to subtree.
148
    string                    m_topdir; // Restrict to subtree.
144
    bool                      m_topdirexcl; // Invert meaning
149
    bool                      m_topdirexcl; // Invert meaning
145
    bool                      m_haveDates;
150
    bool                      m_haveDates;
146
    DateInterval              m_dates; // Restrict to date interval
151
    DateInterval              m_dates; // Restrict to date interval
147
    // Printable expanded version of the complete query, retrieved/set
152
    // Printable expanded version of the complete query, retrieved/set
148
    // from rcldb after the Xapian::setQuery() call
153
    // from rcldb after the Xapian::setQuery() call
149
    string m_description; 
154
    string m_description; 
150
    string m_reason;
155
    string m_reason;
151
    bool   m_haveWildCards;
156
    bool   m_haveWildCards;
152
    string m_stemlang;
157
    string m_stemlang;
158
    bool expandFileTypes(RclConfig *cfg, vector<string>& exptps);
153
    /* Copyconst and assignment private and forbidden */
159
    /* Copyconst and assignment private and forbidden */
154
    SearchData(const SearchData &) {}
160
    SearchData(const SearchData &) {}
155
    SearchData& operator=(const SearchData&) {return *this;};
161
    SearchData& operator=(const SearchData&) {return *this;};
156
};
162
};
157
163