00001 #ifndef QUERY_H 00002 #define QUERY_H 00003 // $Id: query.h,v 1.1.1.1 2002/03/24 12:37:02 dvermeir Exp $ 00004 #include <string> 00005 #include <list> 00006 #include "index.h" 00007 00017 class Query { 00018 public: 00019 typedef list<string> Phrase; 00027 Query(const Index& index, const string& q) throw (runtime_error); 00028 ~Query() {} 00029 00044 const Index::Files& exec(); 00045 00051 const Index::Files& result() const { return result_; } 00052 friend ostream& 00053 operator<<(ostream& os, const Query& q); 00054 private: 00055 const Index& index_; 00056 string query_; 00057 list<Phrase> phrases_; 00058 Index::Strings words_; 00059 Index::Files result_; 00060 }; 00061 #endif 00062
textindexer-0.2 | [27 March, 2002] |