|
a/src/rcldb/searchdata.h |
|
b/src/rcldb/searchdata.h |
|
... |
|
... |
14 |
* Free Software Foundation, Inc.,
|
14 |
* Free Software Foundation, Inc.,
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
15 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
16 |
*/
|
16 |
*/
|
17 |
#ifndef _SEARCHDATA_H_INCLUDED_
|
17 |
#ifndef _SEARCHDATA_H_INCLUDED_
|
18 |
#define _SEARCHDATA_H_INCLUDED_
|
18 |
#define _SEARCHDATA_H_INCLUDED_
|
19 |
/* @(#$Id: searchdata.h,v 1.17 2008-09-08 15:47:44 dockes Exp $ (C) 2004 J.F.Dockes */
|
19 |
/* @(#$Id: searchdata.h,v 1.18 2008-09-16 08:18:30 dockes Exp $ (C) 2004 J.F.Dockes */
|
20 |
|
20 |
|
21 |
/**
|
21 |
/**
|
22 |
* Structures to hold data coming almost directly from the gui
|
22 |
* Structures to hold data coming almost directly from the gui
|
23 |
* and handle its translation to Xapian queries.
|
23 |
* and handle its translation to Xapian queries.
|
24 |
* This is not generic code, it reflects the choices made for the user
|
24 |
* This is not generic code, it reflects the choices made for the user
|
|
... |
|
... |
108 |
string getTopdir() {return m_topdir;}
|
108 |
string getTopdir() {return m_topdir;}
|
109 |
void setTopdir(const string& t) {m_topdir = t;}
|
109 |
void setTopdir(const string& t) {m_topdir = t;}
|
110 |
/** Add file type for filtering results */
|
110 |
/** Add file type for filtering results */
|
111 |
void addFiletype(const string& ft) {m_filetypes.push_back(ft);}
|
111 |
void addFiletype(const string& ft) {m_filetypes.push_back(ft);}
|
112 |
|
112 |
|
|
|
113 |
/** Choose sort order. Should this be in RclQuery instead ? */
|
|
|
114 |
void setSortBy(const string& fld, bool ascending = true);
|
|
|
115 |
const string& getSortBy() const {return m_sortField;}
|
|
|
116 |
bool getSortAscending() const {return m_sortAscending;}
|
113 |
private:
|
117 |
private:
|
114 |
SClType m_tp; // Only SCLT_AND or SCLT_OR here
|
118 |
SClType m_tp; // Only SCLT_AND or SCLT_OR here
|
115 |
vector<SearchDataClause *> m_query;
|
119 |
vector<SearchDataClause*> m_query;
|
116 |
vector<string> m_filetypes; // Restrict to filetypes if set.
|
120 |
vector<string> m_filetypes; // Restrict to filetypes if set.
|
117 |
string m_topdir; // Restrict to subtree.
|
121 |
string m_topdir; // Restrict to subtree.
|
|
|
122 |
string m_sortField;
|
|
|
123 |
bool m_sortAscending;
|
118 |
// Printable expanded version of the complete query, retrieved/set
|
124 |
// Printable expanded version of the complete query, retrieved/set
|
119 |
// from rcldb after the Xapian::setQuery() call
|
125 |
// from rcldb after the Xapian::setQuery() call
|
120 |
string m_description;
|
126 |
string m_description;
|
121 |
string m_reason;
|
127 |
string m_reason;
|
122 |
bool m_haveWildCards;
|
128 |
bool m_haveWildCards;
|