00001 00004 /* Copyright (C) 2007,2008,2009 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_MULTIVALUELIST_H 00022 #define XAPIAN_INCLUDED_MULTIVALUELIST_H 00023 00024 #include "valuelist.h" 00025 00026 #include "database.h" 00027 00028 #include <string> 00029 #include <vector> 00030 00031 struct SubValueList; 00032 00034 class MultiValueList : public ValueList { 00036 void operator=(const MultiValueList &); 00037 00039 MultiValueList(const MultiValueList &); 00040 00042 Xapian::docid current_docid; 00043 00045 std::vector<SubValueList *> valuelists; 00046 00048 Xapian::valueno slot; 00049 00050 size_t multiplier; 00051 00052 public: 00054 MultiValueList(const std::vector<Xapian::Internal::RefCntPtr<Xapian::Database::Internal> > & dbs, 00055 Xapian::valueno slot_); 00056 00058 ~MultiValueList(); 00059 00061 Xapian::docid get_docid() const; 00062 00064 std::string get_value() const; 00065 00067 Xapian::valueno get_valueno() const; 00068 00070 bool at_end() const; 00071 00078 void next(); 00079 00085 void skip_to(Xapian::docid); 00086 00105 bool check(Xapian::docid did); 00106 00108 std::string get_description() const; 00109 }; 00110 00111 #endif // XAPIAN_INCLUDED_MULTIVALUELIST_H