00001 00004 /* Copyright (C) 2007,2008 Olly Betts 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00019 */ 00020 00021 #ifndef XAPIAN_INCLUDED_MULTIALLTERMSLIST_H 00022 #define XAPIAN_INCLUDED_MULTIALLTERMSLIST_H 00023 00024 #include "alltermslist.h" 00025 00026 #include "database.h" 00027 00028 #include <string> 00029 #include <vector> 00030 00032 class MultiAllTermsList : public AllTermsList { 00034 void operator=(const MultiAllTermsList &); 00035 00037 MultiAllTermsList(const MultiAllTermsList &); 00038 00040 std::string current_term; 00041 00043 std::vector<TermList *> termlists; 00044 00045 public: 00047 MultiAllTermsList(const std::vector<Xapian::Internal::RefCntPtr<Xapian::Database::Internal> > & dbs, 00048 const std::string & prefix); 00049 00051 ~MultiAllTermsList(); 00052 00054 std::string get_termname() const; 00055 00057 Xapian::doccount get_termfreq() const; 00058 00060 Xapian::termcount get_collection_freq() const; 00061 00063 TermList *next(); 00064 00070 TermList *skip_to(const std::string &term); 00071 00073 bool at_end() const; 00074 }; 00075 00076 #endif // XAPIAN_INCLUDED_MULTIALLTERMSLIST_H